Methodify
This commit is contained in:
parent
8bf6b7d54b
commit
6f043d4c69
6
init.lua
6
init.lua
|
@ -94,6 +94,9 @@ function progress_tree.new_player_data(tree, learned)
|
|||
|
||||
return data
|
||||
end
|
||||
|
||||
|
||||
tree_methods.new_player_data = progress_tree.new_player_data
|
||||
|
||||
|
||||
-- Serialization to a string
|
||||
|
@ -112,6 +115,9 @@ function progress_tree.deserialize_player_data(tree, learned_string)
|
|||
end
|
||||
|
||||
|
||||
tree_methods.deserialize_player_data = progress_tree.deserialize_player_data
|
||||
|
||||
|
||||
-- Tells whether the tech is already learned
|
||||
function pd_methods.knows(self, name)
|
||||
return self.learned[name] == true -- Want false when not in
|
||||
|
|
Loading…
Reference in New Issue