Class SlipstreamManager
java.lang.Object
com.fs.starfarer.api.impl.campaign.velfield.SlipstreamManager
- All Implemented Interfaces:
EveryFrameScript
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<SlipstreamManager.AddedStream>
protected SlipstreamManager.StreamConfig
protected int
protected CollisionGridUtil
static int
protected IntervalUtil
static float
static float
protected String
protected int
protected Random
21x11 characters Capital letter: endpoints Lowercase letter, optional: control point for 3-point stream (if 2: cubic bezier curve instead of quadratic) Direction of flow is determined by time of cycle and relative location of endpoints X is ignored; just marks the center to make it easier to edit After a capital letter: < makes the stream go in the opposite-to-standard direction +-adjusts the stream's burn level; 0 means +10 ~ makes the stream narrower, on average = makes it wider | makes it much straighter than usual ! priority, spawned before other streams (and thus other streams will fade when intersecting it, not this one) ^ only keep longest segment - but, from intersections with streams ONLY, not with stars/other blockers * randomize: up to +10 burn, reverse, straightness, wide/narrow ? randomize: same as above, but no reverse and only up to +5 burn static int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStream
(int month) void
advance
(float amount) Use SectorAPI.getClock() to convert to campaign days.void
checkIntersectionsAndFadeSections
(SlipstreamTerrainPlugin2 plugin, boolean onlyKeepLongestBetweenStreams) static void
fadeOutSectionsShorterThan
(List<SlipstreamTerrainPlugin2.SlipstreamSegment> segments, float minLength) getGrid()
boolean
isDone()
static void
static String
mirrorHorz
(String in) static void
mirrorPrevHorz
(float weight) static void
mirrorPrevVert
(float weight) static String
mirrorVert
(String in) protected Object
static void
boolean
void
static void
-
Field Details
-
WIDTH
public static int WIDTH -
HEIGHT
public static int HEIGHT -
MAP_WIDTH_PADDING
public static float MAP_WIDTH_PADDING -
MAP_HEIGHT_PADDING
public static float MAP_HEIGHT_PADDING -
STREAM_CONFIGS
21x11 characters Capital letter: endpoints Lowercase letter, optional: control point for 3-point stream (if 2: cubic bezier curve instead of quadratic) Direction of flow is determined by time of cycle and relative location of endpoints X is ignored; just marks the center to make it easier to edit After a capital letter: < makes the stream go in the opposite-to-standard direction +-adjusts the stream's burn level; 0 means +10 ~ makes the stream narrower, on average = makes it wider | makes it much straighter than usual ! priority, spawned before other streams (and thus other streams will fade when intersecting it, not this one) ^ only keep longest segment - but, from intersections with streams ONLY, not with stars/other blockers * randomize: up to +10 burn, reverse, straightness, wide/narrow ? randomize: same as above, but no reverse and only up to +5 burn -
grid
-
interval
-
random
-
prevMonth
protected int prevMonth -
desiredNumStreams
protected int desiredNumStreams -
active
-
config
-
prevConfig
-
-
Constructor Details
-
SlipstreamManager
public SlipstreamManager()
-
-
Method Details
-
loadConfigs
public static void loadConfigs() -
mirrorPrevVert
public static void mirrorPrevVert(float weight) -
mirrorVert
-
mirrorPrevHorz
public static void mirrorPrevHorz(float weight) -
mirrorHorz
-
validateConfigs
public static void validateConfigs() -
readResolve
-
advance
public void advance(float amount) Description copied from interface:EveryFrameScript
Use SectorAPI.getClock() to convert to campaign days.- Specified by:
advance
in interfaceEveryFrameScript
- Parameters:
amount
- seconds elapsed during the last frame.
-
addStream
public void addStream(int month) -
checkIntersectionsAndFadeSections
public void checkIntersectionsAndFadeSections(SlipstreamTerrainPlugin2 plugin, boolean onlyKeepLongestBetweenStreams) -
fadeOutSectionsShorterThan
public static void fadeOutSectionsShorterThan(List<SlipstreamTerrainPlugin2.SlipstreamSegment> segments, float minLength) -
removedFadesThatDoNotReachZero
public static void removedFadesThatDoNotReachZero(List<SlipstreamTerrainPlugin2.SlipstreamSegment> segments) -
getGrid
-
updateGrid
public void updateGrid() -
isDone
public boolean isDone()- Specified by:
isDone
in interfaceEveryFrameScript
- Returns:
- true when the script is finished and can be cleaned up by the engine.
-
runWhilePaused
public boolean runWhilePaused()- Specified by:
runWhilePaused
in interfaceEveryFrameScript
- Returns:
- whether advance() should be called while the campaign engine is paused.
-