Class GraviticScanAbility
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.GraviticScanAbility
- All Implemented Interfaces:
AbilityPlugin
,EveryFrameScript
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
static float
protected GraviticScanData
static float
protected float
static float
protected SpriteAPI
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 TypeMethodDescriptionprotected void
void
advance
(float amount) Use SectorAPI.getClock() to convert to campaign days.protected void
applyEffect
(float amount, float level) Will be called once when level is 0 and consistently when level >0.protected void
void
createTooltip
(TooltipMakerAPI tooltip, boolean expanded) Will be called every frame the tooltip is shown, so the tooltip can be dynamic.protected void
protected String
protected String
float
boolean
boolean
isUsable()
Whether the ability can be activated / the UI button corresponding to it is enabled.void
render
(CampaignEngineLayers layer, ViewportAPI viewport) boolean
boolean
Methods inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseToggleAbility
activate, addIncompatibleToTooltip, cleanup, deactivate, getActivateCooldownDays, getActivationDays, getCooldownFraction, getCooldownLeft, getDeactivateCooldownDays, getDeactivationDays, getLevel, getLoopSoundUIPitch, getLoopSoundUIVolume, getLoopSoundWorldPitch, getLoopSoundWorldVolume, getProgressFraction, hasCustomButtonPressSounds, isActive, pressButton, runWhilePaused, setCooldownLeft
Methods inherited from class com.fs.starfarer.api.impl.campaign.abilities.BaseAbilityPlugin
addIncompatibleToTooltip, disableIncompatible, fleetJoinedBattle, fleetLeftBattle, fleetOpenedMarket, forceDisable, getActiveColor, getCooldownColor, getEntity, getFleet, getId, getInterruptedList, getLoopSoundUI, getLoopSoundWorld, getModId, getOffSoundUI, getOffSoundWorld, getOnSoundUI, getOnSoundWorld, getProgressColor, getSpec, getSpriteName, getTooltipWidth, init, interruptIncompatible, isActiveOrInProgress, isCompatible, isCooldownRenderingAdditive, isDone, isInProgress, isOnCooldown, isTooltipExpandable, readResolve, showCooldownIndicator
-
Field Details
-
SLIPSTREAM_DETECTION_RANGE
public static float SLIPSTREAM_DETECTION_RANGE -
COMMODITY_ID
-
COMMODITY_PER_DAY
public static float COMMODITY_PER_DAY -
DETECTABILITY_PERCENT
public static float DETECTABILITY_PERCENT -
phaseAngle
protected float phaseAngle -
data
-
texture
-
-
Constructor Details
-
GraviticScanAbility
public GraviticScanAbility()
-
-
Method Details
-
getActivationText
- Overrides:
getActivationText
in classBaseAbilityPlugin
-
getDeactivationText
- Overrides:
getDeactivationText
in classBaseAbilityPlugin
-
activateImpl
protected void activateImpl()- Specified by:
activateImpl
in classBaseToggleAbility
-
showProgressIndicator
public boolean showProgressIndicator()- Specified by:
showProgressIndicator
in interfaceAbilityPlugin
- Overrides:
showProgressIndicator
in classBaseToggleAbility
-
showActiveIndicator
public boolean showActiveIndicator()- Specified by:
showActiveIndicator
in interfaceAbilityPlugin
- Overrides:
showActiveIndicator
in classBaseToggleAbility
-
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
-
getActiveLayers
- Specified by:
getActiveLayers
in interfaceAbilityPlugin
- Overrides:
getActiveLayers
in classBaseAbilityPlugin
-
advance
public void advance(float amount) Description copied from interface:EveryFrameScript
Use SectorAPI.getClock() to convert to campaign days.- Specified by:
advance
in interfaceEveryFrameScript
- Overrides:
advance
in classBaseToggleAbility
- Parameters:
amount
- seconds elapsed during the last frame.
-
applyEffect
protected void applyEffect(float amount, float level) Description copied from class:BaseToggleAbility
Will be called once when level is 0 and consistently when level >0.- Specified by:
applyEffect
in classBaseToggleAbility
-
getCommodity
-
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 classBaseToggleAbility
- Returns:
-
deactivateImpl
protected void deactivateImpl()- Specified by:
deactivateImpl
in classBaseToggleAbility
-
cleanupImpl
protected void cleanupImpl()- Specified by:
cleanupImpl
in classBaseToggleAbility
-
getRingRadius
public float getRingRadius() -
render
- Specified by:
render
in interfaceAbilityPlugin
- Overrides:
render
in classBaseAbilityPlugin
-