Class ReversePolarityToggle
java.lang.Object
com.fs.starfarer.api.impl.campaign.abilities.BaseAbilityPlugin
com.fs.starfarer.api.impl.campaign.abilities.BaseToggleAbility
com.fs.starfarer.api.impl.campaign.abilities.ToggleAbilityWithCost
com.fs.starfarer.api.impl.campaign.abilities.ReversePolarityToggle
- All Implemented Interfaces:
AbilityPlugin
,EveryFrameScript
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic float
static float
static float
static String
static Color
static String
static String
static float
Fields inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseToggleAbility
cooldownLeft, isActivateCooldown, level, 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 TypeMethodDescriptionvoid
addOtherNotUsableReason
(TooltipMakerAPI tooltip, boolean expanded) protected void
applyFleetVisual
(float amount, float level) protected void
applyStatsEffect
(float amount, float level) boolean
canRecoverCRWhileActive
(boolean forTooltip) void
createTooltip
(TooltipMakerAPI tooltip, boolean expanded) Will be called every frame the tooltip is shown, so the tooltip can be dynamic.protected String
float
getCRCostMult
(boolean forTooltip) float
getFuelCostMult
(boolean forTooltip) boolean
boolean
isUsable()
Whether the ability can be activated / the UI button corresponding to it is enabled.protected boolean
Methods inherited from class com.fs.starfarer.api.impl.campaign.abilities.ToggleAbilityWithCost
activateImpl, addCostTooltipSection, applyEffect, cleanupImpl, computeFuelCost, computeSupplyCost, deactivateImpl, deductCost, getActivationAtLowCRShipDamageProbability, getActivationDamageLevel, getCooldownFraction, getCRCost, getNonReadyShips, hasTooltip, isCooldownRenderingAdditive, isOnCooldown, shouldApplyCostWhenDeactivating, unapplyStatsEffect
Methods inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseToggleAbility
activate, addIncompatibleToTooltip, advance, cleanup, deactivate, getActivateCooldownDays, getActivationDays, getCooldownLeft, getDeactivateCooldownDays, getDeactivationDays, getLevel, getLoopSoundUIPitch, getLoopSoundUIVolume, getLoopSoundWorldPitch, getLoopSoundWorldVolume, getProgressFraction, hasCustomButtonPressSounds, isActive, pressButton, runWhilePaused, setCooldownLeft, showActiveIndicator, showProgressIndicator
Methods inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseAbilityPlugin
addIncompatibleToTooltip, disableIncompatible, fleetJoinedBattle, fleetLeftBattle, fleetOpenedMarket, forceDisable, getActiveColor, getActiveLayers, getDeactivationText, getEntity, getFleet, getId, getInterruptedList, getLoopSoundUI, getLoopSoundWorld, getModId, getOffSoundUI, getOffSoundWorld, getOnSoundUI, getOnSoundWorld, getProgressColor, getSpec, getSpriteName, getTooltipWidth, init, interruptIncompatible, isActiveOrInProgress, isCompatible, isDone, isInProgress, isTooltipExpandable, readResolve, render, showCooldownIndicator
-
Field Details
-
REVERSED_POLARITY
-
POLARITY_SPEED_MULT
-
POLARITY_WIND_GLOW_COLOR_KEY
-
POLARITY_WIND_GLOW_COLOR
-
SLIPSTREAM_SPEED_MULT
public static float SLIPSTREAM_SPEED_MULT -
CR_COST_MULT
public static float CR_COST_MULT -
FUEL_COST_MULT
public static float FUEL_COST_MULT -
ACTIVATION_DAMAGE_PROB
public static float ACTIVATION_DAMAGE_PROB
-
-
Constructor Details
-
ReversePolarityToggle
public ReversePolarityToggle()
-
-
Method Details
-
getFuelCostMult
public float getFuelCostMult(boolean forTooltip) - Overrides:
getFuelCostMult
in classToggleAbilityWithCost
-
getCRCostMult
public float getCRCostMult(boolean forTooltip) - Overrides:
getCRCostMult
in classToggleAbilityWithCost
-
canRecoverCRWhileActive
public boolean canRecoverCRWhileActive(boolean forTooltip) - Overrides:
canRecoverCRWhileActive
in classToggleAbilityWithCost
-
getActivationText
- Overrides:
getActivationText
in classBaseAbilityPlugin
-
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 classToggleAbilityWithCost
- Returns:
-
applyStatsEffect
protected void applyStatsEffect(float amount, float level) - Overrides:
applyStatsEffect
in classToggleAbilityWithCost
-
applyFleetVisual
protected void applyFleetVisual(float amount, float level) - Overrides:
applyFleetVisual
in classToggleAbilityWithCost
-
isFleetInSlipstream
public boolean isFleetInSlipstream() -
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
-
addOtherNotUsableReason
- Overrides:
addOtherNotUsableReason
in classToggleAbilityWithCost
-
showAlarm
protected boolean showAlarm()- Overrides:
showAlarm
in classToggleAbilityWithCost
-
getCooldownColor
- Specified by:
getCooldownColor
in interfaceAbilityPlugin
- Overrides:
getCooldownColor
in classToggleAbilityWithCost
-