From 547a39554ccbf816344c1283e7800dbde894e826 Mon Sep 17 00:00:00 2001 From: clasher113 Date: Fri, 15 Aug 2025 12:27:27 +0300 Subject: [PATCH 1/2] fix: script overriding --- src/content/ContentLoader.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/content/ContentLoader.cpp b/src/content/ContentLoader.cpp index 2aaff315..e260ebd7 100644 --- a/src/content/ContentLoader.cpp +++ b/src/content/ContentLoader.cpp @@ -416,19 +416,20 @@ void ContentLoader::load() { template static void load_script(const Content& content, T& def) { - const auto& name = def.name; - size_t pos = name.find(':'); + const auto& scriptName = def.scriptFile; + if (scriptName.empty()) return; + size_t pos = scriptName.find(':'); if (pos == std::string::npos) { throw std::runtime_error("invalid content unit name"); } - const auto runtime = content.getPackRuntime(name.substr(0, pos)); + const auto runtime = content.getPackRuntime(scriptName.substr(0, pos)); const auto& pack = runtime->getInfo(); const auto& folder = pack.folder; auto scriptfile = folder / ("scripts/" + def.scriptName + ".lua"); if (io::is_regular_file(scriptfile)) { scripting::load_content_script( runtime->getEnvironment(), - name, + def.name, scriptfile, def.scriptFile, def.rt.funcsset From eba7eed8c0987661b2ef556a98b1ca17becf1afa Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 19 Aug 2025 19:40:16 +0300 Subject: [PATCH 2/2] fix: network events not processing (#591) --- res/scripts/stdlib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/scripts/stdlib.lua b/res/scripts/stdlib.lua index aea785ac..1ad98cac 100644 --- a/res/scripts/stdlib.lua +++ b/res/scripts/stdlib.lua @@ -36,7 +36,6 @@ local function complete_app_lib(app) app.set_setting = core.set_setting app.tick = function() coroutine.yield() - network.__process_events() end app.get_version = core.get_version app.get_setting_info = core.get_setting_info @@ -520,6 +519,8 @@ function __process_post_runnables() for _, name in ipairs(dead) do __vc_named_coroutines[name] = nil end + + network.__process_events() end function time.post_runnable(runnable)