diff options
author | hecks <42101236+hecktest@users.noreply.github.com> | 2021-01-02 15:14:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-02 15:14:29 +0100 |
commit | dd5a732fa90550066bb96305b64b6648903cc822 (patch) | |
tree | 1d39d1362e7619ff459eb6da5f1c9aab7629d1b6 /games | |
parent | ad58fb22064c7db223cb825596c12f93f2a75a26 (diff) | |
download | minetest-dd5a732fa90550066bb96305b64b6648903cc822.tar.gz minetest-dd5a732fa90550066bb96305b64b6648903cc822.tar.bz2 minetest-dd5a732fa90550066bb96305b64b6648903cc822.zip |
Add on_deactivate callback for luaentities (#10723)
Diffstat (limited to 'games')
-rw-r--r-- | games/devtest/mods/testentities/callbacks.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/games/devtest/mods/testentities/callbacks.lua b/games/devtest/mods/testentities/callbacks.lua index 711079f87..320690b39 100644 --- a/games/devtest/mods/testentities/callbacks.lua +++ b/games/devtest/mods/testentities/callbacks.lua @@ -31,6 +31,9 @@ minetest.register_entity("testentities:callback", { on_activate = function(self, staticdata, dtime_s) message("Callback entity: on_activate! pos="..spos(self).."; dtime_s="..dtime_s) end, + on_deactivate = function(self) + message("Callback entity: on_deactivate! pos="..spos(self)) + end, on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir, damage) local name = get_object_name(puncher) message( |