From c3751b9714ecb1bf5c1ff4f979a9bf0bc22d8398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20M=C3=B6ller?= Date: Sat, 10 Oct 2026 16:21:46 +0000 Subject: [PATCH] Park mods: name the Mods folder, not the server's path - A missing mod folder reads "The mod folder "x" is not in the Mods folder." instead of printing where the server is installed; the reason can reach chat through an admin's command or a vote - server_park_mods checks the exact message Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Y2G4APEkhHgVs59RDL3XWD --- Server/Test/server_park_tests.cpp | 4 +++- Server/server_parks.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Server/Test/server_park_tests.cpp b/Server/Test/server_park_tests.cpp index 5127202..ab8d539 100644 --- a/Server/Test/server_park_tests.cpp +++ b/Server/Test/server_park_tests.cpp @@ -195,7 +195,9 @@ int run(const std::filesystem::path &fixtures) { } return false; }; - check(refused({"x", "not installed", "San Vansterdam", "bam"}, "is not in"), "A missing mod folder was not reported"); + // Said without the server's own paths: the reason can reach chat (an admin, a vote). + check(refused({"x", "not installed", "San Vansterdam", "bam"}, "The mod folder \"not installed\" is not in the Mods folder."), + "A missing mod folder was not reported, or named the server's path"); check(refused({"x", "popular skate 2 street park", "Isle of Grom", "grom"}, "has no park for grom"), "A missing park file was not reported"); check(refused({"x", "two maps", "San Vansterdam", ""}, "set \"key\""), "A mod with parks for two maps did not ask for a key"); check(load_park_mod(fixtures, {"x", "two maps", "Super Ultra Mega Resort", "mpr"}).objects.size() == 3, "A park chosen by its key did not load"); diff --git a/Server/server_parks.cpp b/Server/server_parks.cpp index 004ec49..42abbbd 100644 --- a/Server/server_parks.cpp +++ b/Server/server_parks.cpp @@ -45,7 +45,7 @@ LoadedPark load_park_mod(const fs::path &mods, const ParkMod &park) { const auto folder = mods / fs::path(park.folder); std::error_code error; if (!fs::is_directory(folder, error)) - throw std::runtime_error("The mod folder \"" + park.folder + "\" is not in " + path_utf8(mods) + "."); + throw std::runtime_error("The mod folder \"" + park.folder + "\" is not in the Mods folder."); const auto parks = folder / "parks"; LoadedPark loaded; if (!park.key.empty() && !valid_park_key(park.key)) throw std::runtime_error("\"" + park.key + "\" is not a base map's key.");