mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix console focus on open
This commit is contained in:
parent
536045ddc4
commit
ac6084f904
5 changed files with 13 additions and 12 deletions
|
|
@ -187,7 +187,15 @@ void scripting::on_world_quit() {
|
|||
for (auto& pack : scripting::engine->getContentPacks()) {
|
||||
lua::emit_event(L, pack.id + ":.worldquit");
|
||||
}
|
||||
scripting::level = nullptr;
|
||||
scripting::content = nullptr;
|
||||
scripting::indices = nullptr;
|
||||
scripting::blocks = nullptr;
|
||||
scripting::controller = nullptr;
|
||||
}
|
||||
|
||||
void scripting::cleanup() {
|
||||
auto L = lua::get_main_state();
|
||||
lua::getglobal(L, "pack");
|
||||
for (auto& pack : scripting::engine->getAllContentPacks()) {
|
||||
lua::getfield(L, "unload");
|
||||
|
|
@ -199,11 +207,6 @@ void scripting::on_world_quit() {
|
|||
if (lua::getglobal(L, "__scripts_cleanup")) {
|
||||
lua::call_nothrow(L, 0);
|
||||
}
|
||||
scripting::level = nullptr;
|
||||
scripting::content = nullptr;
|
||||
scripting::indices = nullptr;
|
||||
scripting::blocks = nullptr;
|
||||
scripting::controller = nullptr;
|
||||
}
|
||||
|
||||
void scripting::on_blocks_tick(const Block& block, int tps) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue