add compatibility with other files
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user