aboutsummaryrefslogtreecommitdiff
path: root/server/tools/src/main.rs
diff options
context:
space:
mode:
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(())
}