scriptenv?

This commit is contained in:
MihailRis
2024-04-21 15:41:47 +03:00
parent d213902648
commit 635e512142
26 changed files with 128 additions and 158 deletions
+2 -3
View File
@@ -16,7 +16,6 @@
#include "../content/Content.h"
#include "../content/ContentPack.h"
#include "../logic/scripting/scripting.h"
#include "../logic/scripting/Environment.h"
static debug::Logger logger("assets-loader");
@@ -69,7 +68,7 @@ bool AssetsLoader::loadNext() {
}
}
void addLayouts(int env, const std::string& prefix, const fs::path& folder, AssetsLoader& loader) {
void addLayouts(scriptenv env, const std::string& prefix, const fs::path& folder, AssetsLoader& loader) {
if (!fs::is_directory(folder)) {
return;
}
@@ -197,7 +196,7 @@ void AssetsLoader::addDefaults(AssetsLoader& loader, const Content* content) {
auto pack = entry.second.get();
auto& info = pack->getInfo();
fs::path folder = info.folder / fs::path("layouts");
addLayouts(pack->getEnvironment()->getId(), info.id, folder, loader);
addLayouts(pack->getEnvironment(), info.id, folder, loader);
}
}
loader.add(AssetType::atlas, TEXTURES_FOLDER+"/blocks", "blocks");