aboutsummaryrefslogtreecommitdiff
path: root/server/tools/src/main.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-30 20:31:58 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-30 20:31:58 +0200
commit080672a5fee18336971fa18ab35bb82fb62a0225 (patch)
tree526daff5cb4a8891e586f7f2810bbda102839e6c /server/tools/src/main.rs
parent9753f61af5e236dbc650145eb498cf369afc59d0 (diff)
downloadhurrycurry-080672a5fee18336971fa18ab35bb82fb62a0225.tar
hurrycurry-080672a5fee18336971fa18ab35bb82fb62a0225.tar.bz2
hurrycurry-080672a5fee18336971fa18ab35bb82fb62a0225.tar.zst
Add map linter
Diffstat (limited to 'server/tools/src/main.rs')
-rw-r--r--server/tools/src/main.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tools/src/main.rs b/server/tools/src/main.rs
index a18051b0..03de90b3 100644
--- a/server/tools/src/main.rs
+++ b/server/tools/src/main.rs
@@ -22,6 +22,7 @@ pub mod diagram_dot;
pub mod diagram_layout;
pub mod graph;
pub mod graph_summary;
+pub mod map_linter;
pub mod recipe_diagram;
use crate::{
@@ -30,6 +31,7 @@ use crate::{
diagram_dot::diagram_dot,
graph::graph,
graph_summary::graph_summary,
+ map_linter::check_map,
recipe_diagram::recipe_diagram,
};
use anyhow::Result;
@@ -46,6 +48,7 @@ enum Action {
MapDemands { map: String },
MapItems { map: String },
MapTiles { map: String },
+ CheckMap { map: String },
}
fn main() -> Result<()> {
@@ -99,6 +102,17 @@ fn main() -> Result<()> {
println!("{name}")
}
}
+ Action::CheckMap { map } => {
+ if map == "all" {
+ let mut index = DataIndex::default();
+ index.reload()?;
+ for map in index.maps.keys() {
+ check_map(&map)?;
+ }
+ } else {
+ check_map(&map)?;
+ }
+ }
}
Ok(())
}