Fixed #10806 / Fixed crash
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user