diff options
| -rw-r--r-- | locale/en.ini | 3 | ||||
| -rw-r--r-- | server/tools/src/map_linter.rs | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/locale/en.ini b/locale/en.ini index 34bb71e9..4199cfc4 100644 --- a/locale/en.ini +++ b/locale/en.ini @@ -325,12 +325,13 @@ s.state.paused.any_not_ready=Waiting for {0} players… s.tool.map_linter.chair_no_customer_access=Chair at {0} is not accessible by customers. s.tool.map_linter.chair_no_table=Chair at {0} has no interactable tile around. s.tool.map_linter.exclusive_no_recipe=Tile {0} is exclusive but is missing recipes. +s.tool.map_linter.exclusive=Tile {0} is recipe exclusive. +s.tool.map_linter.missing_tile=Map is missing required tile {0}. s.tool.map_linter.no_chef_access=Tile {0} at {1} is not accessible by chefs. s.tool.map_linter.no_demands=No demands are possible. s.tool.map_linter.no_easy_access=Tile {0} at {1} is not easily accessible. s.tool.map_linter.not_collider=Tile {0} can be interacted with. s.tool.map_linter.not_exclusive=Tile {0} is not recipe exclusive. -s.tool.map_linter.exclusive=Tile {0} is recipe exclusive. s.tool.map_linter.not_walkable=Tile {0} has collision. s.tool.map_linter.ok=Map {0} looks alright. s.tool.map_linter.title=Map {0} has {1} potential problems: 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")); } |