From b2bbef699cfa4f6d5b2173e1c29d0efd1502fe9d Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sun, 25 Oct 2026 22:56:54 +0300 Subject: [PATCH] fix content-related app functions timings --- res/scripts/stdlib.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/res/scripts/stdlib.lua b/res/scripts/stdlib.lua index 3573bda07..b3bec82ce 100644 --- a/res/scripts/stdlib.lua +++ b/res/scripts/stdlib.lua @@ -29,10 +29,14 @@ end local __vc__app_script_coroutine local function complete_app_lib(app) + local tick_required = true local __app_load_content = app.load_content local __app_reset_content = app.reset_content local __app_reconfig_packs = app.reconfig_packs - local __app_tick = coroutine.yield + local __app_tick = function () + coroutine.yield() + tick_required = false + end local __app_set_setting = app.set_setting local __app_quit = app.quit @@ -50,6 +54,9 @@ local function complete_app_lib(app) func(...) return end + if tick_required then + __app_tick() + end local running = coroutine.running() if not running or running ~= __vc__app_script_coroutine then error("content must be reload in application script coroutine")