Merge pull request #163 from moelrobi/server-park-mods

Dedicated server: park mods as server-owned objects
This commit is contained in:
zeex64 authored and GitHub committed 2026-10-11 13:20:30 -05:00
commit 0b28dbd7c9
25 files changed
+1525 -9

No files matched your search

+7
View File
@@ -176,6 +176,13 @@ bool ServerEngine::load_environment(const std::filesystem::path& folder, const s
renamed = true;
}
}
for (auto &park : config_.park_mods) { // and so are the maps the park mods belong to
if (const auto *level = find_level(park.map); level && level->name != park.map) {
park.map = level->name;
renamed = true;
}
}
config_.mods = folder_ / "Mods";
if (renamed) try { save_config(config_); } catch (...) {}
if (const auto error = config_error(config_); !error.empty()) {
std::string err = "Config problem: " + error;