Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.campaign.StarSystemAPI Interface Reference
Inheritance diagram for com.fs.starfarer.api.campaign.StarSystemAPI:
[legend]
Collaboration diagram for com.fs.starfarer.api.campaign.StarSystemAPI:
[legend]

Public Member Functions

Vector2f getLocation ()
 
PlanetAPI initStar (String id, String type, float radius, float coronaSize, float windBurnLevel, float flareProbability, float crLossMult)
 
PlanetAPI initStar (String id, String type, float radius, float coronaSize)
 
void generateAnchorIfNeeded ()
 
PlanetAPI initStar (String id, String type, Color color, float radius, float coronaSize)
 
PlanetAPI initStar (String id, String type, float radius, float hyperspaceLocationX, float hyperspaceLocationY, float coronaSize)
 
SectorEntityToken getHyperspaceAnchor ()
 
void setHyperspaceAnchor (SectorEntityToken hyperspaceAnchor)
 
PlanetAPI getStar ()
 
void autogenerateHyperspaceJumpPoints ()
 
void autogenerateHyperspaceJumpPoints (boolean generateEntrancesAtGasGiants, boolean generateFringeJumpPoint)
 
Color getLightColor ()
 
void setLightColor (Color lightColor)
 
String getBaseName ()
 
float getMaxRadiusInHyperspace ()
 
SectorEntityToken initNonStarCenter ()
 
SectorEntityToken getCenter ()
 
void setStar (PlanetAPI star)
 
void setBaseName (String baseName)
 
PlanetAPI getSecondary ()
 
void setSecondary (PlanetAPI secondary)
 
PlanetAPI getTertiary ()
 
void setTertiary (PlanetAPI tertiary)
 
List< JumpPointAPIgetAutogeneratedJumpPointsInHyper ()
 
StarSystemType getType ()
 
void setType (StarSystemType type)
 
Constellation getConstellation ()
 
boolean isInConstellation ()
 
void setConstellation (Constellation constellation)
 
void setCenter (SectorEntityToken center)
 
void autogenerateHyperspaceJumpPoints (boolean generateEntrancesAtGasGiants, boolean generateFringeJumpPoint, boolean generatePlanetConditions)
 
void setProcgen (boolean isProcgen)
 
boolean isProcgen ()
 
StarAge getAge ()
 
void setAge (StarAge age)
 
Boolean hasSystemwideNebula ()
 
void setHasSystemwideNebula (Boolean hasSystemwideNebula)
 
boolean isEnteredByPlayer ()
 
void setEnteredByPlayer (boolean enteredByPlayer)
 
long getLastPlayerVisitTimestamp ()
 
float getDaysSinceLastPlayerVisit ()
 
boolean hasPulsar ()
 
Boolean getDoNotShowIntelFromThisLocationOnMap ()
 
void setDoNotShowIntelFromThisLocationOnMap (Boolean doNotShowIntelFromThisLocationOnMap)
 
boolean hasBlackHole ()
 
Float getMapGridWidthOverride ()
 
void setMapGridWidthOverride (Float mapGridWidthOverride)
 
Float getMapGridHeightOverride ()
 
void setMapGridHeightOverride (Float mapGridHeightOverride)
 
void setMaxRadiusInHyperspace (float maxRadiusInHyperspace)
 
String getOptionalUniqueId ()
 
void setOptionalUniqueId (String optionalUniqueId)
 
List< NascentGravityWellAPIgetAutogeneratedNascentWellsInHyper ()
 
- Public Member Functions inherited from com.fs.starfarer.api.campaign.LocationAPI
String getId ()
 
boolean activeThisFrame ()
 
String getBackgroundTextureFilename ()
 
void setBackgroundTextureFilename (String backgroundTextureFilename)
 
void addSpawnPoint (SpawnPointPlugin point)
 
void removeSpawnPoint (SpawnPointPlugin point)
 
List< SpawnPointPlugingetSpawnPoints ()
 
void spawnFleet (SectorEntityToken anchor, float xOffset, float yOffset, CampaignFleetAPI fleet)
 
SectorEntityToken createToken (float x, float y)
 
SectorEntityToken createToken (Vector2f loc)
 
void addEntity (SectorEntityToken entity)
 
void removeEntity (SectorEntityToken entity)
 
PlanetAPI addPlanet (String id, SectorEntityToken focus, String name, String type, float angle, float radius, float orbitRadius, float orbitDays)
 
SectorEntityToken addAsteroidBelt (SectorEntityToken focus, int numAsteroids, float orbitRadius, float width, float minOrbitDays, float maxOrbitDays)
 
SectorEntityToken addAsteroidBelt (SectorEntityToken focus, int numAsteroids, float orbitRadius, float width, float minOrbitDays, float maxOrbitDays, String terrainId, String optionalName)
 
