diff --git a/core/src/mindustry/content/Planets.java b/core/src/mindustry/content/Planets.java index 5cc164ca77..51e5edb4be 100644 --- a/core/src/mindustry/content/Planets.java +++ b/core/src/mindustry/content/Planets.java @@ -63,6 +63,7 @@ public class Planets{ lightSrcTo = 0.5f; lightDstFrom = 0.2f; clearSectorOnLose = true; + defaultCore = Blocks.coreBastion; hiddenItems.addAll(Items.serpuloItems).removeAll(Items.erekirItems); //TODO SHOULD there be lighting? diff --git a/core/src/mindustry/core/Control.java b/core/src/mindustry/core/Control.java index 38152d2e4f..ad4cd9d365 100644 --- a/core/src/mindustry/core/Control.java +++ b/core/src/mindustry/core/Control.java @@ -420,7 +420,7 @@ public class Control implements ApplicationListener, Loadable{ //set spawn for sector damage to use Tile spawn = world.tile(sector.info.spawnPosition); - spawn.setBlock(Blocks.coreShard, state.rules.defaultTeam); + spawn.setBlock(sector.planet.defaultCore, state.rules.defaultTeam); //add extra damage. SectorDamage.apply(1f); diff --git a/core/src/mindustry/type/Planet.java b/core/src/mindustry/type/Planet.java index 88f61960e7..4ecb8fc586 100644 --- a/core/src/mindustry/type/Planet.java +++ b/core/src/mindustry/type/Planet.java @@ -9,6 +9,7 @@ import arc.math.geom.*; import arc.struct.*; import arc.util.*; import arc.util.noise.*; +import mindustry.content.*; import mindustry.content.TechTree.*; import mindustry.ctype.*; import mindustry.game.*; @@ -16,6 +17,7 @@ import mindustry.graphics.*; import mindustry.graphics.g3d.*; import mindustry.graphics.g3d.PlanetGrid.*; import mindustry.maps.generators.*; +import mindustry.world.*; import mindustry.world.meta.*; import static mindustry.Vars.*; @@ -105,6 +107,8 @@ public class Planet extends UnlockableContent{ public boolean prebuildBase = true; /** If true, waves are created on sector loss. TODO remove. */ public boolean allowWaves = false; + /** Default core block for launching. */ + public Block defaultCore = Blocks.coreShard; /** Sets up rules on game load for any sector on this planet. */ public Cons ruleSetter = r -> {}; /** Parent body that this planet orbits around. If null, this planet is considered to be in the middle of the solar system.*/ diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 9dfb0c1332..8835f123aa 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -340,7 +340,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ } Sector findLauncher(Sector to){ - Sector launchSector = this.launchSector != null && this.launchSector.hasBase() ? this.launchSector : null; + Sector launchSector = this.launchSector != null && this.launchSector.planet == to.planet && this.launchSector.hasBase() ? this.launchSector : null; //directly nearby. if(to.near().contains(launchSector)) return launchSector; @@ -1153,13 +1153,14 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ if(mode == look && !sector.hasBase()){ shouldHide = false; Sector from = findLauncher(sector); + if(from == null){ //clear loadout information, so only the basic loadout gets used universe.clearLoadoutInfo(); //free launch. control.playSector(sector); }else{ - CoreBlock block = from.info.bestCoreType instanceof CoreBlock b ? b : (CoreBlock)Blocks.coreShard; + CoreBlock block = from.planet.allowLaunchSchematics ? (from.info.bestCoreType instanceof CoreBlock b ? b : (CoreBlock)from.planet.defaultCore) : (CoreBlock)from.planet.defaultCore; loadouts.show(block, from, sector, () -> { var schemCore = universe.getLastLoadout().findCore();