diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index 70277ef24e..498d4d46e8 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -132,7 +132,7 @@ public class DesktopInput extends InputHandler{ //draw plan being moved if(splan != null){ boolean valid = validPlace(splan.x, splan.y, splan.block, splan.rotation, splan); - if(splan.block.rotate){ + if(splan.block.rotate && splan.block.drawArrow){ drawArrow(splan.block, splan.x, splan.y, splan.rotation, valid); } @@ -171,7 +171,7 @@ public class DesktopInput extends InputHandler{ if(mode == placing && block != null){ for(int i = 0; i < linePlans.size; i++){ var plan = linePlans.get(i); - if(i == linePlans.size - 1 && plan.block.rotate){ + if(i == linePlans.size - 1 && plan.block.rotate && plan.block.drawArrow){ drawArrow(block, plan.x, plan.y, plan.rotation); } drawPlan(linePlans.get(i)); diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index 126032c5e1..7fe38030a1 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -201,7 +201,7 @@ public class MobileInput extends InputHandler implements GestureListener{ //rotate button table.button(Icon.right, Styles.clearNoneTogglei, () -> { - if(block != null && block.rotate){ + if(block != null && block.rotate && block.quickRotate){ rotation = Mathf.mod(rotation + 1, 4); }else{ schematicMode = !schematicMode; @@ -359,7 +359,7 @@ public class MobileInput extends InputHandler implements GestureListener{ //draw placing for(int i = 0; i < linePlans.size; i++){ BuildPlan plan = linePlans.get(i); - if(i == linePlans.size - 1 && plan.block.rotate){ + if(i == linePlans.size - 1 && plan.block.rotate && plan.block.drawArrow){ drawArrow(block, plan.x, plan.y, plan.rotation); } plan.block.drawPlan(plan, allPlans(), validPlace(plan.x, plan.y, plan.block, plan.rotation) && getPlan(plan.x, plan.y, plan.block.size, null) == null); diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index cb149be40a..25d5912b4d 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -108,6 +108,8 @@ 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 */ + public boolean lockRotation = true; /** if true, schematic flips with this block are inverted. */ public boolean invertFlip = false; /** number of different variant regions to use */