void addOrbitalJunk (SectorEntityToken focus, String junkType, int num, float minSize, float maxSize, float orbitRadius, float width, float minOrbitDays, float maxOrbitDays, float minSpin, float maxSpin)
 
RingBandAPI addRingBand (SectorEntityToken focus, String category, String key, float bandWidthInTexture, int bandIndex, Color color, float bandWidthInEngine, float middleRadius, float orbitDays)
 
SectorEntityToken addRingBand (SectorEntityToken focus, String category, String key, float bandWidthInTexture, int bandIndex, Color color, float bandWidthInEngine, float middleRadius, float orbitDays, String terrainId, String optionalName)
 
CustomCampaignEntityAPI addCustomEntity (String id, String name, String type, String factionId)
 
CustomCampaignEntityAPI addCustomEntity (String id, String name, String type, String factionId, float radius, float spriteWidth, float spriteHeight)
 
SectorEntityToken addTerrain (String terrainId, Object param)
 
List getEntities (Class implementedClassOrInterface)
 
List< SectorEntityTokengetEntitiesWithTag (String tag)
 
List< CampaignFleetAPIgetFleets ()
 
List< PlanetAPIgetPlanets ()
 
List< SectorEntityTokengetOrbitalStations ()
 
List< SectorEntityTokengetAsteroids ()
 
SectorEntityToken getEntityByName (String name)
 
SectorEntityToken getEntityById (String id)
 
boolean isHyperspace ()
 
void addScript (EveryFrameScript script)
 
void removeScriptsOfClass (Class c)
 
void removeScript (EveryFrameScript script)
 
String getName ()
 
void setName (String name)
 
List< SectorEntityTokengetAllEntities ()
 
SectorEntityToken addCorona (SectorEntityToken star, float extraRadius, float windBurnLevel, float flareProbability, float crLossMult)
 
SectorEntityToken addCorona (SectorEntityToken star, String terrainType, float extraRadius, float windBurnLevel, float flareProbability, float crLossMult)
 
List< CampaignTerrainAPIgetTerrainCopy ()
 
Map< String, Object > getPersistentData ()
 
AsteroidAPI addAsteroid (float radius)
 
void setBackgroundOffset (float x, float y)
 
SectorEntityToken addRadioChatter (SectorEntityToken entity, float extraRadius)
 
void updateAllOrbits ()
 
boolean isNebula ()
 
String getNameWithLowercaseType ()
 
List< FleetStubAPIgetFleetStubs ()
 
void removeFleetStub (FleetStubAPI stub)
 
void addFleetStub (FleetStubAPI stub)
 
String getNameWithTypeIfNebula ()
 
Collection< String > getTags ()
 
boolean hasTag (String tag)
 
void addTag (String tag)
 
void removeTag (String tag)
 
void clearTags ()
 
CustomCampaignEntityAPI addCustomEntity (String id, String name, String type, String factionId, float radius, float spriteWidth, float spriteHeight, Object pluginParams)
 
CustomCampaignEntityAPI addCustomEntity (String id, String name, String type, String factionId, Object pluginParams)
 
List< SectorEntityTokengetJumpPoints ()
 
List< CustomCampaignEntityAPIgetCustomEntitiesWithTag (String tag)
 
List< EveryFrameScriptgetScripts ()
 
void addHitParticle (Vector2f loc, Vector2f vel, float size, float brightness, float duration, Color color)
 
void renderingLayersUpdated (SectorEntityToken entity)
 
MemoryAPI getMemoryWithoutUpdate ()
 
ParticleControllerAPI addParticle (Vector2f loc, Vector2f vel, float size, float brightness, float rampUp, float duration, Color color)
 
String getNameWithNoType ()
 
boolean isCurrentLocation ()
 
String getNameWithLowercaseTypeShort ()
 
String getNameWithTypeShort ()
 
List< NascentGravityWellAPIgetGravityWells ()
 
List< CustomCampaignEntityAPIgetCustomEntities ()
 
ColorShifterAPI getBackgroundColorShifter ()
 
ColorShifterAPI getBackgroundParticleColorShifter ()
 
boolean isDeepSpace ()
 

Detailed Description

Author
Alex Mosolov

Copyright 2012 Fractal Softworks, LLC

Definition at line 17 of file StarSystemAPI.java.

Member Function Documentation

◆ autogenerateHyperspaceJumpPoints() [1/3]

void com.fs.starfarer.api.campaign.StarSystemAPI.autogenerateHyperspaceJumpPoints ( )

Calls autogenerateHyperspaceJumpPoints(false, false)

◆ autogenerateHyperspaceJumpPoints() [2/3]

void com.fs.starfarer.api.campaign.StarSystemAPI.autogenerateHyperspaceJumpPoints ( boolean  generateEntrancesAtGasGiants,
boolean  generateFringeJumpPoint 
)

