Planet method renaming

This commit is contained in:
Anuken
2021-06-10 18:51:29 -04:00
parent c4803d29da
commit dfd2b22917
3 changed files with 4 additions and 3 deletions

View File

@ -149,7 +149,7 @@ public class PlanetRenderer implements Disposable{
public void renderTransparent(Planet planet){ public void renderTransparent(Planet planet){
if(!planet.visible()) return; if(!planet.visible()) return;
if(planet.isLandable() && planet == this.planet){ if(planet.hasGrid() && planet == this.planet){
renderSectors(planet); renderSectors(planet);
} }

View File

@ -125,7 +125,8 @@ public class Planet extends UnlockableContent{
sectors.get(index).preset = preset; sectors.get(index).preset = preset;
} }
public boolean isLandable(){ /** @return whether this planet has a sector grid to select. */
public boolean hasGrid(){
return grid != null && generator != null && sectors.size > 0; return grid != null && generator != null && sectors.size > 0;
} }

View File

@ -593,7 +593,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
} }
} }
if(planets.planet.isLandable()){ if(planets.planet.hasGrid()){
hovered = planets.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad); hovered = planets.planet.getSector(planets.cam.getMouseRay(), PlanetRenderer.outlineRad);
}else{ }else{
hovered = selected = null; hovered = selected = null;