Choosing of Erekir launch sector based on loadout cost
This commit is contained in:
@@ -68,7 +68,6 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
||||
|
||||
if(!destination.allowLaunchLoadout()){
|
||||
resources.clear();
|
||||
//TODO this should be set to a proper loadout based on sector.
|
||||
if(destination.preset != null){
|
||||
var rules = destination.preset.generator.map.rules();
|
||||
for(var stack : rules.loadout){
|
||||
|
||||
@@ -430,10 +430,11 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
return mode == planetLaunch ? sector.planet.generator.allowAcceleratorLanding(sector) : sector.planet.generator.allowLanding(sector);
|
||||
}
|
||||
|
||||
Sector findLauncher(Sector to){
|
||||
@Nullable Sector findLauncher(Sector to){
|
||||
if(mode == planetLaunch || to.planet.generator == null) return launchSector;
|
||||
|
||||
return to.planet.generator.findLaunchCandidate(to, launchSector);
|
||||
Sector candidate = to.planet.generator.findLaunchCandidate(to, launchSector);
|
||||
return candidate == null ? launchSector : candidate;
|
||||
}
|
||||
|
||||
boolean showing(){
|
||||
|
||||
Reference in New Issue
Block a user