Interface SectorEntityToken

All Superinterfaces:
HasMemory
All Known Subinterfaces:
AsteroidAPI, CampaignFleetAPI, CampaignProgressIndicatorAPI, CampaignTerrainAPI, CustomCampaignEntityAPI, JumpPointAPI, NascentGravityWellAPI, OrbitalStationAPI, PlanetAPI, RingBandAPI

public interface SectorEntityToken extends HasMemory
Author:
Alex Mosolov Copyright 2012 Fractal Softworks, LLC
  • Method Details

    • isPlayerFleet

      boolean isPlayerFleet()
    • getMarket

      MarketAPI getMarket()
    • setMarket

      void setMarket(MarketAPI market)
    • getCargo

      CargoAPI getCargo()
      For the player fleet, the actual cargo. For AI fleets, only non-logistics-related stuff - i.e. goods being carried, etc. NOT supplies/fuel/crew/etc.
      Returns:
    • getLocation

      org.lwjgl.util.vector.Vector2f getLocation()
    • getLocationInHyperspace

      org.lwjgl.util.vector.Vector2f getLocationInHyperspace()
      The location in hyperspace of the LocationAPI containing this entity, or this entity's location if it's already in hyperspace.
      Returns:
    • getOrbit

      OrbitAPI getOrbit()
    • setOrbit

      void setOrbit(OrbitAPI orbit)
    • getId

      String getId()
    • getName

      String getName()
    • getFullName

      String getFullName()
    • setFaction

      void setFaction(String factionId)
    • getContainingLocation

      LocationAPI getContainingLocation()
    • getRadius

      float getRadius()
    • getFaction

      FactionAPI getFaction()
    • getCustomDescriptionId

      String getCustomDescriptionId()
    • setCustomDescriptionId

      void setCustomDescriptionId(String customDescriptionId)
    • setCustomInteractionDialogImageVisual

      void setCustomInteractionDialogImageVisual(InteractionDialogImageVisual visual)
    • getCustomInteractionDialogImageVisual

      InteractionDialogImageVisual getCustomInteractionDialogImageVisual()
    • setFreeTransfer

      void setFreeTransfer(boolean freeTransfer)
      Whether moving ships and items to and from this entity has a cost.
      Parameters:
      freeTransfer -
    • isFreeTransfer

      boolean isFreeTransfer()
    • hasTag

      boolean hasTag(String tag)
    • addTag

      void addTag(String tag)
    • removeTag

      void removeTag(String tag)
    • getTags

      Collection<String> getTags()
    • clearTags

      void clearTags()
    • setFixedLocation

      void setFixedLocation(float x, float y)
    • setCircularOrbit

      void setCircularOrbit(SectorEntityToken focus, float angle, float orbitRadius, float orbitDays)
    • setCircularOrbitPointingDown

      void setCircularOrbitPointingDown(SectorEntityToken focus, float angle, float orbitRadius, float orbitDays)
    • setCircularOrbitWithSpin

      void setCircularOrbitWithSpin(SectorEntityToken focus, float angle, float orbitRadius, float orbitDays, float minSpin, float maxSpin)
    • getMemory

      MemoryAPI getMemory()
      Will cause the relevant updateFacts() methods to run to update the entity's perception of the world. Return value should be stored and re-used rather than calling this method again, unless a fact update is needed.
      Specified by:
      getMemory in interface HasMemory
      Returns:
    • getMemoryWithoutUpdate

      MemoryAPI getMemoryWithoutUpdate()
      Get the memory without updating facts.
      Specified by:
      getMemoryWithoutUpdate in interface HasMemory
      Returns:
    • getFacing

      float getFacing()
    • setFacing

      void setFacing(float facing)
    • isInHyperspace

      boolean isInHyperspace()
    • addScript

      void addScript(EveryFrameScript script)
    • removeScript

      void removeScript(EveryFrameScript script)
    • removeScriptsOfClass

      void removeScriptsOfClass(Class c)
    • isInOrNearSystem

      boolean isInOrNearSystem(StarSystemAPI system)
      True if in system or within commRelayRangeAroundSystem light-years.
      Parameters:
      system -
      Returns:
    • isInCurrentLocation

      boolean isInCurrentLocation()
    • getVelocity

      org.lwjgl.util.vector.Vector2f getVelocity()
      In pixels per second.
      Returns:
    • setInteractionImage

      void setInteractionImage(String category, String key)
    • setName

      void setName(String name)
    • isAlive

      boolean isAlive()
      Returns false if: 1) getContainingLocation() is null, or 2) getContainingLocation() doesn't contain this entity
      Returns:
    • getActivePerson

      PersonAPI getActivePerson()
    • setActivePerson

      void setActivePerson(PersonAPI activePerson)
    • isVisibleToSensorsOf

      boolean isVisibleToSensorsOf(SectorEntityToken other)
    • isVisibleToPlayerFleet

      boolean isVisibleToPlayerFleet()
    • getVisibilityLevelToPlayerFleet

      SectorEntityToken.VisibilityLevel getVisibilityLevelToPlayerFleet()
    • getVisibilityLevelTo

    • addAbility

      void addAbility(String id)
    • removeAbility

      void removeAbility(String id)
    • getAbility

      AbilityPlugin getAbility(String id)
    • hasAbility

      boolean hasAbility(String id)
    • getAbilities

      Map<String,AbilityPlugin> getAbilities()
    • isTransponderOn

      boolean isTransponderOn()
    • setTransponderOn

      void setTransponderOn(boolean transponderOn)
    • addFloatingText

      void addFloatingText(String text, Color color, float duration)
    • getLightSource

      SectorEntityToken getLightSource()
    • getLightColor

      Color getLightColor()
    • setMemory

      void setMemory(MemoryAPI memory)
    • getCustomData

      Map<String,Object> getCustomData()
    • getIndicatorColor

      Color getIndicatorColor()
    • getCustomPlugin

      CustomCampaignEntityPlugin getCustomPlugin()
      Only returns non-null for custom campaign entities with a plugin.
      Returns:
    • getCircularOrbitRadius

      float getCircularOrbitRadius()
    • getCircularOrbitPeriod

      float getCircularOrbitPeriod()
    • getOrbitFocus

      SectorEntityToken getOrbitFocus()
    • setId

      void setId(String id)
    • getAutogenJumpPointNameInHyper

      String getAutogenJumpPointNameInHyper()
    • setAutogenJumpPointNameInHyper

      void setAutogenJumpPointNameInHyper(String autogenJumpPointNameInHyper)
    • isSkipForJumpPointAutoGen

      boolean isSkipForJumpPointAutoGen()
    • setSkipForJumpPointAutoGen

      void setSkipForJumpPointAutoGen(boolean skipForJumpPointAutoGen)
    • getCircularOrbitAngle

      float getCircularOrbitAngle()
    • getCustomEntityType

      String getCustomEntityType()
    • getSensorStrength

      float getSensorStrength()
    • setSensorStrength

      void setSensorStrength(Float sensorStrength)
    • getSensorProfile

      float getSensorProfile()
    • setSensorProfile

      void setSensorProfile(Float sensorProfile)
    • getDetectedRangeMod

      StatBonus getDetectedRangeMod()
    • getSensorRangeMod

      StatBonus getSensorRangeMod()
    • getBaseSensorRangeToDetect

      float getBaseSensorRangeToDetect(float sensorProfile)
    • hasSensorStrength

      boolean hasSensorStrength()
    • hasSensorProfile

      boolean hasSensorProfile()
    • getMaxSensorRangeToDetect

      float getMaxSensorRangeToDetect(SectorEntityToken other)
      Does not includes fleet radii - i.e. the returned range is from outer edge to outer edge.
      Returns:
    • isDiscoverable

      boolean isDiscoverable()
    • setDiscoverable

      void setDiscoverable(Boolean discoverable)
    • getCustomEntitySpec

      CustomEntitySpecAPI getCustomEntitySpec()
    • getDropValue

    • getDropRandom

    • addDropValue

      void addDropValue(String group, int value)
    • addDropRandom

      void addDropRandom(String group, int chances)
    • addDropRandom

      void addDropRandom(String group, int chances, int value)
    • isExpired

      boolean isExpired()
    • setExpired

      void setExpired(boolean expired)
    • getSensorFaderBrightness

      float getSensorFaderBrightness()
    • getSensorContactFaderBrightness

      float getSensorContactFaderBrightness()
    • forceSensorFaderBrightness

      void forceSensorFaderBrightness(float b)
    • getDiscoveryXP

      Float getDiscoveryXP()
    • setDiscoveryXP

      void setDiscoveryXP(Float discoveryXP)
    • hasDiscoveryXP

      boolean hasDiscoveryXP()
    • addDropValue

      void addDropValue(SalvageEntityGenDataSpec.DropData data)
    • addDropRandom

      void addDropRandom(SalvageEntityGenDataSpec.DropData data)
    • setAlwaysUseSensorFaderBrightness

      void setAlwaysUseSensorFaderBrightness(Boolean alwaysUseSensorFaderBrightness)
      Always use sensor fader brightness for rendering circular indicator around the entity.
      Parameters:
      alwaysUseSensorFaderBrightness -
    • getAlwaysUseSensorFaderBrightness

      Boolean getAlwaysUseSensorFaderBrightness()
    • advance

      void advance(float amount)
    • hasScriptOfClass

      boolean hasScriptOfClass(Class c)
    • setContainingLocation

      void setContainingLocation(LocationAPI location)
    • clearAbilities

      void clearAbilities()
    • getConstellation

      Constellation getConstellation()
    • isStar

      boolean isStar()
    • getSalvageXP

      Float getSalvageXP()
    • setSalvageXP

      void setSalvageXP(Float salvageXP)
    • hasSalvageXP

      boolean hasSalvageXP()
    • setDetectionRangeDetailsOverrideMult

      void setDetectionRangeDetailsOverrideMult(Float detectionRangeDetailsOverrideMult)
    • getDetectionRangeDetailsOverrideMult

      Float getDetectionRangeDetailsOverrideMult()
    • getVisibilityLevelOfPlayerFleet

      SectorEntityToken.VisibilityLevel getVisibilityLevelOfPlayerFleet()
    • setCircularOrbitAngle

      void setCircularOrbitAngle(float angle)
    • addFloatingText

      void addFloatingText(String text, Color color, float duration, boolean showWhenOnlySensorContact)
    • isSystemCenter

      boolean isSystemCenter()
    • getStarSystem

      StarSystemAPI getStarSystem()
    • clearFloatingText

      void clearFloatingText()
    • setLocation

      void setLocation(float x, float y)
    • autoUpdateHyperLocationBasedOnInSystemEntityAtRadius

      void autoUpdateHyperLocationBasedOnInSystemEntityAtRadius(SectorEntityToken entity, float radius)
    • forceSensorContactFaderBrightness

      void forceSensorContactFaderBrightness(float b)
    • forceSensorFaderOut

      void forceSensorFaderOut()
    • setLightSource

      void setLightSource(SectorEntityToken star, Color color)
    • getScripts

      List<EveryFrameScript> getScripts()
    • getExtendedDetectedAtRange

      float getExtendedDetectedAtRange()
      Applies to the 5000/2000 max sensor range limit in normal/hyper space. Does not, by itself, increase the range at which the entity is detected, just applies to the limit.
      Returns:
    • setExtendedDetectedAtRange

      void setExtendedDetectedAtRange(Float extendedDetectedAtRange)
      Applies to the 5000/2000 max sensor range limit in normal/hyper space. Does not, by itself, increase the range at which the entity is detected, just applies to the limit.
    • fadeOutIndicator

      void fadeOutIndicator()
    • fadeInIndicator

      void fadeInIndicator()
    • forceOutIndicator

      void forceOutIndicator()
    • setOrbitFocus

      void setOrbitFocus(SectorEntityToken focus)