Procedural sectors on Serpulo now require a Foundation core
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package mindustry.maps.generators;
|
||||
|
||||
import arc.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
import arc.struct.ObjectIntMap.*;
|
||||
@@ -8,10 +10,12 @@ import arc.util.noise.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.g3d.*;
|
||||
import mindustry.graphics.g3d.PlanetGrid.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.type.Weather.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
@@ -52,6 +56,14 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
|
||||
}
|
||||
}
|
||||
|
||||
public void getLockedText(Sector hovered, StringBuilder out){
|
||||
out.append("[gray]").append(Iconc.lock).append(" ").append(Core.bundle.get("locked"));
|
||||
}
|
||||
|
||||
public TextureRegion getLockedIcon(Sector hovered){
|
||||
return (hovered.preset == null && !hovered.planet.allowLaunchToNumbered ? Fonts.getLargeIcon("cancel") : Fonts.getLargeIcon("lock"));
|
||||
}
|
||||
|
||||
/** @return whether to allow landing on the specified procedural sector */
|
||||
public boolean allowLanding(Sector sector){
|
||||
return sector.planet.allowLaunchToNumbered && (sector.hasBase() || sector.near().contains(Sector::hasBase));
|
||||
|
||||
Reference in New Issue
Block a user