aboutsummaryrefslogtreecommitdiff
path: root/server/tools
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-12 22:32:06 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-12 22:32:09 +0200
commit1bce88f12244564a45a3aefa3bf51974fda4b4f4 (patch)
treef69c8e21caf67be136ede3e456ae8c7cf50bb900 /server/tools
parent127124fabf23e2dcb13326ed633e741fa9d7db16 (diff)
downloadhurrycurry-1bce88f12244564a45a3aefa3bf51974fda4b4f4.tar
hurrycurry-1bce88f12244564a45a3aefa3bf51974fda4b4f4.tar.bz2
hurrycurry-1bce88f12244564a45a3aefa3bf51974fda4b4f4.tar.zst
reimplement diagram layouting
Diffstat (limited to 'server/tools')
-rw-r--r--server/tools/src/diagram_dot.rs5
1 files changed, 3 insertions, 2 deletions
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<String> {
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());