Removed background sector wave simulation

This commit is contained in:
Anuken
2025-12-14 10:30:48 -05:00
parent 0ebe105ddd
commit 1bdac35d90
10 changed files with 76 additions and 558 deletions

View File

@@ -6,7 +6,6 @@ import arc.struct.*;
import arc.util.*;
import mindustry.content.*;
import mindustry.ctype.*;
import mindustry.maps.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.storage.CoreBlock.*;
@@ -63,18 +62,10 @@ public class SectorInfo{
public int attempts;
/** Wave # from state */
public int wave = 1, winWave = -1;
/** Waves this sector can survive if under attack. Based on wave in info. <0 means uncalculated. */
public int wavesSurvived = -1;
/** Time between waves. */
public float waveSpacing = 2 * Time.toMinutes;
/** Damage dealt to sector. */
public float damage;
/** How many waves have passed while the player was away. */
public int wavesPassed;
/** Packed core spawn position. */
public int spawnPosition;
/** How long the player has been playing elsewhere. */
public float secondsPassed;
/** How many minutes this sector has been captured. */
public float minutesCaptured;
/** Light coverage in terms of radius. */
@@ -90,11 +81,6 @@ public class SectorInfo{
/** Whether this sector was indicated to the player or not. */
public boolean shown = false;
/** Special variables for simulation. */
public float sumHealth, sumRps, sumDps, bossHealth, bossDps, curEnemyHealth, curEnemyDps;
/** Wave where first boss shows up. */
public int bossWave = -1;
public ObjectFloatMap<Item> importCooldownTimers = new ObjectFloatMap<>();
public @Nullable transient float[] importRateCache;
@@ -233,9 +219,6 @@ public class SectorInfo{
hasCore = entity != null;
bestCoreType = !hasCore ? Blocks.air : state.rules.defaultTeam.cores().max(e -> e.block.size).block;
storageCapacity = entity != null ? entity.storageCapacity : 0;
secondsPassed = 0;
wavesPassed = 0;
damage = 0;
hasSpawns = spawner.countSpawns() > 0;
lastPresetName = sector.preset == null ? null : sector.preset.name;
lastWidth = world.width();
@@ -264,10 +247,6 @@ public class SectorInfo{
sector.saveInfo();
if(sector.planet.allowWaveSimulation){
SectorDamage.writeParameters(sector);
}
if(sector.planet.generator != null){
sector.planet.generator.beforeSaveWrite(sector);
}