From 550c0404a8b6fbee857003c961bb802121e88f51 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Thu, 27 Jul 2017 11:32:35 +0200 Subject: Add LuaEntity on_death callback (#6177) Add LuaEntity on_death callback This fixes #5474 --- doc/lua_api.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 2a092300e..b9dc1b47f 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -3864,6 +3864,9 @@ Registered entities * `tool_capabilities`: capability table of used tool (can be `nil`) * `dir`: unit vector of direction of punch. Always defined. Points from the puncher to the punched. + `on_death(self, killer)` + * Called when the object dies. + * `killer`: an `ObjectRef` (can be `nil`) * `on_rightclick(self, clicker)` * `get_staticdata(self)` * Should return a string that will be passed to `on_activate` when -- cgit v1.2.3