Package mindustry.game
Class SectorInfo
java.lang.Object
mindustry.game.SectorInfo
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Whether attack mode is enabled here.The best available core type.float
Special variables for simulation.float
Special variables for simulation.int
Wave where first boss shows up.Displayed icon, as content.float
Special variables for simulation.float
Special variables for simulation.float
Damage dealt to sector.Launch destination.arc.struct.ObjectMap<Item,
SectorInfo.ExportStat> Export statistics.boolean
Whether a core is available here.boolean
Whether this sector has any enemy spawns.boolean
Whether a world processor is on this map - implies that the map will get cleared.Displayed icon.arc.struct.ObjectFloatMap<Item>
float[]
arc.struct.ObjectMap<Item,
SectorInfo.ExportStat> Import statistics, based on what launch pads are actually receiving.Items stored in all cores.Temporary seq for last imported items.float
How many minutes this sector has been captured.Display name.Sector that was launched from.arc.struct.ObjectMap<Item,
SectorInfo.ExportStat> Core input statistics.arc.struct.ObjectMap<Item,
SectorInfo.ExportStat> Raw item production statistics.arc.struct.Seq<UnlockableContent>
Resources known to occur at this sector.float
How long the player has been playing elsewhere.boolean
Whether this sector was indicated to the player or not.int
Packed core spawn position.int
Max storage capacity.float
Special variables for simulation.float
Special variables for simulation.float
Special variables for simulation.boolean
Whether this sector was ever fully captured.int
Wave # from stateboolean
Whether waves are enabled here.float
Time between waves.int
How many waves have passed while the player was away.int
Waves this sector can survive if under attack.int
Version of generated waves.int
Wave # from state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
eachImport
(Planet planet, arc.func.Cons<Sector> cons) Iterates through every sector this one imports from.arc.struct.ObjectFloatMap<Item>
float
float
getImportRate
(Planet planet, Item item) float[]
getImportRates
(Planet planet) void
handleCoreItem
(Item item, int amount) Handles core item changes.void
handleItemExport
(Item item, int amount) Updates export statistics.void
handleItemExport
(ItemStack stack) Updates export statistics.void
handleItemImport
(Item item, int amount) Updates import statistics.void
handleProduction
(Item item, int amount) Handles raw production stats.boolean
arc.struct.ObjectMap<Item,
SectorInfo.ExportStat> importStats
(Planet planet) void
prepare()
Prepare data for writing to a save.void
refreshImportRates
(Planet planet) void
update()
Update averages of various stats, updates some special sector logic.void
write()
Write contents of meta into main storage.
-
Field Details
-
production
Core input statistics. -
rawProduction
Raw item production statistics. -
export
Export statistics. -
imports
Import statistics, based on what launch pads are actually receiving. -
items
Items stored in all cores. -
bestCoreType
The best available core type. -
storageCapacity
public int storageCapacityMax storage capacity. -
hasCore
public boolean hasCoreWhether a core is available here. -
hasWorldProcessor
public boolean hasWorldProcessorWhether a world processor is on this map - implies that the map will get cleared. -
wasCaptured
public boolean wasCapturedWhether this sector was ever fully captured. -
origin
Sector that was launched from. -
destination
Launch destination. -
resources
Resources known to occur at this sector. -
waves
public boolean wavesWhether waves are enabled here. -
attack
public boolean attackWhether attack mode is enabled here. -
hasSpawns
public boolean hasSpawnsWhether this sector has any enemy spawns. -
wave
public int waveWave # from state -
winWave
public int winWaveWave # from state -
wavesSurvived
public int wavesSurvivedWaves this sector can survive if under attack. Based on wave in info. <0 means uncalculated. -
waveSpacing
public float waveSpacingTime between waves. -
damage
public float damageDamage dealt to sector. -
wavesPassed
public int wavesPassedHow many waves have passed while the player was away. -
spawnPosition
public int spawnPositionPacked core spawn position. -
secondsPassed
public float secondsPassedHow long the player has been playing elsewhere. -
minutesCaptured
public float minutesCapturedHow many minutes this sector has been captured. -
name
Display name. -
icon
Displayed icon. -
contentIcon
Displayed icon, as content. -
waveVersion
public int waveVersionVersion of generated waves. When it doesn't match, new waves are generated. -
shown
public boolean shownWhether this sector was indicated to the player or not. -
sumHealth
public float sumHealthSpecial variables for simulation. -
sumRps
public float sumRpsSpecial variables for simulation. -
sumDps
public float sumDpsSpecial variables for simulation. -
bossHealth
public float bossHealthSpecial variables for simulation. -
bossDps
public float bossDpsSpecial variables for simulation. -
curEnemyHealth
public float curEnemyHealthSpecial variables for simulation. -
curEnemyDps
public float curEnemyDpsSpecial variables for simulation. -
bossWave
public int bossWaveWave where first boss shows up. -
importCooldownTimers
-
importRateCache
@Nullable public transient float[] importRateCache -
lastImported
Temporary seq for last imported items. Do not use.
-
-
Constructor Details
-
SectorInfo
public SectorInfo()
-
-
Method Details
-
handleCoreItem
Handles core item changes. -
handleProduction
Handles raw production stats. -
handleItemExport
Updates export statistics. -
handleItemExport
Updates export statistics. -
handleItemImport
Updates import statistics. -
getExport
-
hasExport
-
refreshImportRates
-
getImportRates
-
getImportRate
- Returns:
- the import rate of an item as item/second. This is the *raw* max import rate, not what landing pads are actually using.
-
write
public void write()Write contents of meta into main storage. -
prepare
public void prepare()Prepare data for writing to a save. -
update
public void update()Update averages of various stats, updates some special sector logic. Called every frame. -
exportRates
-
anyExports
public boolean anyExports() -
importStats
- Returns:
- a newly allocated map with import statistics. Use sparingly.
-
eachImport
Iterates through every sector this one imports from.
-