mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/build.rs b/build.rs
index a023dc5..3921cad 100644
--- a/build.rs
+++ b/build.rs
@@ -22,6 +22,13 @@ fn main() {
for mut f in [&full, &eigh, &quar] {
f.write_all(b"phf::phf_map! {\n").unwrap();
}
+ for i in 1..=16 {
+ n += 1;
+ writeln!(full, r#" "build{}" => &EMPTY_FULL,"#, i).unwrap();
+ writeln!(quar, r#" "build{}" => &EMPTY_QUAR,"#, i).unwrap();
+ writeln!(eigh, r#" "build{}" => &EMPTY_EIGH,"#, i).unwrap();
+ }
+
for e in walkdir.into_iter().filter_map(|e| e.ok()) {
let path = e.path();
if path.is_file() && let Some(e) = path.extension() && e == "png" {
@@ -53,8 +60,8 @@ fn main() {
let x = new.width();
let y = new.height();
buf.write_all(&new.into_raw()).unwrap();
- writeln!($ext,
- r#" "{path}" => r!(LazyLock::new(|| RgbaImage::from_vec({x}, {y}, include_bytes!(concat!(env!("OUT_DIR"), "/{n}-{}")).to_vec()).unwrap())),"#,
+ writeln!($ext,
+ r#" "{path}" => r!(RgbaImage::from_vec({x}, {y}, include_bytes!(concat!(env!("OUT_DIR"), "/{n}-{}")).to_vec()).unwrap()),"#,
stringify!($ext)
).unwrap();
};