mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Add LuaEntity on_death callback (#6177)
Add LuaEntity on_death callback This fixes #5474
This commit is contained in:
parent
ba959ce27f
commit
550c0404a8
5 changed files with 44 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue