Selecting build plans moves them to front

This commit is contained in:
Anuken 2024-10-04 22:39:43 -04:00
parent aab27d1b56
commit cd3847a323
3 changed files with 13 additions and 0 deletions

View File

@ -837,6 +837,8 @@ sector.coastline.name = Coastline
sector.navalFortress.name = Naval Fortress
sector.polarAerodrome.name = Polar Aerodrome
sector.atolls.name = Atolls
sector.testingGrounds.name = Testing Grounds
sector.seaPort.name = Sea Port
sector.groundZero.description = The optimal location to begin once more. Low enemy threat. Few resources.\nGather as much lead and copper as possible.\nMove on.
sector.frozenForest.description = Even here, closer to mountains, the spores have spread. The frigid temperatures cannot contain them forever.\n\nBegin the venture into power. Build combustion generators. Learn to use menders.
@ -862,6 +864,8 @@ sector.taintedWoods.description = WIP, map submission by Stormride_R
sector.atolls.description = WIP, map submission by Stormride_R
sector.infestedCanyons.description = WIP, map submission by Skeledragon
sector.polarAerodrome.description = WIP, map submission by hhh i 17
sector.testingGrounds.description = WIP, map submission by dnx2019
sector.seaPort.description = WIP, map submission by inkognito626
sector.onset.name = The Onset
sector.aegis.name = Aegis

Binary file not shown.

View File

@ -674,6 +674,15 @@ public class DesktopInput extends InputHandler{
tappedOne = false;
BuildPlan plan = getPlan(cursorX, cursorY);
if(plan != null){
//move selected to front
int index = player.unit().plans.indexOf(plan, true);
if(index != -1){
player.unit().plans.removeIndex(index);
player.unit().plans.addFirst(plan);
}
}
if(Core.input.keyDown(Binding.break_block)){
mode = none;
}else if(!selectPlans.isEmpty()){