Package com.fs.starfarer.api.campaign
Interface StarSystemAPI
- All Superinterfaces:
LocationAPI
- Author:
- Alex Mosolov Copyright 2012 Fractal Softworks, LLC
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Calls autogenerateHyperspaceJumpPoints(false, false)void
autogenerateHyperspaceJumpPoints
(boolean generateEntrancesAtGasGiants, boolean generateFringeJumpPoint) Generates jump points into the system and adds them to hyperspace.void
autogenerateHyperspaceJumpPoints
(boolean generateEntrancesAtGasGiants, boolean generateFringeJumpPoint, boolean generatePlanetConditions) void
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()
Star name without "Star System" appended to it.Can be null for non-procgen systems.float
A location token corresponding to the center of the system in hyperspace.long
org.lwjgl.util.vector.Vector2f
float
Only considers jump points into the system generated by autogenerateHyperspaceJumpPoints.If non-null, will be used by the SectorAPI.getStarSystem(String) method.getStar()
getType()
boolean
boolean
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.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.Deprecated.boolean
boolean
Returns false if the constellation is null or contains only one star system.boolean
void
void
setBaseName
(String baseName) void
setCenter
(SectorEntityToken center) void
setConstellation
(Constellation constellation) void
setDoNotShowIntelFromThisLocationOnMap
(Boolean doNotShowIntelFromThisLocationOnMap) void
setEnteredByPlayer
(boolean enteredByPlayer) void
setHasSystemwideNebula
(Boolean hasSystemwideNebula) void
setHyperspaceAnchor
(SectorEntityToken hyperspaceAnchor) void
setLightColor
(Color lightColor) Only applicable if this location has a light source (i.e.void
setMapGridHeightOverride
(Float mapGridHeightOverride) void
setMapGridWidthOverride
(Float mapGridWidthOverride) void
setMaxRadiusInHyperspace
(float maxRadiusInHyperspace) void
setOptionalUniqueId
(String optionalUniqueId) If non-null, will be used by the SectorAPI.getStarSystem(String) method.void
setProcgen
(boolean isProcgen) void
setSecondary
(PlanetAPI secondary) void
void
setTertiary
(PlanetAPI tertiary) void
Methods inherited from interface com.fs.starfarer.api.campaign.LocationAPI
activeThisFrame, addAsteroid, addAsteroidBelt, addAsteroidBelt, addCorona, addCorona, addCustomEntity, addCustomEntity, addCustomEntity, addCustomEntity, addEntity, addFleetStub, addHitParticle, addOrbitalJunk, addParticle, addPlanet, addRadioChatter, addRingBand, addRingBand, addScript, addSpawnPoint, addTag, addTerrain, clearTags, createToken, createToken, getAllEntities, getAsteroids, getBackgroundColorShifter, getBackgroundParticleColorShifter, getBackgroundTextureFilename, getCustomEntities, getCustomEntitiesWithTag, getEntities, getEntitiesWithTag, getEntityById, getEntityByName, getFleets, getFleetStubs, getGravityWells, getId, getJumpPoints, getMemoryWithoutUpdate, getName, getNameWithLowercaseType, getNameWithLowercaseTypeShort, getNameWithNoType, getNameWithTypeIfNebula, getNameWithTypeShort, getOrbitalStations, getPersistentData, getPlanets, getScripts, getSpawnPoints, getTags, getTerrainCopy, hasTag, isCurrentLocation, isDeepSpace, isHyperspace, isNebula, removeEntity, removeFleetStub, removeScript, removeScriptsOfClass, removeSpawnPoint, removeTag, renderingLayersUpdated, setBackgroundOffset, setBackgroundTextureFilename, setName, spawnFleet, updateAllOrbits
-
Method Details
-
getLocation
org.lwjgl.util.vector.Vector2f getLocation()- Specified by:
getLocation
in interfaceLocationAPI
-
initStar
PlanetAPI 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:
id
- unique id for this startype
-color
-radius
-- Returns:
-
initStar
-
generateAnchorIfNeeded
void 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. -
initStar
Deprecated.Color argument is not used. Use PlanetAPI.getSpec() instead. -
initStar
PlanetAPI 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:
id
- unique id for this startype
-color
-radius
-hyperspaceLocationX
-hyperspaceLocationY
-- Returns:
-
getHyperspaceAnchor
SectorEntityToken getHyperspaceAnchor()A location token corresponding to the center of the system in hyperspace. -
setHyperspaceAnchor
-
getStar
PlanetAPI getStar() -
autogenerateHyperspaceJumpPoints
void autogenerateHyperspaceJumpPoints()Calls autogenerateHyperspaceJumpPoints(false, false) -
autogenerateHyperspaceJumpPoints
void 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:
generateEntrancesAtGasGiants
- whether one-way jump points into the system are generated at gas giantsgenerateFringeJumpPoint
- whether an extra jump point (two-way) is generated on the fringes of the system
-
getLightColor
Color getLightColor() -
setLightColor
Only applicable if this location has a light source (i.e. a star).- Parameters:
lightColor
-
-
getBaseName
String getBaseName()Star name without "Star System" appended to it.- Returns:
-
getMaxRadiusInHyperspace
float getMaxRadiusInHyperspace()Only considers jump points into the system generated by autogenerateHyperspaceJumpPoints.- Returns:
-
initNonStarCenter
SectorEntityToken initNonStarCenter() -
getCenter
SectorEntityToken getCenter() -
setStar
-
setBaseName
-
getSecondary
PlanetAPI getSecondary() -
setSecondary
-
getTertiary
PlanetAPI getTertiary() -
setTertiary
-
getAutogeneratedJumpPointsInHyper
List<JumpPointAPI> getAutogeneratedJumpPointsInHyper() -
getType
StarSystemGenerator.StarSystemType getType() -
setType
-
getConstellation
Constellation getConstellation()Can be null for non-procgen systems. Can be a one-system constellation for lone star systems.- Specified by:
getConstellation
in interfaceLocationAPI
- Returns:
-
isInConstellation
boolean isInConstellation()Returns false if the constellation is null or contains only one star system.- Specified by:
isInConstellation
in interfaceLocationAPI
- Returns:
-
setConstellation
-
setCenter
-
autogenerateHyperspaceJumpPoints
void autogenerateHyperspaceJumpPoints(boolean generateEntrancesAtGasGiants, boolean generateFringeJumpPoint, boolean generatePlanetConditions) -
setProcgen
void setProcgen(boolean isProcgen) -
isProcgen
boolean isProcgen() -
getAge
StarAge getAge() -
setAge
-
hasSystemwideNebula
Boolean hasSystemwideNebula() -
setHasSystemwideNebula
-
isEnteredByPlayer
boolean isEnteredByPlayer() -
setEnteredByPlayer
void setEnteredByPlayer(boolean enteredByPlayer) -
getLastPlayerVisitTimestamp
long getLastPlayerVisitTimestamp()- Specified by:
getLastPlayerVisitTimestamp
in interfaceLocationAPI
-
getDaysSinceLastPlayerVisit
float getDaysSinceLastPlayerVisit()- Specified by:
getDaysSinceLastPlayerVisit
in interfaceLocationAPI
-
hasPulsar
boolean hasPulsar() -
getDoNotShowIntelFromThisLocationOnMap
Boolean getDoNotShowIntelFromThisLocationOnMap() -
setDoNotShowIntelFromThisLocationOnMap
-
hasBlackHole
boolean hasBlackHole() -
getMapGridWidthOverride
Float getMapGridWidthOverride() -
setMapGridWidthOverride
-
getMapGridHeightOverride
Float getMapGridHeightOverride() -
setMapGridHeightOverride
-
setMaxRadiusInHyperspace
void setMaxRadiusInHyperspace(float maxRadiusInHyperspace) -
getOptionalUniqueId
String getOptionalUniqueId()If non-null, will be used by the SectorAPI.getStarSystem(String) method.- Parameters:
optionalUniqueId
-
-
setOptionalUniqueId
If non-null, will be used by the SectorAPI.getStarSystem(String) method.- Parameters:
optionalUniqueId
-
-
getAutogeneratedNascentWellsInHyper
List<NascentGravityWellAPI> getAutogeneratedNascentWellsInHyper()
-