Support for selecting multiple buildings to command

This commit is contained in:
Anuken
2022-10-30 15:10:23 -04:00
parent 6e3332823e
commit 8c0f50acb6
2 changed files with 43 additions and 31 deletions

View File

@@ -646,7 +646,7 @@ public class MobileInput extends InputHandler implements GestureListener{
}else if(mode == breaking && validBreak(linked.x,linked.y) && !hasPlan(linked)){
//add to selection queue if it's a valid BREAK position
selectPlans.add(new BuildPlan(linked.x, linked.y));
}else if((commandMode && selectedUnits.size > 0) || commandBuild != null){
}else if((commandMode && selectedUnits.size > 0) || commandBuildings.size > 0){
//handle selecting units with command mode
commandTap(x, y);
}else if(commandMode){
@@ -715,7 +715,7 @@ public class MobileInput extends InputHandler implements GestureListener{
selectedUnits.removeAll(u -> !u.isCommandable() || !u.isValid());
if(!commandMode){
commandBuild = null;
commandBuildings.clear();
selectedUnits.clear();
}