aboutsummaryrefslogtreecommitdiff
path: root/server/tools
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-16 17:44:03 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-16 17:44:07 +0200
commit6f2ce5ccaaf2de118c4689502ab53491ad9605be (patch)
treed97a701838b5981435b3c8a7e6b60cee2c7e2f15 /server/tools
parent1e5a05b1e33749ff0a6ecb4b24b992f54f1b0410 (diff)
downloadhurrycurry-6f2ce5ccaaf2de118c4689502ab53491ad9605be.tar
hurrycurry-6f2ce5ccaaf2de118c4689502ab53491ad9605be.tar.bz2
hurrycurry-6f2ce5ccaaf2de118c4689502ab53491ad9605be.tar.zst
Add required tiles check
Diffstat (limited to 'server/tools')
-rw-r--r--server/tools/src/map_linter.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tools/src/map_linter.rs b/server/tools/src/map_linter.rs
index ca0d54a1..c33bb6ed 100644
--- a/server/tools/src/map_linter.rs
+++ b/server/tools/src/map_linter.rs
@@ -125,6 +125,7 @@ static NEED_EASY_ACCESS: &[&str] = &[
"stove",
"deep-fryer",
];
+static REQUIRED: &[&str] = &["chair", "book"];
static TILE_MODE: LazyLock<HashMap<String, TileMode>> = LazyLock::new(|| {
let mut out = HashMap::new();
@@ -247,6 +248,19 @@ pub fn check_map(map: &str) -> Result<()> {
}
}
+ for tile_name in REQUIRED {
+ let found = serverdata
+ .initial_map
+ .values()
+ .any(|(t, _)| data.tile_name(*t) == *tile_name);
+ if !found {
+ warnings.push(trm!(
+ "s.tool.map_linter.missing_tile",
+ s = tile_name.to_string()
+ ));
+ }
+ }
+
if data.demands.is_empty() {
warnings.push(trm!("s.tool.map_linter.no_demands"));
}