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 TypeFieldDescriptionboolean
final int
final arc.math.geom.Plane
final Planet
final Sector.SectorRect
float
Number 0-1 indicating the difficulty based on nearby bases.final PlanetGrid.Ptile
-
Constructor Summary
Constructors -
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()
arc.graphics.g2d.TextureRegion
icon()
iconChar()
boolean
boolean
boolean
items()
void
loadInfo()
boolean
locked()
protected Sector.SectorRect
makeRect()
Projects this sector onto a 4-corner square for use in map gen.name()
arc.struct.Seq<Sector>
near()
void
void
removeItem
(Item item, int amount) void
removeItems
(ItemSeq items) void
saveInfo()
void
toString()
boolean
unlocked()
-
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
-
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.
-