Class DerelictThemeGenerator
java.lang.Object
com.fs.starfarer.api.impl.campaign.procgen.themes.BaseThemeGenerator
com.fs.starfarer.api.impl.campaign.procgen.themes.DerelictThemeGenerator
- All Implemented Interfaces:
ThemeGenerator
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.fs.starfarer.api.impl.campaign.procgen.themes.BaseThemeGenerator
BaseThemeGenerator.AddedEntity, BaseThemeGenerator.EntityLocation, BaseThemeGenerator.HabitationLevel, BaseThemeGenerator.LocationType, BaseThemeGenerator.OrbitGap, BaseThemeGenerator.OrbitItem, BaseThemeGenerator.StarSystemData
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
static final int
static final int
static final int
static final int
static final float
static final float
Fields inherited from class com.fs.starfarer.api.impl.campaign.procgen.themes.BaseThemeGenerator
DEBUG, NOT_HABITABLE_PLANET_PROB, ORBITAL_HABITAT_PROB, random
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BaseThemeGenerator.AddedEntity
addCryosleeper
(StarSystemAPI system, String name) protected BaseThemeGenerator.AddedEntity
addMothership
(StarSystemAPI system) protected void
addMothershipChain
(ThemeGenContext context, List<BaseThemeGenerator.AddedEntity> mothershipsSoFar) protected List<BaseThemeGenerator.AddedEntity>
addProbes
(StarSystemAPI system, int num) protected BaseThemeGenerator.AddedEntity
addSurveyShip
(StarSystemAPI system) protected List<BaseThemeGenerator.AddedEntity>
addToConstellation
(Constellation c, String type, int num, boolean biggestFirst) protected List<BaseThemeGenerator.AddedEntity>
addToSystem
(StarSystemAPI system, String type, int num) protected void
static boolean
static PlanetAPI
findInterestingPlanet
(List<StarSystemAPI> systems, Set<PlanetAPI> exclude) static PlanetAPI
findInterestingPlanet
(List<StarSystemAPI> systems, Set<PlanetAPI> exclude, boolean includeKnown, boolean includeRuins, Random random) static StarSystemAPI
findNearbySystem
(SectorEntityToken from, Set<StarSystemAPI> exclude) static StarSystemAPI
findNearbySystem
(SectorEntityToken from, Set<StarSystemAPI> exclude, Random random, float maxRange) void
generateForSector
(ThemeGenContext context, float allowedUnusedFraction) static String
getInterestingCondition
(PlanetAPI planet, boolean includeRuins) protected int
getNumProbesForSystem
(LocationAPI system) int
getOrder()
Themes with lower "order" values get their shot at generating content first.protected List<Constellation>
getSortedAvailableConstellations
(ThemeGenContext context, boolean emptyOk, org.lwjgl.util.vector.Vector2f sortFrom, List<Constellation> exclude) Sorted by *descending* distance from sortFrom.static boolean
hasSpecial
(SectorEntityToken entity) protected void
linkFractionToParent
(BaseThemeGenerator.AddedEntity parent, List<BaseThemeGenerator.AddedEntity> children, float p, DomainSurveyDerelictSpecial.SpecialType type) protected void
linkToMothership
(SectorEntityToken from, SectorEntityToken mothership) protected void
linkToParent
(SectorEntityToken from, SectorEntityToken parent, DomainSurveyDerelictSpecial.SpecialType type) static boolean
systemIsEmpty
(StarSystemAPI system) Methods inherited from class com.fs.starfarer.api.impl.campaign.procgen.themes.BaseThemeGenerator
addCaches, addCommRelay, addDebrisField, addDebrisFields, addDebrisFields, addDerelictShip, addDerelictShip, addDerelictShips, addEntity, addEntity, addEntityAutoDetermineType, addHabCenters, addInactiveGate, addMiningStations, addNonSalvageEntity, addObjectives, addResearchStations, addRuins, addSalvageEntity, addSalvageEntity, addSalvageEntity, addSalvageEntity, addShipGraveyard, addShipGraveyard, addShipGraveyard, addStation, clearRuins, computeSystemData, convertOrbitNoSpin, convertOrbitNoSpin, convertOrbitPointingDown, convertOrbitWithSpin, createLocationAtRandomGap, createStringPicker, createStringPicker, findGaps, genCargoFromDrop, getInnerRadius, getLocations, getLocations, getObjectiveSpec, getOrbitalRadius, getOuterRadius, getRandom, getWeight, isAreaEmpty, pickAnyLocation, pickCommonLocation, pickHiddenLocation, pickHiddenLocationNotNearStar, pickOuterEntityToSpawnNear, pickRuinsType, pickUncommonLocation, setEntityLocation, setRandom, shouldHaveDecivilized
-
Field Details
-
BASE_LINK_FRACTION
public static final float BASE_LINK_FRACTION- See Also:
-
SALVAGE_SPECIAL_FRACTION
public static final float SALVAGE_SPECIAL_FRACTION- See Also:
-
TOPOGRAPHIC_DATA_FRACTION
public static final float TOPOGRAPHIC_DATA_FRACTION- See Also:
-
BRANCHES_PER_MOTHERSHIP_MIN
public static final int BRANCHES_PER_MOTHERSHIP_MIN- See Also:
-
BRANCHES_PER_MOTHERSHIP_MAX
public static final int BRANCHES_PER_MOTHERSHIP_MAX- See Also:
-
BRANCHES_PER_SHIP_MIN
public static final int BRANCHES_PER_SHIP_MIN- See Also:
-
BRANCHES_PER_SHIP_MAX
public static final int BRANCHES_PER_SHIP_MAX- See Also:
-
interestingConditions
-
interestingConditionsWithoutHabitable
-
interestingConditionsWithRuins
-
-
Constructor Details
-
DerelictThemeGenerator
public DerelictThemeGenerator()
-
-
Method Details
-
getThemeId
- Specified by:
getThemeId
in interfaceThemeGenerator
- Specified by:
getThemeId
in classBaseThemeGenerator
-
generateForSector
- Specified by:
generateForSector
in interfaceThemeGenerator
- Specified by:
generateForSector
in classBaseThemeGenerator
-
addMothershipChain
protected void addMothershipChain(ThemeGenContext context, List<BaseThemeGenerator.AddedEntity> mothershipsSoFar) -
assignRandomSpecials
-
findNearbySystem
-
findNearbySystem
public static StarSystemAPI findNearbySystem(SectorEntityToken from, Set<StarSystemAPI> exclude, Random random, float maxRange) -
getInterestingCondition
-
findInterestingPlanet
-
findInterestingPlanet
-
getNumProbesForSystem
-
linkFractionToParent
protected void linkFractionToParent(BaseThemeGenerator.AddedEntity parent, List<BaseThemeGenerator.AddedEntity> children, float p, DomainSurveyDerelictSpecial.SpecialType type) -
linkToParent
protected void linkToParent(SectorEntityToken from, SectorEntityToken parent, DomainSurveyDerelictSpecial.SpecialType type) -
linkToMothership
-
hasSpecial
-
addToConstellation
protected List<BaseThemeGenerator.AddedEntity> addToConstellation(Constellation c, String type, int num, boolean biggestFirst) -
addToSystem
protected List<BaseThemeGenerator.AddedEntity> addToSystem(StarSystemAPI system, String type, int num) -
addMothership
-
addCryosleeper
-
addSurveyShip
-
addProbes
-
getSortedAvailableConstellations
protected List<Constellation> getSortedAvailableConstellations(ThemeGenContext context, boolean emptyOk, org.lwjgl.util.vector.Vector2f sortFrom, List<Constellation> exclude) Sorted by *descending* distance from sortFrom.- Overrides:
getSortedAvailableConstellations
in classBaseThemeGenerator
- Parameters:
context
-sortFrom
-- Returns:
-
constellationIsEmpty
-
systemIsEmpty
-
getOrder
public int getOrder()Description copied from interface:ThemeGenerator
Themes with lower "order" values get their shot at generating content first.- Specified by:
getOrder
in interfaceThemeGenerator
- Specified by:
getOrder
in classBaseThemeGenerator
- Returns:
-