mirror of
https://github.com/minetest/minetest.git
synced 2025-07-05 01:10:22 +02:00
Dehardcode the death formspec (#15155)
Co-authored-by: Paul Ouellette <oue.paul18@gmail.com>
This commit is contained in:
@ -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
|
||||
|
@ -49,7 +49,6 @@ public:
|
||||
|
||||
void on_damage_taken(int32_t damage_amount);
|
||||
void on_hp_modification(int32_t newhp);
|
||||
void on_death();
|
||||
void environment_step(float dtime);
|
||||
void on_formspec_input(const std::string &formname, const StringMap &fields);
|
||||
|
||||
|
Reference in New Issue
Block a user