update lua chunks sources to the engine format

This commit is contained in:
MihailRis
2024-11-18 14:05:45 +03:00
parent 801650824e
commit e3cb736519
9 changed files with 95 additions and 26 deletions
+3 -2
View File
@@ -144,7 +144,8 @@ State* lua::create_state(const EnginePaths& paths, StateType stateType) {
init_state(L, stateType);
auto resDir = paths.getResourcesFolder();
auto src = files::read_string(resDir / fs::u8path("scripts/stdmin.lua"));
lua::pop(L, lua::execute(L, 0, src, "<stdmin>"));
auto file = resDir / fs::u8path("scripts/stdmin.lua");
auto src = files::read_string(file);
lua::pop(L, lua::execute(L, 0, src, "core:scripts/stdmin.lua"));
return L;
}