Overrides!

This commit is contained in:
InfiniteCoder
2024-03-08 00:08:01 +03:00
parent fcb420c4c7
commit 8b949c4c9a
3 changed files with 32 additions and 12 deletions
+1 -1
View File
@@ -30,13 +30,13 @@ void scripting::on_frontend_init(Hud* hud) {
}
void scripting::on_frontend_close() {
scripting::hud = nullptr;
for (auto& pack : scripting::engine->getContentPacks()) {
emit_event(pack.id + ".hudclose", [&] (lua::LuaState* state) {
state->pushinteger(hud->getPlayer()->getId());
return 1;
});
}
scripting::hud = nullptr;
}
void scripting::load_hud_script(int env, std::string packid, fs::path file) {