mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/power.rs')
| -rw-r--r-- | src/block/power.rs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/block/power.rs b/src/block/power.rs index ba29cb9..62f32f8 100644 --- a/src/block/power.rs +++ b/src/block/power.rs @@ -12,13 +12,15 @@ make_simple!( Neoplasia, |_, _, _, _, rot: Rotation, scl| { let mut base = load!("neoplasia-reactor", scl); - base.overlay(unsafe { - load!(scl -> match rot { - Rotation::Up | Rotation::Right => "neoplasia-reactor-top1", - Rotation::Down | Rotation::Left => "neoplasia-reactor-top2", - }) - .rotate(rot.rotated(false).count()) - }); + unsafe { + base.overlay( + load!(scl -> match rot { + Rotation::Up | Rotation::Right => "neoplasia-reactor-top1", + Rotation::Down | Rotation::Left => "neoplasia-reactor-top2", + }) + .rotate(rot.rotated(false).count()), + ) + }; base }, |_, _, _, buff: &mut DataRead| read_heater(buff) @@ -29,8 +31,10 @@ make_simple!(DiodeBlock, |_, _, _, _, rot: Rotation, s| { return base; } let mut top = load!("diode-arrow", s); - unsafe { top.rotate(rot.rotated(false).count()) }; - base.overlay(&top); + unsafe { + top.rotate(rot.rotated(false).count()); + base.overlay(&top) + }; base }); |