mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
Fixed Serpulo cores being used on Erekir
This commit is contained in:
parent
494440a591
commit
4b0bc6fe5c
@ -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?
|
||||
|
@ -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);
|
||||
|
@ -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<Rules> ruleSetter = r -> {};
|
||||
/** Parent body that this planet orbits around. If null, this planet is considered to be in the middle of the solar system.*/
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user