mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Dehardcode the death formspec (#15155)
Co-authored-by: Paul Ouellette <oue.paul18@gmail.com>
This commit is contained in:
parent
3c48671076
commit
526a2f7b8c
79 changed files with 242 additions and 172 deletions
|
@ -125,21 +125,6 @@ void ScriptApiClient::on_hp_modification(int32_t newhp)
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptApiClient::on_death()
|
||||
{
|
||||
SCRIPTAPI_PRECHECKHEADER
|
||||
|
||||
// Get registered shutdown hooks
|
||||
lua_getglobal(L, "core");
|
||||
lua_getfield(L, -1, "registered_on_death");
|
||||
// Call callbacks
|
||||
try {
|
||||
runCallbacks(0, RUN_CALLBACKS_MODE_FIRST);
|
||||
} catch (LuaError &e) {
|
||||
getClient()->setFatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptApiClient::environment_step(float dtime)
|
||||
{
|
||||
SCRIPTAPI_PRECHECKHEADER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue