From 6f2ce5ccaaf2de118c4689502ab53491ad9605be Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 16 Oct 2025 17:44:03 +0200 Subject: Add required tiles check --- server/tools/src/map_linter.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'server/tools/src') 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> = 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")); } -- cgit v1.3