Package mindustry.type
Class Sector
java.lang.Object
mindustry.type.Sector
A small section of a planet.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanfinal intfinal arc.math.geom.Planefinal Planetfinal Sector.SectorRectfloatNumber 0-1 indicating the difficulty based on nearby bases.final PlanetGrid.Ptile -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanvoidRemoves any sector info.Displays threat as a formatted string.floatgetLight()floatintgetSize()booleanhasBase()booleanbooleanhasSave()arc.graphics.g2d.TextureRegionicon()iconChar()booleanbooleanbooleanbooleanitems()voidloadInfo()booleanlocked()protected Sector.SectorRectmakeRect()Projects this sector onto a 4-corner square for use in map gen.name()arc.struct.Seq<Sector>near()voidvoidremoveItem(Item item, int amount) voidremoveItems(ItemSeq items) voidsaveInfo()voidtoString()booleanunlocked()
-
Field Details
-
rect
-
plane
public final arc.math.geom.Plane plane -
planet
-
tile
-
id
public final int id -
save
-
preset
-
info
-
threat
public float threatNumber 0-1 indicating the difficulty based on nearby bases. -
generateEnemyBase
public boolean generateEnemyBase
-
-
Constructor Details
-
Sector
-
-
Method Details
-
near
-
near
-
isNear
-
displayThreat
Displays threat as a formatted string. -
unlocked
public boolean unlocked()- Returns:
- whether this sector can be landed on at all. Only sectors adjacent to non-wave sectors can be landed on.
-
allowLaunchSchematics
public boolean allowLaunchSchematics() -
allowLaunchLoadout
public boolean allowLaunchLoadout() -
saveInfo
public void saveInfo() -
loadInfo
public void loadInfo() -
clearInfo
public void clearInfo()Removes any sector info. -
getProductionScale
public float getProductionScale() -
isAttacked
public boolean isAttacked() -
hasBase
public boolean hasBase()- Returns:
- whether the player has a base (active save with a core) here.
-
hasEnemyBase
public boolean hasEnemyBase()- Returns:
- whether the enemy has a generated base here.
-
isBeingPlayed
public boolean isBeingPlayed() -
name
-
setName
-
icon
@Nullable public arc.graphics.g2d.TextureRegion icon() -
iconChar
-
isCaptured
public boolean isCaptured() -
hasSave
public boolean hasSave() -
locked
public boolean locked() -
getLight
public float getLight()- Returns:
- light dot product in the range [0, 1].
-
getSize
public int getSize()- Returns:
- the sector size, in tiles
-
removeItems
-
removeItem
-
addItems
-
items
- Returns:
- items currently in this sector, taking into account playing state.
-
toString
-
makeRect
Projects this sector onto a 4-corner square for use in map gen. Allocates a new object. Do not call in the main loop.
-