diff options
author | orwell96 <orwell@bleipb.de> | 2017-11-29 17:20:46 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2017-11-29 17:20:46 +0100 |
commit | 83df46d7865aa762afda2bdb6b786cd04bf9480d (patch) | |
tree | c8abb20ac97bb3e3813855349c7904803196cc03 /advtrains/api_doc.txt | |
parent | 7681de96c95a716f7910a42b0f2beb5b23b1df47 (diff) | |
download | advtrains-83df46d7865aa762afda2bdb6b786cd04bf9480d.tar.gz advtrains-83df46d7865aa762afda2bdb6b786cd04bf9480d.tar.bz2 advtrains-83df46d7865aa762afda2bdb6b786cd04bf9480d.zip |
Change name of update_animation function
I will use this for sounds, and so it needs to be changed to a more general name
Diffstat (limited to 'advtrains/api_doc.txt')
-rw-r--r-- | advtrains/api_doc.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/advtrains/api_doc.txt b/advtrains/api_doc.txt index 9ea3cb6..e86f16b 100644 --- a/advtrains/api_doc.txt +++ b/advtrains/api_doc.txt @@ -99,8 +99,9 @@ advtrains.register_wagon(name, prototype, description, inventory_image) ^- optional: Execute custom code on every step custom_on_activate = function(self, dtime_s) end ^- optional: Execute custom code on activate. Staticdata does not need to be saved and restored since all properties written in 'self' are preserved over unloads. - update_animation = function(self, velocity) end - ^- optional: Function that is called whenever the train's velocity changes or every 2 seconds. Used to call 'self.object:update_animation()' if needed. + custom_on_velocity_change = function(self, velocity, old_velocity) end + ^- optional: Function that is called whenever the train's velocity changes or every 2 seconds. Used to call 'self.object:update_animation()' if needed. + ^- for compatibility reasons the name 'update_animation' for this function is still supported. } @@ -164,4 +165,4 @@ minetest.register_node(nodename, { on_train_leave=function(pos, train_id) end ^- called when a train leaves the rail
} -})
\ No newline at end of file +}) |