mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Allow damage for attached objects, add attach/detach callbacks (#6786)
* Allow right-clicking on attached LuaEntities
This commit is contained in:
parent
0b5b32b026
commit
ba91624d8c
9 changed files with 136 additions and 78 deletions
|
@ -41,6 +41,11 @@ public:
|
|||
ServerActiveObject *puncher, float time_from_last_punch,
|
||||
const ToolCapabilities *toolcap, v3f dir, s16 damage);
|
||||
bool luaentity_on_death(u16 id, ServerActiveObject *killer);
|
||||
void luaentity_Rightclick(u16 id,
|
||||
ServerActiveObject *clicker);
|
||||
void luaentity_Rightclick(u16 id, ServerActiveObject *clicker);
|
||||
void luaentity_on_attach_child(u16 id, ServerActiveObject *child);
|
||||
void luaentity_on_detach_child(u16 id, ServerActiveObject *child);
|
||||
void luaentity_on_detach(u16 id, ServerActiveObject *parent);
|
||||
private:
|
||||
bool luaentity_run_simple_callback(u16 id, ServerActiveObject *sao,
|
||||
const char *field);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue