mirror of
https://github.com/raymoo/progress_tree.git
synced 2025-07-05 09:40:40 +02:00
Methodify
This commit is contained in:
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
|
||||
|
Reference in New Issue
Block a user