public class DistressCallAbility extends BaseDurationAbility implements RouteManager.RouteFleetSpawner
| Modifier and Type | Class and Description |
|---|---|
static class |
DistressCallAbility.AbilityUseData |
static class |
DistressCallAbility.DistressCallOutcome |
static class |
DistressCallAbility.DistressResponseData |
| Modifier and Type | Field and Description |
|---|---|
static float |
DAYS_TO_TRACK_USAGE |
protected long |
lastUsed |
static float |
NEARBY_USE_RADIUS_LY |
static float |
NEARBY_USE_TIMEOUT_DAYS |
protected int |
numTimesUsed |
protected boolean |
performed |
protected TimeoutTracker<DistressCallAbility.AbilityUseData> |
uses |
activeDaysLeft, cooldownLeft, fadingOut, level, LOOP_FADE_TIME_DAYS, loopFadeLeft, turnedOndisableFrames, entity, id, PLAY_UI_SOUNDS_IN_WORLD_SOURCES, spec| Constructor and Description |
|---|
DistressCallAbility() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activateImpl() |
protected void |
addHelpScript(float delayDays,
StarSystemAPI system,
JumpPointAPI inner,
JumpPointAPI outer) |
protected void |
addPiratesScript(float delayDays,
StarSystemAPI system,
JumpPointAPI inner,
JumpPointAPI outer) |
protected void |
addResponseScript(float delayDays,
DistressCallAbility.DistressCallOutcome outcome) |
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 |
cleanupImpl() |
void |
createTooltip(TooltipMakerAPI tooltip,
boolean expanded)
Will be called every frame the tooltip is shown, so the tooltip can be dynamic.
|
protected void |
deactivateImpl() |
int |
getNumUsesInLastPeriod() |
TimeoutTracker<DistressCallAbility.AbilityUseData> |
getUses() |
boolean |
hasTooltip() |
boolean |
isUsable()
Whether the ability can be activated / the UI button corresponding to it is enabled.
|
protected java.lang.Object |
readResolve() |
void |
reportAboutToBeDespawnedByRouteManager(RouteManager.RouteData route) |
boolean |
shouldCancelRouteAfterDelayCheck(RouteManager.RouteData route) |
boolean |
shouldRepeat(RouteManager.RouteData route) |
CampaignFleetAPI |
spawnFleet(RouteManager.RouteData route) |
boolean |
wasUsedNearby(float withinDays,
org.lwjgl.util.vector.Vector2f locInHyper,
float withinRangeLY) |
activate, addIncompatibleToTooltip, cleanup, deactivate, getActivationDays, getActiveDaysLeft, getCooldownDays, getCooldownFraction, getCooldownLeft, getDeactivationDays, getDurationDays, getLevel, getLoopSoundUIPitch, getLoopSoundUIVolume, getLoopSoundWorldPitch, getLoopSoundWorldVolume, getProgressFraction, getTotalDurationDays, hasCustomButtonPressSounds, isActive, isFadingOut, isInProgress, pressButton, runWhilePaused, setActiveDaysLeft, setCooldownLeft, showActiveIndicator, showProgressIndicatoraddIncompatibleToTooltip, disableIncompatible, fleetJoinedBattle, fleetLeftBattle, fleetOpenedMarket, forceDisable, getActivationText, getActiveColor, getActiveLayers, getCooldownColor, getDeactivationText, getEntity, getFleet, getId, getInterruptedList, getLoopSoundUI, getLoopSoundWorld, getModId, getOffSoundUI, getOffSoundWorld, getOnSoundUI, getOnSoundWorld, getProgressColor, getSpec, getSpriteName, getTooltipWidth, init, interruptIncompatible, isActiveOrInProgress, isCompatible, isCooldownRenderingAdditive, isDone, isOnCooldown, isTooltipExpandable, render, showCooldownIndicatorpublic static final float NEARBY_USE_TIMEOUT_DAYS
public static final float NEARBY_USE_RADIUS_LY
public static final float DAYS_TO_TRACK_USAGE
protected boolean performed
protected int numTimesUsed
protected long lastUsed
protected TimeoutTracker<DistressCallAbility.AbilityUseData> uses
public DistressCallAbility()
protected java.lang.Object readResolve()
readResolve in class BaseAbilityPluginprotected void activateImpl()
activateImpl in class BaseDurationAbilityprotected void applyEffect(float amount, float level)
BaseDurationAbilityapplyEffect in class BaseDurationAbilitypublic boolean wasUsedNearby(float withinDays, org.lwjgl.util.vector.Vector2f locInHyper, float withinRangeLY)
public void advance(float amount)
EveryFrameScriptadvance in interface EveryFrameScriptadvance in class BaseDurationAbilityamount - seconds elapsed during the last frame.public TimeoutTracker<DistressCallAbility.AbilityUseData> getUses()
public int getNumUsesInLastPeriod()
protected void addResponseScript(float delayDays, DistressCallAbility.DistressCallOutcome outcome)
protected void addPiratesScript(float delayDays, StarSystemAPI system, JumpPointAPI inner, JumpPointAPI outer)
protected void addHelpScript(float delayDays, StarSystemAPI system, JumpPointAPI inner, JumpPointAPI outer)
public boolean isUsable()
AbilityPluginisUsable in interface AbilityPluginisUsable in class BaseDurationAbilityprotected void deactivateImpl()
deactivateImpl in class BaseDurationAbilityprotected void cleanupImpl()
cleanupImpl in class BaseDurationAbilitypublic void createTooltip(TooltipMakerAPI tooltip, boolean expanded)
AbilityPlugincreateTooltip in interface AbilityPlugincreateTooltip in class BaseAbilityPluginpublic boolean hasTooltip()
hasTooltip in interface AbilityPluginhasTooltip in class BaseAbilityPluginpublic CampaignFleetAPI spawnFleet(RouteManager.RouteData route)
spawnFleet in interface RouteManager.RouteFleetSpawnerpublic void reportAboutToBeDespawnedByRouteManager(RouteManager.RouteData route)
reportAboutToBeDespawnedByRouteManager in interface RouteManager.RouteFleetSpawnerpublic boolean shouldCancelRouteAfterDelayCheck(RouteManager.RouteData route)
shouldCancelRouteAfterDelayCheck in interface RouteManager.RouteFleetSpawnerpublic boolean shouldRepeat(RouteManager.RouteData route)
shouldRepeat in interface RouteManager.RouteFleetSpawner