Merge branch 'master' of https://github.com/Anuken/Mindustry into adjacent-campaign-sectors

This commit is contained in:
Anuken
2025-05-15 22:09:17 -04:00
50 changed files with 147 additions and 40 deletions
@@ -1242,6 +1242,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
@Override
public void setTexture(String textureName){
this.textureName = textureName;
if(headless) return;
boolean firstUpdate = fetchedRegion == null;
+4 -6
View File
@@ -196,7 +196,7 @@ public class SectorInfo{
}
/** Prepare data for writing to a save. */
public void prepare(){
public void prepare(Sector sector){
//update core items
items.clear();
@@ -237,12 +237,10 @@ public class SectorInfo{
export.clear();
}
if(state.rules.sector != null){
state.rules.sector.saveInfo();
}
sector.saveInfo();
if(state.rules.sector != null && state.rules.sector.planet.allowWaveSimulation){
SectorDamage.writeParameters(this);
if(sector.planet.allowWaveSimulation){
SectorDamage.writeParameters(sector);
}
}
+1 -1
View File
@@ -226,7 +226,7 @@ public class Universe{
sector.info.wavesPassed = wavesPassed;
}
float damage = attacked ? SectorDamage.getDamage(sector.info) : 0f;
float damage = attacked ? SectorDamage.getDamage(sector) : 0f;
//damage never goes down until the player visits the sector, so use max
sector.info.damage = Math.max(sector.info.damage, damage);