Misc fixes
This commit is contained in:
@@ -132,7 +132,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
//draw plan being moved
|
//draw plan being moved
|
||||||
if(splan != null){
|
if(splan != null){
|
||||||
boolean valid = validPlace(splan.x, splan.y, splan.block, splan.rotation, splan);
|
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);
|
drawArrow(splan.block, splan.x, splan.y, splan.rotation, valid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
if(mode == placing && block != null){
|
if(mode == placing && block != null){
|
||||||
for(int i = 0; i < linePlans.size; i++){
|
for(int i = 0; i < linePlans.size; i++){
|
||||||
var plan = linePlans.get(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);
|
drawArrow(block, plan.x, plan.y, plan.rotation);
|
||||||
}
|
}
|
||||||
drawPlan(linePlans.get(i));
|
drawPlan(linePlans.get(i));
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
//rotate button
|
//rotate button
|
||||||
table.button(Icon.right, Styles.clearNoneTogglei, () -> {
|
table.button(Icon.right, Styles.clearNoneTogglei, () -> {
|
||||||
if(block != null && block.rotate){
|
if(block != null && block.rotate && block.quickRotate){
|
||||||
rotation = Mathf.mod(rotation + 1, 4);
|
rotation = Mathf.mod(rotation + 1, 4);
|
||||||
}else{
|
}else{
|
||||||
schematicMode = !schematicMode;
|
schematicMode = !schematicMode;
|
||||||
@@ -359,7 +359,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
//draw placing
|
//draw placing
|
||||||
for(int i = 0; i < linePlans.size; i++){
|
for(int i = 0; i < linePlans.size; i++){
|
||||||
BuildPlan plan = linePlans.get(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);
|
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);
|
plan.block.drawPlan(plan, allPlans(), validPlace(plan.x, plan.y, plan.block, plan.rotation) && getPlan(plan.x, plan.y, plan.block.size, null) == null);
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
public boolean rotate;
|
public boolean rotate;
|
||||||
/** if rotate is true and this is false, the region won't rotate when drawing */
|
/** if rotate is true and this is false, the region won't rotate when drawing */
|
||||||
public boolean rotateDraw = true;
|
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. */
|
/** if true, schematic flips with this block are inverted. */
|
||||||
public boolean invertFlip = false;
|
public boolean invertFlip = false;
|
||||||
/** number of different variant regions to use */
|
/** number of different variant regions to use */
|
||||||
|
|||||||
Reference in New Issue
Block a user