diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/tools/src/main.rs | 21 | ||||
-rw-r--r-- | server/tools/src/recipe_diagram.rs | 1 |
2 files changed, 19 insertions, 3 deletions
diff --git a/server/tools/src/main.rs b/server/tools/src/main.rs index 96ecf46a..3ef72658 100644 --- a/server/tools/src/main.rs +++ b/server/tools/src/main.rs @@ -44,6 +44,8 @@ enum Action { Book, BookHtml, MapDemands { map: String }, + MapItems { map: String }, + MapTiles { map: String }, } fn main() -> Result<()> { @@ -78,10 +80,25 @@ fn main() -> Result<()> { index.reload()?; let (data, _, _) = index.generate(&map)?; for demand in &data.demands { - println!("- {}", data.item_name(demand.input)) + println!("{}", data.item_name(demand.input)) + } + } + Action::MapItems { map } => { + let mut index = DataIndex::default(); + index.reload()?; + let (data, _, _) = index.generate(&map)?; + for name in &data.item_names { + println!("{}", name) + } + } + Action::MapTiles { map } => { + let mut index = DataIndex::default(); + index.reload()?; + let (data, _, _) = index.generate(&map)?; + for name in &data.tile_names { + println!("{}", name) } } } - Ok(()) } diff --git a/server/tools/src/recipe_diagram.rs b/server/tools/src/recipe_diagram.rs index 453fedc6..cdc6a942 100644 --- a/server/tools/src/recipe_diagram.rs +++ b/server/tools/src/recipe_diagram.rs @@ -108,7 +108,6 @@ pub(crate) fn recipe_diagram( }); for i in r.inputs { - eprintln!("{}", data.item_name(i)); diag.edges.push(DiagramEdge { src: item_index[&i], dst: index, |