Fixed Serpulo cores being used on Erekir
This commit is contained in:
@@ -63,6 +63,7 @@ public class Planets{
|
|||||||
lightSrcTo = 0.5f;
|
lightSrcTo = 0.5f;
|
||||||
lightDstFrom = 0.2f;
|
lightDstFrom = 0.2f;
|
||||||
clearSectorOnLose = true;
|
clearSectorOnLose = true;
|
||||||
|
defaultCore = Blocks.coreBastion;
|
||||||
hiddenItems.addAll(Items.serpuloItems).removeAll(Items.erekirItems);
|
hiddenItems.addAll(Items.serpuloItems).removeAll(Items.erekirItems);
|
||||||
|
|
||||||
//TODO SHOULD there be lighting?
|
//TODO SHOULD there be lighting?
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
|
|
||||||
//set spawn for sector damage to use
|
//set spawn for sector damage to use
|
||||||
Tile spawn = world.tile(sector.info.spawnPosition);
|
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.
|
//add extra damage.
|
||||||
SectorDamage.apply(1f);
|
SectorDamage.apply(1f);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import arc.math.geom.*;
|
|||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.noise.*;
|
import arc.util.noise.*;
|
||||||
|
import mindustry.content.*;
|
||||||
import mindustry.content.TechTree.*;
|
import mindustry.content.TechTree.*;
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
@@ -16,6 +17,7 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.graphics.g3d.*;
|
import mindustry.graphics.g3d.*;
|
||||||
import mindustry.graphics.g3d.PlanetGrid.*;
|
import mindustry.graphics.g3d.PlanetGrid.*;
|
||||||
import mindustry.maps.generators.*;
|
import mindustry.maps.generators.*;
|
||||||
|
import mindustry.world.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
@@ -105,6 +107,8 @@ public class Planet extends UnlockableContent{
|
|||||||
public boolean prebuildBase = true;
|
public boolean prebuildBase = true;
|
||||||
/** If true, waves are created on sector loss. TODO remove. */
|
/** If true, waves are created on sector loss. TODO remove. */
|
||||||
public boolean allowWaves = false;
|
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. */
|
/** Sets up rules on game load for any sector on this planet. */
|
||||||
public Cons<Rules> ruleSetter = r -> {};
|
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.*/
|
/** 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 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.
|
//directly nearby.
|
||||||
if(to.near().contains(launchSector)) return launchSector;
|
if(to.near().contains(launchSector)) return launchSector;
|
||||||
|
|
||||||
@@ -1153,13 +1153,14 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
if(mode == look && !sector.hasBase()){
|
if(mode == look && !sector.hasBase()){
|
||||||
shouldHide = false;
|
shouldHide = false;
|
||||||
Sector from = findLauncher(sector);
|
Sector from = findLauncher(sector);
|
||||||
|
|
||||||
if(from == null){
|
if(from == null){
|
||||||
//clear loadout information, so only the basic loadout gets used
|
//clear loadout information, so only the basic loadout gets used
|
||||||
universe.clearLoadoutInfo();
|
universe.clearLoadoutInfo();
|
||||||
//free launch.
|
//free launch.
|
||||||
control.playSector(sector);
|
control.playSector(sector);
|
||||||
}else{
|
}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, () -> {
|
loadouts.show(block, from, sector, () -> {
|
||||||
var schemCore = universe.getLastLoadout().findCore();
|
var schemCore = universe.getLastLoadout().findCore();
|
||||||
|
|||||||
Reference in New Issue
Block a user