Cleanup
This commit is contained in:
@@ -606,6 +606,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
t.label(() -> mode == select ? "@sectors.select" : "").style(Styles.outlineLabel).color(Pal.accent);
|
||||
}),
|
||||
buttons,
|
||||
|
||||
// planet selection
|
||||
new Table(t -> {
|
||||
t.top().left();
|
||||
@@ -614,17 +615,11 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
Table starsTable = new Table(Styles.black);
|
||||
pane.setWidget(starsTable);
|
||||
pane.setScrollingDisabled(true, false);
|
||||
|
||||
int starCount = 0;
|
||||
for(Planet star : content.planets()){
|
||||
if(star.solarSystem != star) continue;
|
||||
boolean hasSelectablePlanets = false;
|
||||
for(Planet planet : content.planets()){
|
||||
if(planet.solarSystem == star && selectable(planet)){
|
||||
hasSelectablePlanets = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!hasSelectablePlanets) continue;
|
||||
if(star.solarSystem != star || !content.planets().contains(p -> p.solarSystem == star && selectable(p))) continue;
|
||||
|
||||
starCount++;
|
||||
if(starCount > 1) starsTable.add(star.localizedName).padLeft(10f).padBottom(10f).padTop(10f).left().width(190f).row();
|
||||
Table planetTable = new Table();
|
||||
|
||||
Reference in New Issue
Block a user