Class FractureJumpAbility
java.lang.Object
com.fs.starfarer.api.impl.campaign.abilities.BaseAbilityPlugin
com.fs.starfarer.api.impl.campaign.abilities.BaseDurationAbility
com.fs.starfarer.api.impl.campaign.abilities.FractureJumpAbility
- All Implemented Interfaces:
AbilityPlugin
,EveryFrameScript
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic float
static float
static float
protected EveryFrameScript
protected Boolean
protected NascentGravityWellAPI
Fields inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseDurationAbility
activeDaysLeft, cooldownLeft, fadingOut, level, LOOP_FADE_TIME_DAYS, loopFadeLeft, turnedOn
Fields inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseAbilityPlugin
disableFrames, entity, id, PLAY_UI_SOUNDS_IN_WORLD_SOURCES, spec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
applyEffect
(float amount, float level) Will be called once when level is 0 and consistently when level >0.protected boolean
protected boolean
protected void
protected float
protected float
void
createTooltip
(TooltipMakerAPI tooltip, boolean expanded) Will be called every frame the tooltip is shown, so the tooltip can be dynamic.void
Toggleable or interruptable abilities should implement this method so that other abilities may turn them off or interrupt them if needed.protected void
void
fleetLeftBattle
(BattleAPI battle, boolean engagedInHostilities) void
fleetOpenedMarket
(MarketAPI market) Only called for the player fleet.protected String
float
0 at start of cooldown, 1 at end.protected float
getCRCostMult
(CampaignFleetAPI fleet) getNearestWell
(float maxDist) protected List<FleetMemberAPI>
boolean
boolean
boolean
boolean
isUsable()
Whether the ability can be activated / the UI button corresponding to it is enabled.protected boolean
boolean
Methods inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseDurationAbility
activate, addIncompatibleToTooltip, advance, cleanup, getActivationDays, getActiveDaysLeft, getCooldownDays, getCooldownLeft, getDeactivationDays, getDurationDays, getLevel, getLoopSoundUIPitch, getLoopSoundUIVolume, getLoopSoundWorldPitch, getLoopSoundWorldVolume, getProgressFraction, getTotalDurationDays, hasCustomButtonPressSounds, isActive, isFadingOut, isInProgress, pressButton, runWhilePaused, setActiveDaysLeft, setCooldownLeft, showActiveIndicator, showProgressIndicator
Methods inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseAbilityPlugin
addIncompatibleToTooltip, disableIncompatible, fleetJoinedBattle, forceDisable, getActiveColor, getActiveLayers, getDeactivationText, getEntity, getFleet, getId, getInterruptedList, getLoopSoundUI, getLoopSoundWorld, getModId, getOffSoundUI, getOffSoundWorld, getOnSoundUI, getOnSoundWorld, getProgressColor, getSpec, getSpriteName, getTooltipWidth, init, interruptIncompatible, isActiveOrInProgress, isCompatible, isDone, isTooltipExpandable, readResolve, render
-
Field Details
-
CR_COST_MULT
public static float CR_COST_MULT -
FUEL_USE_MULT
public static float FUEL_USE_MULT -
NASCENT_JUMP_DIST
public static float NASCENT_JUMP_DIST -
primed
-
well
-
ping
-
-
Constructor Details
-
FractureJumpAbility
public FractureJumpAbility()
-
-
Method Details
-
canUseToJumpToHyper
protected boolean canUseToJumpToHyper() -
canUseToJumpToSystem
protected boolean canUseToJumpToSystem() -
activateImpl
protected void activateImpl()- Specified by:
activateImpl
in classBaseDurationAbility
-
deactivate
public void deactivate()Description copied from interface:AbilityPlugin
Toggleable or interruptable abilities should implement this method so that other abilities may turn them off or interrupt them if needed. Expected behavior: if (isActiveOrInProgress()) {} - Specified by:
deactivate
in interfaceAbilityPlugin
- Overrides:
deactivate
in classBaseDurationAbility
-
applyEffect
protected void applyEffect(float amount, float level) Description copied from class:BaseDurationAbility
Will be called once when level is 0 and consistently when level >0.- Specified by:
applyEffect
in classBaseDurationAbility
-
getActivationText
- Overrides:
getActivationText
in classBaseAbilityPlugin
-
deactivateImpl
protected void deactivateImpl()- Specified by:
deactivateImpl
in classBaseDurationAbility
-
cleanupImpl
protected void cleanupImpl()- Specified by:
cleanupImpl
in classBaseDurationAbility
-
isUsable
public boolean isUsable()Description copied from interface:AbilityPlugin
Whether the ability can be activated / the UI button corresponding to it is enabled.- Specified by:
isUsable
in interfaceAbilityPlugin
- Overrides:
isUsable
in classBaseDurationAbility
- Returns:
-
getNearestWell
-
createTooltip
Description copied from interface:AbilityPlugin
Will be called every frame the tooltip is shown, so the tooltip can be dynamic.- Specified by:
createTooltip
in interfaceAbilityPlugin
- Overrides:
createTooltip
in classBaseAbilityPlugin
-
hasTooltip
public boolean hasTooltip()- Specified by:
hasTooltip
in interfaceAbilityPlugin
- Overrides:
hasTooltip
in classBaseAbilityPlugin
-
fleetLeftBattle
- Specified by:
fleetLeftBattle
in interfaceAbilityPlugin
- Overrides:
fleetLeftBattle
in classBaseAbilityPlugin
-
fleetOpenedMarket
Description copied from interface:AbilityPlugin
Only called for the player fleet.- Specified by:
fleetOpenedMarket
in interfaceAbilityPlugin
- Overrides:
fleetOpenedMarket
in classBaseAbilityPlugin
-
getNonReadyShips
-
computeFuelCost
protected float computeFuelCost() -
getCRCostMult
-
computeSupplyCost
protected float computeSupplyCost() -
showAlarm
protected boolean showAlarm() -
getCooldownFraction
public float getCooldownFraction()Description copied from interface:AbilityPlugin
0 at start of cooldown, 1 at end.- Specified by:
getCooldownFraction
in interfaceAbilityPlugin
- Overrides:
getCooldownFraction
in classBaseDurationAbility
- Returns:
-
showCooldownIndicator
public boolean showCooldownIndicator()- Specified by:
showCooldownIndicator
in interfaceAbilityPlugin
- Overrides:
showCooldownIndicator
in classBaseAbilityPlugin
-
isOnCooldown
public boolean isOnCooldown()- Specified by:
isOnCooldown
in interfaceAbilityPlugin
- Overrides:
isOnCooldown
in classBaseAbilityPlugin
-
getCooldownColor
- Specified by:
getCooldownColor
in interfaceAbilityPlugin
- Overrides:
getCooldownColor
in classBaseAbilityPlugin
-
isCooldownRenderingAdditive
public boolean isCooldownRenderingAdditive()- Specified by:
isCooldownRenderingAdditive
in interfaceAbilityPlugin
- Overrides:
isCooldownRenderingAdditive
in classBaseAbilityPlugin
-