Class SensorGhostManager
java.lang.Object
com.fs.starfarer.api.impl.campaign.ghosts.SensorGhostManager
- All Implemented Interfaces:
EveryFrameScript
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic List<SensorGhostCreator>
static float
static float
static float
protected List<SensorGhost>
static float
static float
static float
static float
static float
static float
static float
static float
protected TimeoutTracker<String>
protected Random
static float
static float
protected float
protected boolean
protected float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) Use SectorAPI.getClock() to convert to campaign days.void
static SensorGhost
getGhostFor
(SectorEntityToken entity) static SensorGhostManager
boolean
hasGhostOfClass
(Class<?> clazz) boolean
isDone()
boolean
boolean
void
-
Field Details
-
CREATORS
-
GHOST_SPAWN_RATE_MULT
public static float GHOST_SPAWN_RATE_MULT -
GHOST_SPAWN_RATE_MULT_IN_ABYSS
public static float GHOST_SPAWN_RATE_MULT_IN_ABYSS -
SB_ATTRACT_GHOSTS_PROBABILITY
public static float SB_ATTRACT_GHOSTS_PROBABILITY -
SB_FAILED_TO_ATTRACT_TIMEOUT_MULT
public static float SB_FAILED_TO_ATTRACT_TIMEOUT_MULT -
MIN_SB_TIMEOUT
public static float MIN_SB_TIMEOUT -
MAX_SB_TIMEOUT
public static float MAX_SB_TIMEOUT -
MIN_FULL_GHOST_TIMEOUT_DAYS
public static float MIN_FULL_GHOST_TIMEOUT_DAYS -
MAX_FULL_GHOST_TIMEOUT_DAYS
public static float MAX_FULL_GHOST_TIMEOUT_DAYS -
MIN_SHORT_GHOST_TIMEOUT_DAYS
public static float MIN_SHORT_GHOST_TIMEOUT_DAYS -
MAX_SHORT_GHOST_TIMEOUT_DAYS
public static float MAX_SHORT_GHOST_TIMEOUT_DAYS -
FULL_TIMEOUT_TRIGGER_PROBABILITY
public static float FULL_TIMEOUT_TRIGGER_PROBABILITY -
MIN_FAILED_CREATOR_TIMEOUT_DAYS
public static float MIN_FAILED_CREATOR_TIMEOUT_DAYS -
MAX_FAILED_CREATOR_TIMEOUT_DAYS
public static float MAX_FAILED_CREATOR_TIMEOUT_DAYS -
perCreatorTimeouts
-
timeoutRemaining
protected float timeoutRemaining -
sbTimeoutRemaining
protected float sbTimeoutRemaining -
random
-
ghosts
-
spawnTriggeredBySensorBurst
protected boolean spawnTriggeredBySensorBurst
-
-
Constructor Details
-
SensorGhostManager
public SensorGhostManager()
-
-
Method Details
-
getGhostManager
-
getGhostFor
-
advance
public void advance(float amount) Description copied from interface:EveryFrameScript
Use SectorAPI.getClock() to convert to campaign days.- Specified by:
advance
in interfaceEveryFrameScript
- Parameters:
amount
- seconds elapsed during the last frame.
-
isSpawnTriggeredBySensorBurst
public boolean isSpawnTriggeredBySensorBurst() -
checkSensorBursts
public void checkSensorBursts() -
spawnGhost
public void spawnGhost() -
hasGhostOfClass
-
getRandom
-
runWhilePaused
public boolean runWhilePaused()- Specified by:
runWhilePaused
in interfaceEveryFrameScript
- Returns:
- whether advance() should be called while the campaign engine is paused.
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceEveryFrameScript
- Returns:
- true when the script is finished and can be cleaned up by the engine.
-
getGhosts
-