From 1bce88f12244564a45a3aefa3bf51974fda4b4f4 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 12 Oct 2025 22:32:06 +0200 Subject: reimplement diagram layouting --- server/tools/src/diagram_dot.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/tools') diff --git a/server/tools/src/diagram_dot.rs b/server/tools/src/diagram_dot.rs index 307fa470..33b1a1fb 100644 --- a/server/tools/src/diagram_dot.rs +++ b/server/tools/src/diagram_dot.rs @@ -31,6 +31,7 @@ pub fn diagram_dot_svg(data: &Gamedata, diagram: &Diagram) -> Result { let mut child = Command::new("dot") .arg("-Tsvg") .arg("-Knop2") + .current_dir("target/book") .stdin(Stdio::piped()) .stdout(Stdio::piped()) .spawn()?; @@ -59,7 +60,7 @@ pub fn diagram_dot(data: &Gamedata, diagram: &Diagram, use_position: bool) -> Re } Message::Item(item_index) => { attrs.push(format!( - "image=\"/tmp/items/{}.png\"", + "image=\"items/{}.png\"", data.item_name(*item_index) )); attrs.push("imagescale=true".to_owned()); @@ -70,7 +71,7 @@ pub fn diagram_dot(data: &Gamedata, diagram: &Diagram, use_position: bool) -> Re } Message::Tile(tile_index) => { attrs.push(format!( - "image=\"/tmp/tiles/{}.png\"", + "image=\"tiles/{}.png\"", data.tile_name(*tile_index) )); attrs.push("imagescale=true".to_owned()); -- cgit v1.3