mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/drills.rs')
-rw-r--r--src/block/drills.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/block/drills.rs b/src/block/drills.rs
index 6952157..b042ceb 100644
--- a/src/block/drills.rs
+++ b/src/block/drills.rs
@@ -7,16 +7,18 @@ make_simple!(
|_, name, _, _, rot: Rotation, s| {
let mut base =
load!(from name which is ["large-plasma-bore" | "plasma-bore" | "cliff-crusher"], s);
- unsafe {
- base.overlay(load!(concat "top" => name which is ["large-plasma-bore" | "plasma-bore" | "cliff-crusher"], s).rotate(rot.rotated(false).count()) )
- };
+ let mut top = load!(concat "top" => name which is ["large-plasma-bore" | "plasma-bore" | "cliff-crusher"], s);
+ unsafe { top.rotate(rot.rotated(false).count()) };
+ unsafe { base.overlay(&top) };
base
},
|_, buff: &mut DataRead| read_drill(buff)
);
make_simple!(WallDrillBlock, |_, _, _, _, rot: Rotation, scl| {
let mut base = load!("cliff-crusher", scl);
- unsafe { base.overlay(load!("cliff-crusher-top", scl).rotate(rot.rotated(false).count())) };
+ let mut top = load!("cliff-crusher-top", scl);
+ unsafe { top.rotate(rot.rotated(false).count()) };
+ unsafe { base.overlay(&top) };
base
});