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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2G4APEkhHgVs59RDL3XWD
This commit is contained in:
Robin MöllerandClaude Opus 5.5 committed 2026-10-11 17:46:32 +00:00
1 parent 6a8cbe8156
commit c3751b9714
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -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");
+1 -1
View File
@@ -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.");