Starsector API
|
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< JumpPointAPI > | getAutogeneratedJumpPointsInHyper () |
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< NascentGravityWellAPI > | getAutogeneratedNascentWellsInHyper () |
![]() | |
String | getId () |
boolean | activeThisFrame () |
String | getBackgroundTextureFilename () |
void | setBackgroundTextureFilename (String backgroundTextureFilename) |
void | addSpawnPoint (SpawnPointPlugin point) |
void | removeSpawnPoint (SpawnPointPlugin point) |
List< SpawnPointPlugin > | getSpawnPoints () |
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< SectorEntityToken > | getEntitiesWithTag (String tag) |
List< CampaignFleetAPI > | getFleets () |
List< PlanetAPI > | getPlanets () |
List< SectorEntityToken > | getOrbitalStations () |
List< SectorEntityToken > | getAsteroids () |
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< SectorEntityToken > | getAllEntities () |
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< CampaignTerrainAPI > | getTerrainCopy () |
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< FleetStubAPI > | getFleetStubs () |
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< SectorEntityToken > | getJumpPoints () |
List< CustomCampaignEntityAPI > | getCustomEntitiesWithTag (String tag) |
List< EveryFrameScript > | getScripts () |
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< NascentGravityWellAPI > | getGravityWells () |
List< CustomCampaignEntityAPI > | getCustomEntities () |
ColorShifterAPI | getBackgroundColorShifter () |
ColorShifterAPI | getBackgroundParticleColorShifter () |
boolean | isDeepSpace () |
Copyright 2012 Fractal Softworks, LLC
Definition at line 17 of file StarSystemAPI.java.
void com.fs.starfarer.api.campaign.StarSystemAPI.autogenerateHyperspaceJumpPoints | ( | ) |
Calls autogenerateHyperspaceJumpPoints(false, false)
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.
generateEntrancesAtGasGiants | whether one-way jump points into the system are generated at gas giants |
generateFringeJumpPoint | whether an extra jump point (two-way) is generated on the fringes of the system |
void com.fs.starfarer.api.campaign.StarSystemAPI.autogenerateHyperspaceJumpPoints | ( | boolean | generateEntrancesAtGasGiants, |
boolean | generateFringeJumpPoint, | ||
boolean | generatePlanetConditions | ||
) |
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.
StarAge com.fs.starfarer.api.campaign.StarSystemAPI.getAge | ( | ) |
List< JumpPointAPI > com.fs.starfarer.api.campaign.StarSystemAPI.getAutogeneratedJumpPointsInHyper | ( | ) |
List< NascentGravityWellAPI > com.fs.starfarer.api.campaign.StarSystemAPI.getAutogeneratedNascentWellsInHyper | ( | ) |
String com.fs.starfarer.api.campaign.StarSystemAPI.getBaseName | ( | ) |
Star name without "Star System" appended to it.
SectorEntityToken com.fs.starfarer.api.campaign.StarSystemAPI.getCenter | ( | ) |
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.
Implements com.fs.starfarer.api.campaign.LocationAPI.
float com.fs.starfarer.api.campaign.StarSystemAPI.getDaysSinceLastPlayerVisit | ( | ) |
Implements com.fs.starfarer.api.campaign.LocationAPI.
Boolean com.fs.starfarer.api.campaign.StarSystemAPI.getDoNotShowIntelFromThisLocationOnMap | ( | ) |
SectorEntityToken com.fs.starfarer.api.campaign.StarSystemAPI.getHyperspaceAnchor | ( | ) |
A location token corresponding to the center of the system in hyperspace.
long com.fs.starfarer.api.campaign.StarSystemAPI.getLastPlayerVisitTimestamp | ( | ) |
Implements com.fs.starfarer.api.campaign.LocationAPI.
Color com.fs.starfarer.api.campaign.StarSystemAPI.getLightColor | ( | ) |
Vector2f com.fs.starfarer.api.campaign.StarSystemAPI.getLocation | ( | ) |
Implements com.fs.starfarer.api.campaign.LocationAPI.
Float com.fs.starfarer.api.campaign.StarSystemAPI.getMapGridHeightOverride | ( | ) |
Float com.fs.starfarer.api.campaign.StarSystemAPI.getMapGridWidthOverride | ( | ) |
float com.fs.starfarer.api.campaign.StarSystemAPI.getMaxRadiusInHyperspace | ( | ) |
Only considers jump points into the system generated by autogenerateHyperspaceJumpPoints.
String com.fs.starfarer.api.campaign.StarSystemAPI.getOptionalUniqueId | ( | ) |
If non-null, will be used by the SectorAPI.getStarSystem(String) method.
optionalUniqueId |
PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.getSecondary | ( | ) |
PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.getStar | ( | ) |
PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.getTertiary | ( | ) |
StarSystemType com.fs.starfarer.api.campaign.StarSystemAPI.getType | ( | ) |
boolean com.fs.starfarer.api.campaign.StarSystemAPI.hasBlackHole | ( | ) |
boolean com.fs.starfarer.api.campaign.StarSystemAPI.hasPulsar | ( | ) |
Boolean com.fs.starfarer.api.campaign.StarSystemAPI.hasSystemwideNebula | ( | ) |
SectorEntityToken com.fs.starfarer.api.campaign.StarSystemAPI.initNonStarCenter | ( | ) |
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.
PlanetAPI com.fs.starfarer.api.campaign.StarSystemAPI.initStar | ( | String | id, |
String | type, | ||
float | radius, | ||
float | coronaSize | ||
) |
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.
id | unique id for this star |
type | |
color | |
radius |
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().
id | unique id for this star |
type | |
color | |
radius | |
hyperspaceLocationX | |
hyperspaceLocationY |
boolean com.fs.starfarer.api.campaign.StarSystemAPI.isEnteredByPlayer | ( | ) |
boolean com.fs.starfarer.api.campaign.StarSystemAPI.isInConstellation | ( | ) |
Returns false if the constellation is null or contains only one star system.
Implements com.fs.starfarer.api.campaign.LocationAPI.
boolean com.fs.starfarer.api.campaign.StarSystemAPI.isProcgen | ( | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setAge | ( | StarAge | age | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setBaseName | ( | String | baseName | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setCenter | ( | SectorEntityToken | center | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setConstellation | ( | Constellation | constellation | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setDoNotShowIntelFromThisLocationOnMap | ( | Boolean | doNotShowIntelFromThisLocationOnMap | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setEnteredByPlayer | ( | boolean | enteredByPlayer | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setHasSystemwideNebula | ( | Boolean | hasSystemwideNebula | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setHyperspaceAnchor | ( | SectorEntityToken | hyperspaceAnchor | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setLightColor | ( | Color | lightColor | ) |
Only applicable if this location has a light source (i.e. a star).
lightColor |
void com.fs.starfarer.api.campaign.StarSystemAPI.setMapGridHeightOverride | ( | Float | mapGridHeightOverride | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setMapGridWidthOverride | ( | Float | mapGridWidthOverride | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setMaxRadiusInHyperspace | ( | float | maxRadiusInHyperspace | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setOptionalUniqueId | ( | String | optionalUniqueId | ) |
If non-null, will be used by the SectorAPI.getStarSystem(String) method.
optionalUniqueId |
void com.fs.starfarer.api.campaign.StarSystemAPI.setProcgen | ( | boolean | isProcgen | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setSecondary | ( | PlanetAPI | secondary | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setStar | ( | PlanetAPI | star | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setTertiary | ( | PlanetAPI | tertiary | ) |
void com.fs.starfarer.api.campaign.StarSystemAPI.setType | ( | StarSystemType | type | ) |