world.lua script

This commit is contained in:
MihailRis
2024-01-26 18:37:10 +03:00
parent 5d6c2b9b8e
commit abc3e47feb
7 changed files with 68 additions and 2 deletions
+6
View File
@@ -276,6 +276,12 @@ void ContentLoader::load(ContentBuilder* builder) {
fixPackIndices();
auto folder = pack->folder;
fs::path scriptFile = folder/fs::path("scripts/world.lua");
if (fs::is_regular_file(scriptFile)) {
scripting::load_world_script(pack->id, scriptFile);
}
if (!fs::is_regular_file(pack->getContentFile()))
return;
auto root = files::read_json(pack->getContentFile());