This commit is contained in:
MihailRis 2026-02-03 14:00:58 +03:00
parent 895a496f6e
commit 2475a7e8f5
20 changed files with 88 additions and 79 deletions

View file

@ -133,9 +133,8 @@ static void check_world(const EnginePaths& paths, const io::path& folder) {
}
static const Content* load_world_content(Engine& engine, const io::path& folder) {
auto& paths = engine.getPaths();
const auto& paths = engine.getPaths();
auto& contentControl = engine.getContentControl();
paths.setCurrentWorldFolder(folder);
check_world(paths, folder);
call(engine, [&contentControl]() {
@ -221,9 +220,10 @@ static void confirm(
}
void EngineController::openWorld(const std::string& name, bool confirmConvert) {
const auto& paths = engine.getPaths();
auto& paths = engine.getPaths();
auto& debugSettings = engine.getSettings().debug;
auto folder = paths.getWorldsFolder() / name;
paths.setCurrentWorldFolder(folder);
auto content = load_world_content(engine, folder);
auto worldFiles = std::make_shared<WorldFiles>(folder, debugSettings);