diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-01-24 18:43:49 +0100 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2026-02-26 20:49:13 +0100 |
| commit | 28e1cfa50847de1a7347531054bd62c88f304678 (patch) | |
| tree | 25626a8df6b01a2a8f3174d75de42008b9126d8c /server/tools/src/main.rs | |
| parent | b9af9a5d862836051d07fad9803cb3d308968668 (diff) | |
| download | hurrycurry-28e1cfa50847de1a7347531054bd62c88f304678.tar hurrycurry-28e1cfa50847de1a7347531054bd62c88f304678.tar.bz2 hurrycurry-28e1cfa50847de1a7347531054bd62c88f304678.tar.zst | |
update server to new tile stacks
Diffstat (limited to 'server/tools/src/main.rs')
| -rw-r--r-- | server/tools/src/main.rs | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/server/tools/src/main.rs b/server/tools/src/main.rs index 4af6b87f..78d3190c 100644 --- a/server/tools/src/main.rs +++ b/server/tools/src/main.rs @@ -19,19 +19,18 @@ pub mod diagram_dot; pub mod graph; pub mod graph_summary; -pub mod map_linter; +// pub mod map_linter; use crate::{ diagram_dot::{diagram_dot, diagram_dot_svg}, graph::graph, graph_summary::graph_summary, - map_linter::check_map, }; use anyhow::Result; use clap::Parser; use hurrycurry_data::{ book::{diagram_layout::diagram_layout, recipe_diagram::recipe_diagram}, - index::DataIndex, + build_data, }; #[derive(Parser)] @@ -65,8 +64,7 @@ fn main() -> Result<()> { Action::Graph => graph()?, Action::GraphSummary => graph_summary()?, Action::GraphSingle { out, dot_out } => { - let index = DataIndex::new("data".into())?; - let (data, serverdata) = index.generate("5star")?; + let (data, serverdata) = build_data("data".as_ref(), "5star", true)?; let out = data.get_item_by_name(&out).unwrap(); let mut diagram = recipe_diagram(&data, &serverdata, &[out])?; let out = if dot_out { @@ -78,35 +76,33 @@ fn main() -> Result<()> { println!("{out}"); } Action::MapDemands { map } => { - let index = DataIndex::new("data".into())?; - let (data, _) = index.generate(&map)?; + let (data, _) = build_data("data".as_ref(), &map, true)?; for demand in &data.demands { println!("{}", data.item_name(demand.input)) } } Action::MapItems { map } => { - let index = DataIndex::new("data".into())?; - let (data, _) = index.generate(&map)?; + let (data, _) = build_data("data".as_ref(), &map, true)?; + for name in &data.item_names { println!("{name}") } } Action::MapTiles { map } => { - let index = DataIndex::new("data".into())?; - let (data, _) = index.generate(&map)?; + let (data, _) = build_data("data".as_ref(), &map, true)?; for name in &data.tile_names { println!("{name}") } } - Action::CheckMap { map } => { - if map == "all" { - let index = DataIndex::new("data".into())?; - for map in index.maps.keys() { - check_map(map)?; - } - } else { - check_map(&map)?; - } + Action::CheckMap { map: _ } => { + // if map == "all" { + // let index = DataIndex::new("data".into())?; + // for map in index.maps.keys() { + // check_map(map)?; + // } + // } else { + // check_map(&map)?; + // } } } Ok(()) |