From 743f61a92ca6b7e2e38bca9fdf14d812230b37a0 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 16 Jun 2023 17:04:43 -0400 Subject: [PATCH] lockRotation --- core/src/mindustry/world/Block.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 92ff8aedb3..126a269cc5 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -108,7 +108,7 @@ public class Block extends UnlockableContent implements Senseable{ public boolean rotate; /** if rotate is true and this is false, the region won't rotate when drawing */ public boolean rotateDraw = true; - /** if rotation = false and this is true, rotation will be locked at 0 when placing (default); advanced use only */ + /** if rotate = false and this is true, rotation will be locked at 0 when placing (default); advanced use only */ public boolean lockRotation = true; /** if true, schematic flips with this block are inverted. */ public boolean invertFlip = false; @@ -1344,8 +1344,7 @@ public class Block extends UnlockableContent implements Senseable{ } public int planRotation(int rot){ - if(!rotate) return 0; - return rot; + return !rotate && lockRotation ? 0 : rot; } public void flipRotation(BuildPlan req, boolean x){