Class Teams.TeamData

java.lang.Object
mindustry.game.Teams.TeamData
Enclosing class:
Teams

public static class Teams.TeamData extends Object
  • Field Details

    • team

      public final Team team
    • buildAi

      @Nullable public BaseBuilderAI buildAi
      Handles building ""bases"".
    • rtsAi

      @Nullable public RtsAI rtsAi
      Handles RTS unit control.
    • coreEnemies

      public Team[] coreEnemies
      Enemies with cores or spawn points.
    • plans

      public Queue<Teams.BlockPlan> plans
      Planned blocks for drones. This is usually only blocks that have been broken.
    • cores

      public final Seq<CoreBlock.CoreBuild> cores
      List of live cores of this team.
    • lastCore

      @Nullable public CoreBlock.CoreBuild lastCore
      Last known live core of this team.
    • buildingTree

      @Nullable public QuadTree<mindustry.gen.Building> buildingTree
      Quadtree for all buildings of this team. Null if not active.
    • turretTree

      @Nullable public QuadTree<mindustry.gen.Building> turretTree
      Turrets by range. Null if not active.
    • unitTree

      @Nullable public QuadTree<mindustry.gen.Unit> unitTree
      Quadtree for units of this team. Do not access directly.
    • unitCap

      public int unitCap
      Current unit cap. Do not modify externally.
    • unitCount

      public int unitCount
      Total unit count.
    • typeCounts

      @Nullable public int[] typeCounts
      Counts for each type of unit. Do not access directly.
    • buildingTypes

      public ObjectMap<Block,Seq<mindustry.gen.Building>> buildingTypes
      Cached buildings by type.
    • units

      public Seq<mindustry.gen.Unit> units
      Units of this team. Updated each frame.
    • players

      public Seq<mindustry.gen.Player> players
      Same as units, but players.
    • buildings

      public Seq<mindustry.gen.Building> buildings
      All buildings. Updated on team change / building addition or removal. Includes even buildings that do not update().
    • unitsByType

      @Nullable public Seq<mindustry.gen.Unit>[] unitsByType
      Units of this team by type. Updated each frame.
  • Constructor Details

    • TeamData

      public TeamData(Team team)
  • Method Details

    • getBuildings

      public Seq<mindustry.gen.Building> getBuildings(Block block)
    • getCount

      public int getCount(Block block)
    • destroyToDerelict

      public void destroyToDerelict()
      Destroys this team's presence on the map, killing part of its buildings and converting everything to 'derelict'.
    • makeDerelict

      public void makeDerelict(float x, float y, float range)
      Make all buildings within this range derelict / explode.
    • timeDestroy

      public void timeDestroy(float x, float y, float range)
      Make all buildings within this range explode.
    • getUnits

      @Nullable public Seq<mindustry.gen.Unit> getUnits(UnitType type)
    • unitCache

      @Nullable public Seq<mindustry.gen.Unit> unitCache(UnitType type)
    • updateCount

      public void updateCount(UnitType type, int amount)
    • tree

      public QuadTree<mindustry.gen.Unit> tree()
    • countType

      public int countType(UnitType type)
    • active

      public boolean active()
    • hasCore

      public boolean hasCore()
    • noCores

      public boolean noCores()
    • core

    • hasAI

      public boolean hasAI()
      Returns:
      whether this team is controlled by the AI and builds bases.
    • toString

      public String toString()
      Overrides:
      toString in class Object