diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-04-30 18:43:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 18:43:49 +0200 |
commit | ba91624d8c354bac49c35a449029b6712022d0cb (patch) | |
tree | 8a6423ab354888691927f852754f86816f9c90c5 /doc/lua_api.txt | |
parent | 0b5b32b026291d5bd8e47acebca10259a379fc1c (diff) | |
download | minetest-ba91624d8c354bac49c35a449029b6712022d0cb.tar.gz minetest-ba91624d8c354bac49c35a449029b6712022d0cb.tar.bz2 minetest-ba91624d8c354bac49c35a449029b6712022d0cb.zip |
Allow damage for attached objects, add attach/detach callbacks (#6786)
* Allow right-clicking on attached LuaEntities
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 5442612af..dae3452a1 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4868,6 +4868,13 @@ Registered entities * Called when the object dies. * `killer`: an `ObjectRef` (can be `nil`) * `on_rightclick(self, clicker)` + * `on_attach_child(self, child)` + * `child`: an `ObjectRef` (can be `nil`) of the child that attaches + * `on_detach_child(self, child)` + * `child`: an `ObjectRef` (can be `nil`) of the child that detaches + * `on_detach(self, parent)` + * `parent`: an `ObjectRef` (can be `nil`) from where it got detached + * This happens before the parent object is removed from the world * `get_staticdata(self)` * Should return a string that will be passed to `on_activate` when the object is instantiated the next time. |