Megabase resized; WIP center submission added

This commit is contained in:
Anuken 2026-04-07 01:59:02 -04:00
parent 2f378c46b2
commit ef4dff5693
11 changed files with 39 additions and 13 deletions

View file

@ -852,6 +852,7 @@ sector.noswitch.title = Unable to Switch Sectors
sector.noswitch = You may not switch sectors while an existing sector is under attack.\n\nSector: [accent]{0}[] on [accent]{1}[]
sector.view = View Sector
sector.foundationrequired = [lightgray] Core: Foundation Required Nearby
sector.shielded = [lightgray] Shielded
threat.low = Low
threat.medium = Medium

Binary file not shown.

View file

@ -1 +1 @@
{presets:{windsweptIslands:97,stainedMountains:223,weatheredChannels:166,crateredBattleground:219,extractionOutpost:213,littoralShipyard:204,coastline:164,navalFortress:165,frontier:86,sunkenPier:173,groundZero:170,mycelialBastion:143,facility32m:65,atolls:75,overgrowth:142,testingGrounds:169,frozenForest:64,saltFlats:98,taintedWoods:145,infestedCanyons:85,desolateRift:271,nuclearComplex:228,ruinousShores:41,planetaryTerminal:217,impact0078:266,perilousHarbor:214,fallenVessel:95,fungalPass:221,tarFields:99,biomassFacility:23},attackSectors:[0,6,13,16,19,20,24,27,30,47,55,66,67,69,76,92,94,103,111,116,127,133,138,150,157,161,162,176,180,185,191,192,197,200,207,225,230,237,240,242,243,244,245,246,247,248,251,254,259,263,265]}
{presets:{windsweptIslands:97,stainedMountains:223,weatheredChannels:166,extractionOutpost:213,coastline:164,navalFortress:165,frontier:86,sunkenPier:173,groundZero:170,mycelialBastion:143,crateredBattleground:219,facility32m:65,atolls:75,overgrowth:142,testingGrounds:169,frozenForest:64,littoralShipyard:204,saltFlats:98,taintedWoods:145,infestedCanyons:85,desolateRift:271,nuclearComplex:228,ruinousShores:41,planetaryTerminal:217,impact0078:266,perilousHarbor:214,fallenVessel:95,fungalPass:221,tarFields:99,biomassFacility:23},attackSectors:[0,6,13,16,19,20,24,27,30,47,55,66,67,69,76,92,94,111,116,127,133,161,162,176,180,185,191,192,197,200,207,225,230,240,242,243,244,245,246,247,248,254,259,263,265]}

View file

