mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/exe/map.rs')
-rw-r--r--src/exe/map.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/exe/map.rs b/src/exe/map.rs
index 92653d8..c85039d 100644
--- a/src/exe/map.rs
+++ b/src/exe/map.rs
@@ -14,7 +14,12 @@ pub fn main(args: Args) {
match ms.deserialize(&mut DataRead::new(&s)) {
Err(e) => print_err!(e, "fail"),
Ok(m) => {
- m.render().save("x.png").unwrap();
+ let o = m.render();
+ if let Ok(v) = std::env::var("SAVE") {
+ if v == "1" {
+ o.save("x.png").unwrap();
+ }
+ }
}
}
}