Package mindustry.type
Class Sector
java.lang.Object
mindustry.type.Sector
A small section of a planet.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionboolean
final int
final Plane
final Planet
final Sector.SectorRect
float
Number 0-1 indicating the difficulty based on nearby bases.final PlanetGrid.Ptile
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
void
Removes any sector info.Displays threat as a formatted string.float
getLight()
float
int
getSize()
boolean
hasBase()
boolean
boolean
hasSave()
icon()
iconChar()
boolean
boolean
boolean
items()
void
loadInfo()
boolean
locked()
name()
near()
void
void
removeItem
(Item item, int amount) void
removeItems
(ItemSeq items) void
saveInfo()
void
toString()
boolean
unlocked()
-
Field Details
-
rect
-
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
-
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
-
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
-