add compatibility with other files

This commit is contained in:
alexei-zebra
2024-08-06 15:51:55 +03:00
parent 62125b14b4
commit 91ad9cc64c
9 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ 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()->getResources().u8string() + "/";
auto folder = engine->getPaths()->getResourcesFolder().u8string() + "/";
return lua::pushstring(L, folder);
}
for (auto& pack : engine->getContentPacks()) {
+1 -1
View File
@@ -71,7 +71,7 @@ static int l_world_get_seed(lua::State* L) {
static int l_world_exists(lua::State* L) {
auto name = lua::require_string(L, 1);
auto worldsDir = engine->getPaths()->getWorldFolder(name);
auto worldsDir = engine->getPaths()->getWorldFolderByName(name);
return lua::pushboolean(L, fs::is_directory(worldsDir));
}