Class ShroudedVortexAI
java.lang.Object
com.fs.starfarer.api.impl.combat.dweller.ShroudedVortexAI
- All Implemented Interfaces:
ShipAIPlugin
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic float
static float
static float
protected float
protected boolean
protected ShipwideAIFlags
protected List<ShroudedVortexAI.FlockingData>
protected IntervalUtil
static float
Loses hitpoints over time, when near zero, blows up.protected float
protected org.lwjgl.util.vector.Vector2f
static float
static float
protected ShipAPI
protected ShipAPI
protected float
protected IntervalUtil
static String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) The AI should do its main work here.void
protected void
protected void
void
When this is called, the AI should immediately evaluate nearby threats and such, if it only does it periodically otherwise.protected void
boolean
Only called for fighters, not regular ships or drones.void
setDoNotFireDelay
(float amount) Advise the AI not to fire for amount seconds.protected void
toggleOff
(int groupNum) protected void
toggleOn
(int groupNum) protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fs.starfarer.api.combat.ShipAIPlugin
setTargetOverride
-
Field Details
-
HULL_FRACTION_LOST_PER_SECOND
public static float HULL_FRACTION_LOST_PER_SECONDLoses hitpoints over time, when near zero, blows up. -
VORTEX_FLOCKING
-
ATTRACTOR_RANGE_MAX
public static float ATTRACTOR_RANGE_MAX -
COHESION_RANGE_MIN
public static float COHESION_RANGE_MIN -
COHESION_RANGE_MAX
public static float COHESION_RANGE_MAX -
REPEL_RANGE_MIN
public static float REPEL_RANGE_MIN -
REPEL_RANGE_MAX
public static float REPEL_RANGE_MAX -
flags
-
ship
-
exploded
protected boolean exploded -
prevVel
protected org.lwjgl.util.vector.Vector2f prevVel -
updateInterval
-
headingInterval
-
target
-
timeOnTarget
protected float timeOnTarget -
numCollisions
protected float numCollisions -
flockingData
-
desiredHeading
protected float desiredHeading
-
-
Constructor Details
-
ShroudedVortexAI
-
-
Method Details
-
doInitialSetup
protected void doInitialSetup() -
toggleOn
protected void toggleOn(int groupNum) -
toggleOff
protected void toggleOff(int groupNum) -
advance
public void advance(float amount) Description copied from interface:ShipAIPlugin
The AI should do its main work here.- Specified by:
advance
in interfaceShipAIPlugin
-
giveMovementCommands
protected void giveMovementCommands() -
getAIFlags
- Specified by:
getAIFlags
in interfaceShipAIPlugin
-
findTarget
-
updateFlockingData
protected void updateFlockingData() -
computeDesiredHeading
protected void computeDesiredHeading() -
setDoNotFireDelay
public void setDoNotFireDelay(float amount) Description copied from interface:ShipAIPlugin
Advise the AI not to fire for amount seconds. Used when fighters are taking off from a carrier to prevent bomb/torpedo friendly fire.- Specified by:
setDoNotFireDelay
in interfaceShipAIPlugin
-
forceCircumstanceEvaluation
public void forceCircumstanceEvaluation()Description copied from interface:ShipAIPlugin
When this is called, the AI should immediately evaluate nearby threats and such, if it only does it periodically otherwise. Called when the autopilot is toggled on.- Specified by:
forceCircumstanceEvaluation
in interfaceShipAIPlugin
-
needsRefit
public boolean needsRefit()Description copied from interface:ShipAIPlugin
Only called for fighters, not regular ships or drones.- Specified by:
needsRefit
in interfaceShipAIPlugin
- Returns:
- whether the fighter needs refit
-
cancelCurrentManeuver
public void cancelCurrentManeuver()- Specified by:
cancelCurrentManeuver
in interfaceShipAIPlugin
-
getConfig
- Specified by:
getConfig
in interfaceShipAIPlugin
-