move biomes definition to a json file

This commit is contained in:
MihailRis
2024-09-29 22:03:37 +03:00
parent d62d66cf85
commit 3784b57eed
10 changed files with 183 additions and 184 deletions
+3 -5
View File
@@ -16,11 +16,9 @@ using namespace scripting;
static int l_pack_get_folder(lua::State* L) {
std::string packName = lua::tostring(L, 1);
if (packName == "core") {
auto folder = engine->getPaths()->getResourcesFolder().u8string() + "/";
return lua::pushstring(L, folder);
}
for (auto& pack : engine->getContentPacks()) {
auto packs = engine->getAllContentPacks();
for (auto& pack : packs) {
if (pack.id == packName) {
return lua::pushstring(L, pack.folder.u8string() + "/");
}