Generates jump points into the system and adds them to hyperspace.

Jump points generated are based on the jump points within the system.

Also adds jump destinations from all in-system jump points to the associated, newly-generated hyperspace jump points.

Will also generate a wormhole for the star if one doesn't exist already.

Parameters
generateEntrancesAtGasGiantswhether one-way jump points into the system are generated at gas giants
generateFringeJumpPointwhether an extra jump point (two-way) is generated on the fringes of the system

◆ autogenerateHyperspaceJumpPoints() [3/3]

void com.fs.starfarer.api.campaign.StarSystemAPI.autogenerateHyperspaceJumpPoints ( boolean  generateEntrancesAtGasGiants,
boolean  generateFringeJumpPoint,
boolean  generatePlanetConditions 
)

◆ generateAnchorIfNeeded()

void com.fs.starfarer.api.campaign.StarSystemAPI.generateAnchorIfNeeded ( )

Generates the hyperspace anchor for the star (and nothing else - no gas giant gravity wells or fringe jump point), unless one was already generated.

◆ getAge()

StarAge com.fs.starfarer.api.campaign.StarSystemAPI.getAge ( )

◆ getAutogeneratedJumpPointsInHyper()

List< JumpPointAPI > com.fs.starfarer.api.campaign.StarSystemAPI.getAutogeneratedJumpPointsInHyper ( )

◆ getAutogeneratedNascentWellsInHyper()

List< NascentGravityWellAPI > com.fs.starfarer.api.campaign.StarSystemAPI.getAutogeneratedNascentWellsInHyper ( )

◆ getBaseName()

String com.fs.starfarer.api.campaign.StarSystemAPI.getBaseName ( )

Star name without "Star System" appended to it.

Returns

◆ getCenter()

SectorEntityToken com.fs.starfarer.api.campaign.StarSystemAPI.getCenter ( )

◆ getConstellation()

Constellation com.fs.starfarer.api.campaign.StarSystemAPI.getConstellation ( )

Can be null for non-procgen systems. Can be a one-system constellation for lone star systems.

Returns

Implements com.fs.starfarer.api.campaign.LocationAPI.

◆ getDaysSinceLastPlayerVisit()

float com.fs.starfarer.api.campaign.StarSystemAPI.getDaysSinceLastPlayerVisit ( )

◆ getDoNotShowIntelFromThisLocationOnMap()

Boolean com.fs.starfarer.api.campaign.StarSystemAPI.getDoNotShowIntelFromThisLocationOnMap ( )

◆ getHyperspaceAnchor()

SectorEntityToken com.fs.starfarer.api.campaign.StarSystemAPI.getHyperspaceAnchor ( )

A location token corresponding to the center of the system in hyperspace.

◆ getLastPlayerVisitTimestamp()

long com.fs.starfarer.api.campaign.StarSystemAPI.getLastPlayerVisitTimestamp ( )

◆ getLightColor()

Color com.fs.starfarer.api.campaign.StarSystemAPI.getLightColor ( )

◆ getLocation()

Vector2f com.fs.starfarer.api.campaign.StarSystemAPI.getLocation ( )

◆ getMapGridHeightOverride()

Float com.fs.starfarer.api.campaign.StarSystemAPI.getMapGridHeightOverride ( )

◆ getMapGridWidthOverride()

Float com.fs.starfarer.api.campaign.StarSystemAPI.getMapGridWidthOverride ( )

◆ getMaxRadiusInHyperspace()

float com.fs.starfarer.api.campaign.StarSystemAPI.getMaxRadiusInHyperspace ( )

Only considers jump points into the system generated by autogenerateHyperspaceJumpPoints.

Returns

◆ getOptionalUniqueId()

String com.fs.starfarer.api.campaign.StarSystemAPI.getOptionalUniqueId ( )

If non-null, will be used by the SectorAPI.getStarSystem(String) method.

Parameters
optionalUniqueId

◆ getSecondary()

PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.getSecondary ( )

◆ getStar()

PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.getStar ( )

◆ getTertiary()

PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.getTertiary ( )

◆ getType()

StarSystemType com.fs.starfarer.api.campaign.StarSystemAPI.getType ( )

◆ hasBlackHole()

boolean com.fs.starfarer.api.campaign.StarSystemAPI.hasBlackHole ( )

◆ hasPulsar()

boolean com.fs.starfarer.api.campaign.StarSystemAPI.hasPulsar ( )

◆ hasSystemwideNebula()

Boolean com.fs.starfarer.api.campaign.StarSystemAPI.hasSystemwideNebula ( )

◆ initNonStarCenter()

SectorEntityToken com.fs.starfarer.api.campaign.StarSystemAPI.initNonStarCenter ( )