@ -47,6 +47,20 @@ public class Saves{
});
}
private void clearOldMegabaseSectors(){
IntSet serpuloRemoval = IntSet.with(27, 245, 244, 243, 242, 247, 246, 237, 150, 157, 138, 251, 103);
//clear old megabase sectors from the beta period
saves.removeAll(s -> {
if(s.getSector() != null && s.getSector().planet == Planets.serpulo && serpuloRemoval.contains(s.getSector().id) && s.meta.build < 157 && s.meta.build > 146){
s.getSector().clearInfo();
s.file.delete();
return true;
}
return false;
});
}
public void load(){
saves.clear();
@ -71,6 +85,8 @@ public class Saves{
}
}
clearOldMegabaseSectors();
lastSectorSave = saves.find(s -> s.isSector() && s.getName().equals(Core.settings.getString("last-sector-save", "<none>")));
class Remap{

View file

@ -68,12 +68,15 @@ public class SectorSubmissions{
registerSerpuloSector(202, "D&X", "https://discord.com/channels/391020510269669376/1253760205091635201/1253760205091635201", 33, 6f);
//megabases
registerSerpuloSector(103, "enwyz", "https://discord.com/channels/391020510269669376/1379926839559979030/1429203869514207255");
registerSerpuloSector(237, "Chocomint", "https://discord.com/channels/391020510269669376/1379926929636851812/1474447354982563840");
registerSerpuloSector(138, "Lilith", "https://discord.com/channels/391020510269669376/1379926873152164004/1470268689201889464");
registerSerpuloSector(157, "Jamespire", "https://discord.com/channels/391020510269669376/1379926876457537547/1484013941477609543");
registerSerpuloSector(246, "enwyz", "https://discord.com/channels/391020510269669376/1379926839559979030/1429203869514207255");
registerSerpuloSector(244, "Chocomint", "https://discord.com/channels/391020510269669376/1379926929636851812/1474447354982563840");
registerSerpuloSector(242, "Lilith", "https://discord.com/channels/391020510269669376/1379926873152164004/1470268689201889464");
registerSerpuloSector(243, "Jamespire", "https://discord.com/channels/391020510269669376/1379926876457537547/1484013941477609543");
registerSerpuloSector(247, "Locla^Glass", "https://discord.com/channels/391020510269669376/1379926976361533752/1431827990295220266");
registerSerpuloSector(245, "Grushashusha", "https://discord.com/channels/391020510269669376/1379926971286290584/1485245072034365462");
registerSerpuloSector(27, "Stormrider", "https://discord.com/channels/391020510269669376/1379926798833287289/1451252137224044722");
Planets.serpulo.sectors.get(27).preset.shieldSectors.addAll(Planets.serpulo.sectors.get(246), Planets.serpulo.sectors.get(244), Planets.serpulo.sectors.get(242));
/* UNUSED SECTORS:
registerHiddenSectors(serpulo,

View file

@ -61,6 +61,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
);
float water = 2f / arr[0].length;
//megabase position
Vec3 basePos = new Vec3(0.9341721, 0.0, 0.3568221);
float rawHeight(Vec3 position){
@ -112,7 +113,11 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
@Override
public void getLockedText(Sector hovered, StringBuilder out){
if((hovered.preset == null || !hovered.preset.requireUnlock) && hovered.near().contains(Sector::hasBase)){
out.append("[red]").append(Iconc.cancel).append("[]").append(Blocks.coreFoundation.emoji()).append(Core.bundle.get("sector.foundationrequired"));
if(hovered.isShielded()){
out.append("[red]").append(Iconc.defense).append("[]").append(Core.bundle.get("sector.shielded"));
}else{
out.append("[red]").append(Iconc.cancel).append("[]").append(Blocks.coreFoundation.emoji()).append(Core.bundle.get("sector.foundationrequired"));
}
}else{
super.getLockedText(hovered, out);
}
@ -126,7 +131,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
@Override
public void getColor(Vec3 position, Color out){
Block block = getBlock(position);
Block block = getBlock(position, true);
//replace salt with sand color
if(block == Blocks.salt) block = Blocks.sand;
out.set(block.mapColor).a(1f - block.albedo);
@ -157,7 +162,8 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
if(lightScl < 1f) lightScl = Interp.pow5Out.apply(lightScl);
float freq = 0.05f;
if(position.dst(basePos) < 0.55f ?
//TODO: once the old megabase returns, change it to 0.55f
if(position.dst(basePos) < 0.3f ?
dst*metalDstScl + Simplex.noise3d(seed + 1, 3, 0.4, 5.5f, position.x, position.y + 200f, position.z)*0.08f + ((basePos.dst(position) + 0.00f) % freq < freq/2f ? 1f : 0f) * 0.07f < 0.08f/* || dst <= 0.0001f*/ :
dst*metalDstScl + Simplex.noise3d(seed, 3, 0.4, 9f, position.x, position.y + 370f, position.z)*0.06f < 0.045){
@ -174,7 +180,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
@Override
public void genTile(Vec3 position, TileGen tile){
tile.floor = getBlock(position);
tile.floor = getBlock(position, false);
if(tile.floor == Blocks.darkPanel6) tile.floor = Blocks.darkPanel3;
tile.block = tile.floor.asFloor().wall;
@ -185,7 +191,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
static double metalDstScl = 0.25;
Block getBlock(Vec3 position){
Block getBlock(Vec3 position, boolean visualOnly){
float height = rawHeight(position);
float px = position.x * scl, py = position.y * scl, pz = position.z * scl;
@ -202,7 +208,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
if(tar > 0.5f){
return tars.get(res, res);
}else{
if(position.within(basePos, 0.65f)){
if(visualOnly && position.within(basePos, 0.65f)){
float dst = 999f;

View file

@ -516,8 +516,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
for(Sector sec : planet.sectors){
//draw shield arc
if(sec.shieldTarget != null && !sec.isCaptured() && !sec.shieldTarget.isCaptured()){
planets.drawArcLine(planet, sec.tile.v, sec.shieldTarget.tile.v, Team.crux.color.write(Tmp.c2).a(state.uiAlpha), Tmp.c3.set(Tmp.c2).mulA(0.5f), 0.15f, 110f, 25, 0.006f);
if(sec.shieldTarget != null && !sec.isCaptured() && !sec.shieldTarget.isCaptured() && (planet.generator.allowLanding(sec) || planet.generator.allowLanding(sec.shieldTarget))){
planets.drawArcLine(planet, sec.tile.v, sec.shieldTarget.tile.v, Team.crux.color.write(Tmp.c2).a(state.uiAlpha), Tmp.c3.set(Tmp.c2).mulA(0.5f), 0.3f, 110f, 25, 0.006f);
}
if(sec.hasBase()){