Sunken Pier map submission

This commit is contained in:
Anuken
2025-09-19 12:37:22 -04:00
parent 807a8fe089
commit bf051fa7bc
10 changed files with 26 additions and 11 deletions

View File

@@ -66,11 +66,7 @@ public class Planets{
defaultCore = Blocks.coreBastion;
iconColor = Color.valueOf("ff9266");
enemyBuildSpeedMultiplier = 0.4f;
//TODO disallowed for now
allowLaunchToNumbered = false;
//TODO SHOULD there be lighting?
updateLighting = false;
defaultAttributes.set(Attribute.heat, 0.8f);

View File

@@ -9,7 +9,7 @@ public class SectorPresets{
public static SectorPreset
groundZero,
craters, biomassFacility, taintedWoods, frozenForest, ruinousShores, facility32m, windsweptIslands, stainedMountains, tarFields,
frontier, fungalPass, infestedCanyons, atolls, mycelialBastion, extractionOutpost, saltFlats, testingGrounds, overgrowth, //polarAerodrome,
frontier, fungalPass, infestedCanyons, atolls, sunkenPier, mycelialBastion, extractionOutpost, saltFlats, testingGrounds, overgrowth, //polarAerodrome,
impact0078, desolateRift, nuclearComplex, planetaryTerminal,
coastline, navalFortress, weatheredChannels, seaPort,
@@ -123,6 +123,11 @@ public class SectorPresets{
difficulty = 7;
}};
sunkenPier = new SectorPreset("sunkenPier", serpulo, -1){{
captureWave = 50;
difficulty = 8;
}};
mycelialBastion = new SectorPreset("mycelialBastion", serpulo, 260){{
difficulty = 8;
}};

View File

@@ -580,6 +580,14 @@ public class SerpuloTechTree{
new Research(cyclone),
new Research(ripple)
), () -> {
node(sunkenPier, Seq.with(
new SectorComplete(navalFortress),
new SectorComplete(coastline),
new Research(multiplicativeReconstructor)
), () -> {
});
node(weatheredChannels, Seq.with(
new SectorComplete(impact0078),
new SectorComplete(navalFortress),

View File

@@ -70,9 +70,13 @@ public class SectorPreset extends UnlockableContent{
sector = data.presets.get(name, sector);
}
sector %= planet.sectors.size;
this.sector = planet.sectors.get(sector);
this.sector = planet.sectors.get(sector == -1 ? 0 : sector);
planet.preset(sector, this);
if(sector != -1){
planet.preset(sector, this);
}else{
Log.warn("Preset '@' doesn't have a sector assigned.", name);
}
}
@Override

View File

@@ -269,7 +269,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
//announce new presets
for(SectorPreset preset : content.sectors()){
if(preset.unlocked() && !preset.alwaysUnlocked && !preset.sector.info.shown && preset.requireUnlock && !preset.sector.hasBase() && preset.planet == state.planet){
if(preset.unlocked() && preset.sector.preset == preset && !preset.alwaysUnlocked && !preset.sector.info.shown && preset.requireUnlock && !preset.sector.hasBase() && preset.planet == state.planet){
newPresets.add(preset.sector);
preset.sector.info.shown = true;
preset.sector.saveInfo();
@@ -662,7 +662,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
PlanetData data = new PlanetData();
IntSeq attack = new IntSeq();
for(var sector : state.planet.sectors){
if(sector.preset == null && sector.generateEnemyBase){
if((sector.preset == null || !sector.preset.requireUnlock) && sector.generateEnemyBase){
attack.add(sector.id);
}

View File

@@ -78,6 +78,6 @@ public class SectorSelectDialog extends BaseDialog{
}
boolean matches(SectorPreset sector, String text){
return sector.planet == planet && (text.isEmpty() || sector.name.toLowerCase(Locale.ROOT).contains(text) || sector.localizedName.toLowerCase(Locale.ROOT).contains(text));
return sector.planet == planet && sector.requireUnlock && (text.isEmpty() || sector.name.toLowerCase(Locale.ROOT).contains(text) || sector.localizedName.toLowerCase(Locale.ROOT).contains(text));
}
}