Class StarSystemGenerator
java.lang.Object
com.fs.starfarer.api.impl.campaign.procgen.StarSystemGenerator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static enum
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<SectorEntityToken,
List<SectorEntityToken>> protected String
static Map<String,
WeightedRandomPicker<String>> static final float
static final float
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected float
static final String
static final String
static final String
static final String
static final String
protected StarAge
protected AgeGenDataSpec
static boolean
static final float
protected LocationAPI
static final float
protected Map<SectorEntityToken,
PlanetAPI> static final float
static final float
static final float
static final float
static final float
static final float
static final float
static final String
static final String
static final String
static final String
protected String
static final float
static final float
static Random
protected PlanetAPI
protected SectorAPI
protected PlanetAPI
protected StarAge
protected AgeGenDataSpec
protected StarGenDataSpec
static final float
static final float
static final float
static final float
protected StarSystemAPI
protected SectorEntityToken
protected StarSystemGenerator.StarSystemType
static final String
static final String
static final String
static final String
static final String
static final String
static List<TerrainGenPlugin>
protected PlanetAPI
static final float
static final float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFarStar
(PlanetAPI farStar, float orbitAngle, float baseOrbitRadius, float orbitPeriod) protected void
protected void
addJumpPoints
(StarSystemGenerator.GenResult result, boolean farStarMode) static float
addOrbitingEntities
(StarSystemAPI system, SectorEntityToken parentStar, StarAge age, int min, int max, float startingRadius, int nameOffset, boolean withSpecialNames) static float
addOrbitingEntities
(StarSystemAPI system, SectorEntityToken parentStar, StarAge age, int min, int max, float startingRadius, int nameOffset, boolean withSpecialNames, boolean allowHabitable) protected StarSystemGenerator.GenResult
addOrbitingEntities
(StarSystemGenerator.GenContext context, int numOrbits, boolean addingMoons, boolean addMoons, boolean parentIsMoon, boolean nothingOk) addPlanet
(StarSystemGenerator.GenContext context, PlanetGenDataSpec planetData, boolean isMoon, boolean addMoons) protected StarSystemGenerator.GenResult
addPlanetsAndTerrain
(float maxOrbitRadius) protected PlanetAPI
addRandomStar
(String id, String name) protected void
static void
addStableLocations
(StarSystemAPI system, int num) protected boolean
protected void
addStuffAtLagrangePoints
(StarSystemGenerator.GenContext context, StarSystemGenerator.GeneratedPlanet planet) protected void
static void
addSystemwideNebula
(StarSystemAPI system, StarAge age) protected StarSystemGenerator.GenResult
addTerrain
(StarSystemGenerator.GenContext context, TerrainGenDataSpec terrainData) static void
addTerrainGenPlugin
(TerrainGenPlugin plugin) protected void
cleanup()
generate()
void
generateSystem
(org.lwjgl.util.vector.Vector2f loc) static Color
protected float
static float
getNormalRandom
(float min, float max) static float
getNormalRandom
(Random random, float min, float max) protected WeightedRandomPicker<EntityGenDataSpec>
getPickerForCategory
(CategoryGenDataSpec categoryData, StarSystemGenerator.GenContext context, String extraMult) protected WeightedRandomPicker<EntityGenDataSpec>
getPickerForCategory
(CategoryGenDataSpec categoryData, StarSystemGenerator.GenContext context, String extraMult, boolean nothingOk) static float
getRadius
(float min, float max) static float
getRandom
(float min, float max) void
init
(StarSystemAPI system, StarAge age) protected boolean
initSystem
(String name, org.lwjgl.util.vector.Vector2f loc) boolean
isCategoryEmpty
(CategoryGenDataSpec categoryData, StarSystemGenerator.GenContext context, String extraMult, boolean nothingOk) pickCategory
(StarSystemGenerator.GenContext context, String extraMult, boolean nothingOk) static FullName.Gender
protected Color
void
protected StarSystemGenerator.StarSystemType
pickSystemType
(StarAge constellationAge) static TerrainGenPlugin
pickTerrainGenPlugin
(TerrainGenDataSpec terrainData, StarSystemGenerator.GenContext context) static void
protected void
protected void
protected void
setPulsarIfNeutron
(PlanetAPI star) protected void
switchPrimaryAndSecondaryIfNeeded
(boolean sizeDownSmaller) protected void
switchPrimaryAndTertiaryIfNeeded
(boolean sizeDownSmaller) protected void
static void
-
Field Details
-
MIN_STAR_DIST
public static final float MIN_STAR_DIST- See Also:
-
MAX_STAR_DIST
public static final float MAX_STAR_DIST- See Also:
-
TILT_MIN
public static final float TILT_MIN- See Also:
-
TILT_MAX
public static final float TILT_MAX- See Also:
-
PITCH_MIN
public static final float PITCH_MIN- See Also:
-
PITCH_MAX
public static final float PITCH_MAX- See Also:
-
MAX_ORBIT_RADIUS
public static final float MAX_ORBIT_RADIUS- See Also:
-
FAR_MAX_ORBIT_RADIUS
public static final float FAR_MAX_ORBIT_RADIUS- See Also:
-
LAGRANGE_OFFSET
public static final float LAGRANGE_OFFSET- See Also:
-
BASE_INCR
public static final float BASE_INCR- See Also:
-
BASE_INCR_MOON
public static final float BASE_INCR_MOON- See Also:
-
STARTING_RADIUS_STAR_BASE
public static final float STARTING_RADIUS_STAR_BASE- See Also:
-
STARTING_RADIUS_STAR_RANGE
public static final float STARTING_RADIUS_STAR_RANGE- See Also:
-
STARTING_RADIUS_MOON_BASE
public static final float STARTING_RADIUS_MOON_BASE- See Also:
-
STARTING_RADIUS_MOON_RANGE
public static final float STARTING_RADIUS_MOON_RANGE- See Also:
-
MOON_RADIUS_MAX_FRACTION_OF_PARENT
public static final float MOON_RADIUS_MAX_FRACTION_OF_PARENT- See Also:
-
MOON_RADIUS_MIN_FRACTION_OF_NORMAL
public static final float MOON_RADIUS_MIN_FRACTION_OF_NORMAL- See Also:
-
MOON_RADIUS_MAX_FRACTION_OF_NORMAL
public static final float MOON_RADIUS_MAX_FRACTION_OF_NORMAL- See Also:
-
MIN_MOON_RADIUS
public static final float MIN_MOON_RADIUS- See Also:
-
TAG_FIRST_ORBIT_ONLY
- See Also:
-
TAG_GIANT_MOON
- See Also:
-
TAG_LAGRANGE_ONLY
- See Also:
-
TAG_NOT_IN_NEBULA
- See Also:
-
TAG_REQUIRES_NEBULA
- See Also:
-
TAG_NOT_NEBULA_UNLESS_MOON
- See Also:
-
CAT_HAB5
- See Also:
-
CAT_HAB4
- See Also:
-
CAT_HAB3
- See Also:
-
CAT_HAB2
- See Also:
-
CAT_HAB1
- See Also:
-
CAT_NOTHING
- See Also:
-
CAT_GIANT
- See Also:
-
COL_LAGRANGE
- See Also:
-
COL_IN_ASTEROIDS
- See Also:
-
COL_IS_MOON
- See Also:
-
COL_BINARY
- See Also:
-
COL_TRINARY
- See Also:
-
NEBULA_DEFAULT
- See Also:
-
NEBULA_AMBER
- See Also:
-
NEBULA_BLUE
- See Also:
-
NEBULA_NONE
- See Also:
-
nebulaTypes
-
backgroundsByNebulaType
-
terrainPlugins
-
random
-
DEBUG
public static boolean DEBUG -
constellationAge
-
systemType
-
starAge
-
sector
-
system
-
hyper
-
star
-
secondary
-
tertiary
-
systemCenter
-
centerRadius
protected float centerRadius -
constellationAgeData
-
starAgeData
-
starData
-
nebulaType
-
backgroundName
-
lagrangeParentMap
-
allNameableEntitiesAdded
-
params
-
-
Constructor Details
-
StarSystemGenerator
-
-
Method Details
-
addTerrainGenPlugin
-
removeTerrainGenPlugin
-
updateBackgroundPickers
public static void updateBackgroundPickers() -
pickTerrainGenPlugin
public static TerrainGenPlugin pickTerrainGenPlugin(TerrainGenDataSpec terrainData, StarSystemGenerator.GenContext context) -
pickNebulaAndBackground
public void pickNebulaAndBackground() -
generate
-
generateSystem
public void generateSystem(org.lwjgl.util.vector.Vector2f loc) -
addFarStar
protected void addFarStar(PlanetAPI farStar, float orbitAngle, float baseOrbitRadius, float orbitPeriod) -
pickSystemType
-
addStars
-
setBlackHoleIfBlackHole
-
setPulsarIfNeutron
-
switchPrimaryAndSecondaryIfNeeded
protected void switchPrimaryAndSecondaryIfNeeded(boolean sizeDownSmaller) -
switchPrimaryAndTertiaryIfNeeded
protected void switchPrimaryAndTertiaryIfNeeded(boolean sizeDownSmaller) -
addStableLocations
protected void addStableLocations() -
addStableLocations
-
addJumpPoints
-
addJumpPoint
-
addOrbitingEntities
public static float addOrbitingEntities(StarSystemAPI system, SectorEntityToken parentStar, StarAge age, int min, int max, float startingRadius, int nameOffset, boolean withSpecialNames) -
addOrbitingEntities
public static float addOrbitingEntities(StarSystemAPI system, SectorEntityToken parentStar, StarAge age, int min, int max, float startingRadius, int nameOffset, boolean withSpecialNames, boolean allowHabitable) -
addSystemwideNebula
-
addSystemwideNebula
protected void addSystemwideNebula() -
addPlanetsAndTerrain
-
addOrbitingEntities
protected StarSystemGenerator.GenResult addOrbitingEntities(StarSystemGenerator.GenContext context, int numOrbits, boolean addingMoons, boolean addMoons, boolean parentIsMoon, boolean nothingOk) -
addTerrain
protected StarSystemGenerator.GenResult addTerrain(StarSystemGenerator.GenContext context, TerrainGenDataSpec terrainData) -
addPlanet
public StarSystemGenerator.GenResult addPlanet(StarSystemGenerator.GenContext context, PlanetGenDataSpec planetData, boolean isMoon, boolean addMoons) -
addStuffAtLagrangePoints
protected void addStuffAtLagrangePoints(StarSystemGenerator.GenContext context, StarSystemGenerator.GeneratedPlanet planet) -
pickCategory
public CategoryGenDataSpec pickCategory(StarSystemGenerator.GenContext context, String extraMult, boolean nothingOk) -
isCategoryEmpty
public boolean isCategoryEmpty(CategoryGenDataSpec categoryData, StarSystemGenerator.GenContext context, String extraMult, boolean nothingOk) -
getHabOffset
-
getPickerForCategory
protected WeightedRandomPicker<EntityGenDataSpec> getPickerForCategory(CategoryGenDataSpec categoryData, StarSystemGenerator.GenContext context, String extraMult) -
getPickerForCategory
protected WeightedRandomPicker<EntityGenDataSpec> getPickerForCategory(CategoryGenDataSpec categoryData, StarSystemGenerator.GenContext context, String extraMult, boolean nothingOk) -
setDefaultLightColorBasedOnStars
protected void setDefaultLightColorBasedOnStars() -
pickLightColorForStar
-
addRandomStar
-
init
-
initSystem
-
updateAgeAfterPickingStar
protected void updateAgeAfterPickingStar() -
cleanup
protected void cleanup() -
getNebulaType
-
getConstellationAge
-
getStarAge
-
pickStar
-
getColor
-
getNormalRandom
public static float getNormalRandom(float min, float max) -
getNormalRandom
-
getRadius
public static float getRadius(float min, float max) -
getRandom
public static float getRandom(float min, float max) -
getLagrangeParentMap
-
getAllEntitiesAdded
-
pickGender
-