fix: 无法热更

This commit is contained in:
uye
2025-04-27 03:17:01 +08:00
parent b9018942f2
commit 328153c11b
2 changed files with 6 additions and 0 deletions

View File

@@ -167,6 +167,11 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path)
// 重要的资源,实时加载(图片还是惰性的)
LoadResourceWithTemplAndCheckRet(TaskData, "tasks"_p, "template"_p);
// 热更是旧格式,现在这个实现很屎,但是可以利用一下屎
if (m_loaded) {
LoadResourceWithTemplAndCheckRet(TaskData, "tasks.json"_p, "template"_p);
}
// 下面这几个资源都是会带OTA功能的路径不能动
LoadResourceWithTemplAndCheckRet(InfrastConfig, "infrast.json"_p, "template"_p / "infrast"_p);
LoadResourceWithTemplAndCheckRet(ItemConfig, "item_index.json"_p, "template"_p / "items"_p);