This commit is contained in:
MihailRis
2025-01-07 23:49:09 +03:00
parent e5a3178969
commit dbf366eca3
5 changed files with 22 additions and 7 deletions
+2 -2
View File
@@ -302,9 +302,9 @@ void scripting::on_world_quit() {
void scripting::cleanup() {
auto L = lua::get_main_state();
lua::getglobal(L, "pack");
lua::requireglobal(L, "pack");
for (auto& pack : scripting::engine->getAllContentPacks()) {
lua::getfield(L, "unload");
lua::requirefield(L, "unload");
lua::pushstring(L, pack.id);
lua::call_nothrow(L, 1);
}