Partial 7.0 merge - API preview

This commit is contained in:
Anuken
2021-06-02 11:08:08 -04:00
parent ea75a357ca
commit 28b235ef07
531 changed files with 12356 additions and 6286 deletions
+10
View File
@@ -9,6 +9,7 @@ import mindustry.maps.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.storage.CoreBlock.*;
import mindustry.world.meta.*;
import mindustry.world.modules.*;
import java.util.*;
@@ -69,6 +70,8 @@ public class SectorInfo{
public @Nullable String name;
/** Displayed icon. */
public @Nullable String icon;
/** Displayed icon, as content. */
public @Nullable UnlockableContent contentIcon;
/** Version of generated waves. When it doesn't match, new waves are generated. */
public int waveVersion = -1;
/** Whether this sector was indicated to the player or not. */
@@ -191,6 +194,13 @@ public class SectorInfo{
stat.mean = Math.min(stat.mean, rawProduction.get(item, ExportStat::new).mean);
});
var pads = indexer.getAllied(state.rules.defaultTeam, BlockFlag.launchPad);
//disable export when launch pads are disabled, or there aren't any active ones
if(pads.size() == 0 || !Seq.with(pads).contains(t -> t.build.consValid())){
export.clear();
}
if(state.rules.sector != null){
state.rules.sector.saveInfo();
}