Methodify

This commit is contained in:
raymoo 2016-02-12 16:49:03 -08:00
parent 8bf6b7d54b
commit 6f043d4c69
1 changed files with 6 additions and 0 deletions

View File

@ -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