diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-03-01 21:55:16 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-03-01 21:55:16 +0100 |
| commit | 74ffa47147d2bb989057b4513075975c44c2bc42 (patch) | |
| tree | 0a2242b25fefcf62f94ac6b712c9e937e3b8e35c /server/tools | |
| parent | d6acbd76a81bb97c1ff74a66a2af9b00713ca6d0 (diff) | |
| download | hurrycurry-74ffa47147d2bb989057b4513075975c44c2bc42.tar hurrycurry-74ffa47147d2bb989057b4513075975c44c2bc42.tar.bz2 hurrycurry-74ffa47147d2bb989057b4513075975c44c2bc42.tar.zst | |
add serverdata packet with data fields that dont change across games; add motd and server name
Diffstat (limited to 'server/tools')
| -rw-r--r-- | server/tools/src/graph.rs | 4 | ||||
| -rw-r--r-- | server/tools/src/graph_summary.rs | 4 | ||||
| -rw-r--r-- | server/tools/src/main.rs | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/server/tools/src/graph.rs b/server/tools/src/graph.rs index 7e70d1c8..72eab3fe 100644 --- a/server/tools/src/graph.rs +++ b/server/tools/src/graph.rs @@ -16,13 +16,13 @@ */ use anyhow::Result; -use hurrycurry_data::build_data; +use hurrycurry_data::build_gamedata; use hurrycurry_protocol::{Demand, ItemIndex, Recipe, RecipeIndex}; pub(crate) fn graph() -> Result<()> { println!("digraph {{"); - let (data, _) = build_data("data".as_ref(), "5star", true)?; + let (data, _) = build_gamedata("data".as_ref(), "5star", true)?; for i in 0..data.item_names.len() { println!("i{i} [label=\"{}\"]", data.item_name(ItemIndex(i))) } diff --git a/server/tools/src/graph_summary.rs b/server/tools/src/graph_summary.rs index 82ecb8c1..2227a1c4 100644 --- a/server/tools/src/graph_summary.rs +++ b/server/tools/src/graph_summary.rs @@ -17,14 +17,14 @@ */ use anyhow::Result; -use hurrycurry_data::build_data; +use hurrycurry_data::build_gamedata; use hurrycurry_protocol::{ItemIndex, Recipe, TileIndex}; use std::collections::HashSet; pub(crate) fn graph_summary() -> Result<()> { println!("digraph {{"); - let (data, sdata) = build_data("data".as_ref(), "5star", true)?; + let (data, sdata) = build_gamedata("data".as_ref(), "5star", true)?; struct Node { inputs: Vec<ItemIndex>, diff --git a/server/tools/src/main.rs b/server/tools/src/main.rs index 78d3190c..2c45f57b 100644 --- a/server/tools/src/main.rs +++ b/server/tools/src/main.rs @@ -30,7 +30,7 @@ use anyhow::Result; use clap::Parser; use hurrycurry_data::{ book::{diagram_layout::diagram_layout, recipe_diagram::recipe_diagram}, - build_data, + build_gamedata, }; #[derive(Parser)] @@ -64,7 +64,7 @@ fn main() -> Result<()> { Action::Graph => graph()?, Action::GraphSummary => graph_summary()?, Action::GraphSingle { out, dot_out } => { - let (data, serverdata) = build_data("data".as_ref(), "5star", true)?; + let (data, serverdata) = build_gamedata("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 { @@ -76,20 +76,20 @@ fn main() -> Result<()> { println!("{out}"); } Action::MapDemands { map } => { - let (data, _) = build_data("data".as_ref(), &map, true)?; + let (data, _) = build_gamedata("data".as_ref(), &map, true)?; for demand in &data.demands { println!("{}", data.item_name(demand.input)) } } Action::MapItems { map } => { - let (data, _) = build_data("data".as_ref(), &map, true)?; + let (data, _) = build_gamedata("data".as_ref(), &map, true)?; for name in &data.item_names { println!("{name}") } } Action::MapTiles { map } => { - let (data, _) = build_data("data".as_ref(), &map, true)?; + let (data, _) = build_gamedata("data".as_ref(), &map, true)?; for name in &data.tile_names { println!("{name}") } |