Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -237,6 +237,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
if(validPlace(plan.x, plan.y, plan.block, plan.rotation, null, true)){
|
if(validPlace(plan.x, plan.y, plan.block, plan.rotation, null, true)){
|
||||||
BuildPlan other = getPlan(plan.x, plan.y, plan.block.size, null);
|
BuildPlan other = getPlan(plan.x, plan.y, plan.block.size, null);
|
||||||
BuildPlan copy = plan.copy();
|
BuildPlan copy = plan.copy();
|
||||||
|
plan.block.onNewPlan(copy);
|
||||||
|
|
||||||
if(other == null){
|
if(other == null){
|
||||||
player.unit().addBuild(copy);
|
player.unit().addBuild(copy);
|
||||||
@@ -691,7 +692,6 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
}else if(mode == placing && isPlacing() && validPlace(cursor.x, cursor.y, block, rotation) && !checkOverlapPlacement(cursor.x, cursor.y, block)){
|
}else if(mode == placing && isPlacing() && validPlace(cursor.x, cursor.y, block, rotation) && !checkOverlapPlacement(cursor.x, cursor.y, block)){
|
||||||
//add to selection queue if it's a valid place position
|
//add to selection queue if it's a valid place position
|
||||||
selectPlans.add(lastPlaced = new BuildPlan(cursor.x, cursor.y, rotation, block, block.nextConfig()));
|
selectPlans.add(lastPlaced = new BuildPlan(cursor.x, cursor.y, rotation, block, block.nextConfig()));
|
||||||
block.onNewPlan(lastPlaced);
|
|
||||||
}else if(mode == breaking && validBreak(linked.x,linked.y) && !hasPlan(linked)){
|
}else if(mode == breaking && validBreak(linked.x,linked.y) && !hasPlan(linked)){
|
||||||
//add to selection queue if it's a valid BREAK position
|
//add to selection queue if it's a valid BREAK position
|
||||||
selectPlans.add(new BuildPlan(linked.x, linked.y));
|
selectPlans.add(new BuildPlan(linked.x, linked.y));
|
||||||
|
|||||||
@@ -989,8 +989,8 @@ public class LExecutor{
|
|||||||
public void run(LExecutor exec){
|
public void run(LExecutor exec){
|
||||||
if(target.building() instanceof LogicDisplayBuild d && d.isValid() && (d.team == exec.team || exec.privileged)){
|
if(target.building() instanceof LogicDisplayBuild d && d.isValid() && (d.team == exec.team || exec.privileged)){
|
||||||
d.flushCommands(exec.graphicsBuffer);
|
d.flushCommands(exec.graphicsBuffer);
|
||||||
exec.graphicsBuffer.clear();
|
|
||||||
}
|
}
|
||||||
|
exec.graphicsBuffer.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user