Class RouteLocationCalculator
java.lang.Object
com.fs.starfarer.api.impl.campaign.fleets.RouteLocationCalculator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
computeIntervalsAndSetLocation
(CampaignFleetAPI fleet, float daysElapsed, float maxDays, boolean onlyComputeIntervals, RouteLocationCalculator.TaskInterval[] intervals, SectorEntityToken... sequence) static JumpPointAPI
findJumpPointToUse
(CampaignFleetAPI fleet, SectorEntityToken from) static JumpPointAPI
findJumpPointToUse
(FactionAPI faction, SectorEntityToken from) static float
getTravelDays
(SectorEntityToken from, SectorEntityToken to) static float
getVarianceMult
(float p) static boolean
isInControlOfSystemOrEven
(FactionAPI faction, StarSystemAPI system) static int
setLocation
(CampaignFleetAPI fleet, float daysElapsed, float maxDays, int overflowIndex, boolean onlyAdjustIntervals, float[] intervals, SectorEntityToken... sequence) Used to assign a reasonable location to a fleet that was just spawned by RouteManager.static void
setLocation
(CampaignFleetAPI fleet, float progress, SectorEntityToken from, SectorEntityToken to)
-
Constructor Details
-
RouteLocationCalculator
public RouteLocationCalculator()
-
-
Method Details
-
getTravelDays
-
computeIntervalsAndSetLocation
public static void computeIntervalsAndSetLocation(CampaignFleetAPI fleet, float daysElapsed, float maxDays, boolean onlyComputeIntervals, RouteLocationCalculator.TaskInterval[] intervals, SectorEntityToken... sequence) -
setLocation
public static int setLocation(CampaignFleetAPI fleet, float daysElapsed, float maxDays, int overflowIndex, boolean onlyAdjustIntervals, float[] intervals, SectorEntityToken... sequence) Used to assign a reasonable location to a fleet that was just spawned by RouteManager. Will normalize the intervals array to not exceed maxDays total, and will then set its values to the days remaining for each section.- Parameters:
fleet
-daysElapsed
-intervals
-sequence
- Must have length = intervals.length + 1.
-
setLocation
public static void setLocation(CampaignFleetAPI fleet, float progress, SectorEntityToken from, SectorEntityToken to) -
getVarianceMult
public static float getVarianceMult(float p) -
findJumpPointToUse
-
findJumpPointToUse
-
isInControlOfSystemOrEven
-