Class SensorGhostManager

java.lang.Object
com.fs.starfarer.api.impl.campaign.ghosts.SensorGhostManager
All Implemented Interfaces:
EveryFrameScript

public class SensorGhostManager extends Object implements EveryFrameScript
  • Field Details

    • CREATORS

      public static List<SensorGhostCreator> 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

      protected TimeoutTracker<String> perCreatorTimeouts
    • timeoutRemaining

      protected float timeoutRemaining
    • sbTimeoutRemaining

      protected float sbTimeoutRemaining
    • random

      protected Random random
    • ghosts

      protected List<SensorGhost> ghosts
    • spawnTriggeredBySensorBurst

      protected boolean spawnTriggeredBySensorBurst
  • Constructor Details

    • SensorGhostManager

      public SensorGhostManager()
  • Method Details

    • getGhostManager

      public static SensorGhostManager getGhostManager()
    • getGhostFor

      public static SensorGhost getGhostFor(SectorEntityToken entity)
    • advance

      public void advance(float amount)
      Description copied from interface: EveryFrameScript
      Use SectorAPI.getClock() to convert to campaign days.
      Specified by:
      advance in interface EveryFrameScript
      Parameters:
      amount - seconds elapsed during the last frame.
    • isSpawnTriggeredBySensorBurst

      public boolean isSpawnTriggeredBySensorBurst()
    • checkSensorBursts

      public void checkSensorBursts()
    • spawnGhost

      public void spawnGhost()
    • hasGhostOfClass

      public boolean hasGhostOfClass(Class<?> clazz)
    • getRandom

      public Random getRandom()
    • runWhilePaused

      public boolean runWhilePaused()
      Specified by:
      runWhilePaused in interface EveryFrameScript
      Returns:
      whether advance() should be called while the campaign engine is paused.
    • isDone

      public boolean isDone()
      Specified by:
      isDone in interface EveryFrameScript
      Returns:
      true when the script is finished and can be cleaned up by the engine.
    • getGhosts

      public List<SensorGhost> getGhosts()