mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/production.rs')
-rw-r--r--src/block/production.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/block/production.rs b/src/block/production.rs
index 6037427..333290a 100644
--- a/src/block/production.rs
+++ b/src/block/production.rs
@@ -52,20 +52,20 @@ make_simple!(
// electrolyzer exclusive
// ozone <- e(^) -> hydrogen
let mut base = load!("electrolyzer", s);
- base.overlay(
+ base.overlay(unsafe {
load!(s -> match r {
Rotation::Up | Rotation::Left => "electrolyzer-hydrogen-output1"
Rotation::Down | Rotation::Right => "electrolyzer-hydrogen-output2"
})
- .rotate(r.count()),
- );
- base.overlay(
+ .rotate(r.count())
+ });
+ base.overlay(unsafe {
load!(s -> match r {
Rotation::Down | Rotation::Right => "electrolyzer-ozone-output1"
Rotation::Up | Rotation::Left => "electrolyzer-ozone-output2"
})
- .rotate(r.mirrored(true, true).count()),
- );
+ .rotate(r.mirrored(true, true).count())
+ });
base
},
|b: &mut Build<'_>, _, _, buff: &mut DataRead| {
@@ -82,10 +82,10 @@ make_simple!(
HeatCrafter,
|_, n, _, _, r: Rotation, s| {
let mut base = load!(from n which is ["phase-heater" | "electric-heater" | "oxidation-chamber" | "slag-heater" | "heat-source"], s);
- base.overlay(match r {
+ base.overlay(unsafe { match r {
Rotation::Up | Rotation::Right => load!(concat top1 => n which is ["phase-heater" | "electric-heater" | "oxidation-chamber" | "slag-heater" | "heat-source"], s),
Rotation::Down | Rotation::Left => load!(concat top2 => n which is ["phase-heater" | "electric-heater" | "oxidation-chamber" | "slag-heater" | "heat-source"], s)
- }.rotate(r.rotated(false).count()));
+ }.rotate(r.rotated(false).count())});
base
},
|_, _, _, buff: &mut DataRead| {
@@ -99,7 +99,7 @@ make_simple!(
);
make_simple!(HeatConduit, |_, n, _, _, r: Rotation, s| {
let mut base = load!(from n which is ["heat-router" | "heat-redirector"], s);
- base.overlay(
+ base.overlay(unsafe {
match r {
Rotation::Up | Rotation::Right => {
load!(concat top1 => n which is ["heat-router" | "heat-redirector"], s)
@@ -108,7 +108,7 @@ make_simple!(HeatConduit, |_, n, _, _, r: Rotation, s| {
load!(concat top2 => n which is ["heat-router" | "heat-redirector"], s)
}
}
- .rotate(r.rotated(false).count()),
- );
+ .rotate(r.rotated(false).count())
+ });
base
});