Logic fixes / Bigger erekir sectors

This commit is contained in:
Anuken
2022-02-13 11:09:27 -05:00
parent 3039a404eb
commit d72153c67a
15 changed files with 147 additions and 31 deletions

View File

@@ -101,12 +101,20 @@ public class LaunchLoadoutDialog extends BaseDialog{
});
}).width(204);
buttons.button("@launch.text", Icon.ok, () -> {
boolean rows = Core.graphics.isPortrait() && mobile;
if(rows) buttons.row();
var cell = buttons.button("@launch.text", Icon.ok, () -> {
universe.updateLoadout(core, selected);
confirm.run();
hide();
}).disabled(b -> !valid);
if(rows){
cell.colspan(2).size(160f + 204f + 4f, 64f);
}
int cols = Math.max((int)(Core.graphics.getWidth() / Scl.scl(230)), 1);
ButtonGroup<Button> group = new ButtonGroup<>();
selected = universe.getLoadout(core);

View File

@@ -488,7 +488,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
//TODO what if any sector is selectable?
//TODO launch criteria - which planets can be launched to? Where should this be defined? Should planets even be selectable?
if(mode == planetLaunch) return launchSector != null && planet != launchSector.planet && launchSector.planet.launchCandidates.contains(planet);
return (planet.alwaysUnlocked && planet.isLandable()) || planet.sectors.contains(Sector::hasBase);
return (planet.alwaysUnlocked && planet.isLandable()) || planet.sectors.contains(Sector::hasBase) || debugSelect;
}
void setup(){