Skip to content

Commit

Permalink
Fix #249
Browse files Browse the repository at this point in the history
  • Loading branch information
zxtej committed Dec 2, 2024
1 parent 8914bbf commit 7793979
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/mindustry/input/DesktopInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import mindustry.world.*;
import mindustry.world.blocks.logic.*;
import mindustry.world.blocks.payloads.*;
import mindustry.world.blocks.storage.*;
import mindustry.world.meta.*;

import static arc.Core.*;
Expand Down Expand Up @@ -882,6 +883,7 @@ void pollInput(){
else if (Core.input.ctrl()) {
temp.set(frozenPlans);
flushPlans(temp, false, false, true);
temp.clear();
}
else {
isBuilding = !isBuilding;
Expand Down Expand Up @@ -912,8 +914,9 @@ else if (Core.input.ctrl()) {
mode = none;
}else if(selectPlans.any()){
flushPlans(
temp.selectFrom(selectPlans, s -> !(s.block.buildVisibility == BuildVisibility.sandboxOnly && s.block.category != Category.defense)),
temp.selectFrom(selectPlans, s -> s.block.isVisible() || s.block instanceof CoreBlock),
isFreezeQueueing, Core.input.keyDown(Binding.force_place_modifier), isFreezeQueueing);
temp.clear();
}else if(isPlacing()){
selectX = cursorX;
selectY = cursorY;
Expand Down
2 changes: 2 additions & 0 deletions core/src/mindustry/input/InputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ protected void flushSelectPlans(Seq<BuildPlan> plans){
protected void flushPlansReverse(Seq<BuildPlan> plans){ // FINISHME: Does this method work as intended?
temp.set(plans);
flushPlans(temp.reverse());
temp.clear();
}

public void flushPlans(Seq<BuildPlan> plans) {
Expand Down Expand Up @@ -1666,6 +1667,7 @@ protected void freezeSelection(int x1, int y1, int x2, int y2, boolean flush, in
}
frozenPlans.addAll(frozenFromSelection).addAll(frozenFromUnit);
}
unfreeze.clear();
}

private void updateWallLine(int x1, int y1, int x2, int y2){
Expand Down

0 comments on commit 7793979

Please sign in to comment.