Class SectorInfo

java.lang.Object
mindustry.game.SectorInfo

public class SectorInfo extends Object
  • Field Details

    • production

      public ObjectMap<Item,SectorInfo.ExportStat> production
      Core input statistics.
    • rawProduction

      public ObjectMap<Item,SectorInfo.ExportStat> rawProduction
      Raw item production statistics.
    • export

      Export statistics.
    • items

      public ItemSeq items
      Items stored in all cores.
    • bestCoreType

      public Block bestCoreType
      The best available core type.
    • storageCapacity

      public int storageCapacity
      Max storage capacity.
    • hasCore

      public boolean hasCore
      Whether a core is available here.
    • wasCaptured

      public boolean wasCaptured
      Whether this sector was ever fully captured.
    • origin

      @Nullable public Sector origin
      Sector that was launched from.
    • destination

      @Nullable public Sector destination
      Launch destination.
    • resources

      public Seq<UnlockableContent> resources
      Resources known to occur at this sector.
    • waves

      public boolean waves
      Whether waves are enabled here.
    • attack

      public boolean attack
      Whether attack mode is enabled here.
    • hasSpawns

      public boolean hasSpawns
      Whether this sector has any enemy spawns.
    • wave

      public int wave
      Wave # from state
    • winWave

      public int winWave
      Wave # from state
    • wavesSurvived

      public int wavesSurvived
      Waves this sector can survive if under attack. Based on wave in info. <0 means uncalculated.
    • waveSpacing

      public float waveSpacing
      Time between waves.
    • damage

      public float damage
      Damage dealt to sector.
    • wavesPassed

      public int wavesPassed
      How many waves have passed while the player was away.
    • spawnPosition

      public int spawnPosition
      Packed core spawn position.
    • secondsPassed

      public float secondsPassed
      How long the player has been playing elsewhere.
    • minutesCaptured

      public float minutesCaptured
      How many minutes this sector has been captured.
    • name

      @Nullable public String name
      Display name.
    • icon

      @Nullable public String icon
      Displayed icon.
    • contentIcon

      @Nullable public UnlockableContent contentIcon
      Displayed icon, as content.
    • waveVersion

      public int waveVersion
      Version of generated waves. When it doesn't match, new waves are generated.
    • shown

      public boolean shown
      Whether this sector was indicated to the player or not.
    • lastImported

      public transient ItemSeq lastImported
      Temporary seq for last imported items. Do not use.
    • sumHealth

      public float sumHealth
      Special variables for simulation.
    • sumRps

      public float sumRps
      Special variables for simulation.
    • sumDps

      public float sumDps
      Special variables for simulation.
    • waveHealthBase

      public float waveHealthBase
      Special variables for simulation.
    • waveHealthSlope

      public float waveHealthSlope
      Special variables for simulation.
    • waveDpsBase

      public float waveDpsBase
      Special variables for simulation.
    • waveDpsSlope

      public float waveDpsSlope
      Special variables for simulation.
    • bossHealth

      public float bossHealth
      Special variables for simulation.
    • bossDps

      public float bossDps
      Special variables for simulation.
    • curEnemyHealth

      public float curEnemyHealth
      Special variables for simulation.
    • curEnemyDps

      public float curEnemyDps
      Special variables for simulation.
    • bossWave

      public int bossWave
      Wave where first boss shows up.
  • Constructor Details

    • SectorInfo

      public SectorInfo()
  • Method Details

    • handleCoreItem

      public void handleCoreItem(Item item, int amount)
      Handles core item changes.
    • handleProduction

      public void handleProduction(Item item, int amount)
      Handles raw production stats.
    • getRealDestination

      public Sector getRealDestination()
      Returns:
      the real location items go when launched on this sector
    • handleItemExport

      public void handleItemExport(ItemStack stack)
      Updates export statistics.
    • handleItemExport

      public void handleItemExport(Item item, int amount)
      Updates export statistics.
    • getExport

      public float getExport(Item item)
    • 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

      public ObjectFloatMap<Item> exportRates()
    • anyExports

      public boolean anyExports()
    • importStats

      public ObjectMap<Item,SectorInfo.ExportStat> importStats(Planet planet)
      Returns:
      a newly allocated map with import statistics. Use sparingly.
    • eachImport

      public void eachImport(Planet planet, Cons<Sector> cons)
      Iterates through every sector this one imports from.