diff options
author | metamuffin <metamuffin@disroot.org> | 2025-09-21 22:55:38 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-09-21 22:55:41 +0200 |
commit | 578339717d584ce132695eb86a58f78a6b21bd33 (patch) | |
tree | d211b18b28d8ac449f3e00cd8a362884a55320e5 /server | |
parent | e8ba490376c421e727f735c3d91d048f685b442e (diff) | |
download | hurrycurry-578339717d584ce132695eb86a58f78a6b21bd33.tar hurrycurry-578339717d584ce132695eb86a58f78a6b21bd33.tar.bz2 hurrycurry-578339717d584ce132695eb86a58f78a6b21bd33.tar.zst |
Add map-demands tool
Diffstat (limited to 'server')
-rw-r--r-- | server/tools/src/main.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/tools/src/main.rs b/server/tools/src/main.rs index 4e5c5787..2836325e 100644 --- a/server/tools/src/main.rs +++ b/server/tools/src/main.rs @@ -39,6 +39,7 @@ enum Action { GraphSummary, Book, BookHtml, + MapDemands { map: String }, } fn main() -> Result<()> { @@ -60,6 +61,14 @@ fn main() -> Result<()> { let book = book(&data, &serverdata)?; println!("{}", render_html_book(&data, &book)) } + Action::MapDemands { map } => { + let mut index = DataIndex::default(); + index.reload()?; + let (data, _, _) = index.generate(&map)?; + for demand in &data.demands { + println!("- {}", data.item_name(demand.input)) + } + } } Ok(()) |