◆ initStar() [1/4]

PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.initStar ( String  id,
String  type,
Color  color,
float  radius,
float  coronaSize 
)

Color argument is not used. Use PlanetAPI.getSpec() instead.

◆ initStar() [2/4]

PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.initStar ( String  id,
String  type,
float  radius,
float  coronaSize 
)

◆ initStar() [3/4]

PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.initStar ( String  id,
String  type,
float  radius,
float  coronaSize,
float  windBurnLevel,
float  flareProbability,
float  crLossMult 
)

Will not automatically generate a hyperspace anchor for the star. Call autogenerateHyperspaceJumpPoints() to do that, or create the anchor manually using JumpPointAPI.

Parameters
idunique id for this star
type
color
radius
Returns

◆ initStar() [4/4]

PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.initStar ( String  id,
String  type,
float  radius,
float  hyperspaceLocationX,
float  hyperspaceLocationY,
float  coronaSize 
)

Also automatically creates a wormhole/jump point leading to the star from hyperspace. This wormhole can be accessed using getHyperspaceAnchor().

Parameters
idunique id for this star
type
color
radius
hyperspaceLocationX
hyperspaceLocationY
Returns

◆ isEnteredByPlayer()

boolean com.fs.starfarer.api.campaign.StarSystemAPI.isEnteredByPlayer ( )

◆ isInConstellation()

boolean com.fs.starfarer.api.campaign.StarSystemAPI.isInConstellation ( )

Returns false if the constellation is null or contains only one star system.

Returns

Implements com.fs.starfarer.api.campaign.LocationAPI.

◆ isProcgen()

boolean com.fs.starfarer.api.campaign.StarSystemAPI.isProcgen ( )

◆ setAge()

void com.fs.starfarer.api.campaign.StarSystemAPI.setAge ( StarAge  age)

◆ setBaseName()

void com.fs.starfarer.api.campaign.StarSystemAPI.setBaseName ( String  baseName)

◆ setCenter()

void com.fs.starfarer.api.campaign.StarSystemAPI.setCenter ( SectorEntityToken  center)

◆ setConstellation()

void com.fs.starfarer.api.campaign.StarSystemAPI.setConstellation ( Constellation  constellation)

◆ setDoNotShowIntelFromThisLocationOnMap()

void com.fs.starfarer.api.campaign.StarSystemAPI.setDoNotShowIntelFromThisLocationOnMap ( Boolean  doNotShowIntelFromThisLocationOnMap)

◆ setEnteredByPlayer()

void com.fs.starfarer.api.campaign.StarSystemAPI.setEnteredByPlayer ( boolean  enteredByPlayer)

◆ setHasSystemwideNebula()

void com.fs.starfarer.api.campaign.StarSystemAPI.setHasSystemwideNebula ( Boolean  hasSystemwideNebula)

◆ setHyperspaceAnchor()

void com.fs.starfarer.api.campaign.StarSystemAPI.setHyperspaceAnchor ( SectorEntityToken  hyperspaceAnchor)

◆ setLightColor()

void com.fs.starfarer.api.campaign.StarSystemAPI.setLightColor ( Color  lightColor)

Only applicable if this location has a light source (i.e. a star).

Parameters
lightColor

◆ setMapGridHeightOverride()

void com.fs.starfarer.api.campaign.StarSystemAPI.setMapGridHeightOverride ( Float  mapGridHeightOverride)

◆ setMapGridWidthOverride()

void com.fs.starfarer.api.campaign.StarSystemAPI.setMapGridWidthOverride ( Float  mapGridWidthOverride)

◆ setMaxRadiusInHyperspace()

void com.fs.starfarer.api.campaign.StarSystemAPI.setMaxRadiusInHyperspace ( float  maxRadiusInHyperspace)

◆ setOptionalUniqueId()

void com.fs.starfarer.api.campaign.StarSystemAPI.setOptionalUniqueId ( String  optionalUniqueId)

If non-null, will be used by the SectorAPI.getStarSystem(String) method.

Parameters
optionalUniqueId

◆ setProcgen()

void com.fs.starfarer.api.campaign.StarSystemAPI.setProcgen ( boolean  isProcgen)

◆ setSecondary()

void com.fs.starfarer.api.campaign.StarSystemAPI.setSecondary ( PlanetAPI  secondary)

◆ setStar()

void com.fs.starfarer.api.campaign.StarSystemAPI.setStar ( PlanetAPI  star)

◆ setTertiary()

void com.fs.starfarer.api.campaign.StarSystemAPI.setTertiary ( PlanetAPI  tertiary)

◆ setType()

void com.fs.starfarer.api.campaign.StarSystemAPI.setType ( StarSystemType  type)

The documentation for this interface was generated from the following file: