Class NearbyEventsEvent
java.lang.Object
com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
com.fs.starfarer.api.impl.campaign.events.nearby.NearbyEventsEvent
- All Implemented Interfaces:
CampaignEventListener
,CampaignEventPlugin
,RouteManager.RouteFleetSpawner
,CallEvent.CallableEvent
- Author:
- Alex Mosolov Copyright 2014 Fractal Softworks, LLC
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
Nested classes/interfaces inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
BaseEventPlugin.MarketFilter
Nested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.CampaignEventListener
CampaignEventListener.FleetDespawnReason
Nested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.events.CampaignEventPlugin
CampaignEventPlugin.CampaignEventCategory, CampaignEventPlugin.PriceUpdatePlugin
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic float
static float
protected IntervalUtil
static float
static float
static float
static float
static float
static float
static float
protected IntervalUtil
protected TimeoutTracker<String>
static boolean
Fields inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
entity, eventTarget, eventType, faction, market, memory, started, startProbability, statModId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
adjustRep
(float repChangePercent, RepLevel limit, FactionAPI faction, PersonAPI person, TextPanelAPI text) void
advance
(float amount) boolean
callEvent
(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) Called by the CallEvent command (called from rules.csv).protected void
protected void
protected void
protected void
Color[]
getHighlightColors
(String stageId) Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.String[]
getHighlights
(String stageId) Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.Token values for filling out descriptions from reports.csv.void
init
(String type, CampaignEventTarget eventTarget) Called when the EventProbability for this event is accessed.boolean
isDone()
static void
protected void
protected void
void
boolean
boolean
boolean
If true, messages for an ongoing event will be shown in the intel UI even if they don't meet the "last week/month/cycle" criteria.spawnFleet
(RouteManager.RouteData route) void
Called when the event starts.Methods inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
addFactionNameTokens, addPersonTokens, addTokensToList, allowMultipleOngoingForSameTarget, cleanup, findMatchingMarkets, findNearestMarket, getCurrentImage, getCurrentMessageIcon, getDefaultPriority, getEventIcon, getEventName, getEventType, getId, getLoggingId, getMemory, getPriceUpdates, getRelatedCommodities, getStageIdForLikely, getStageIdForPossible, getStatModId, getTargetName, getWarningWhenLikelyPriority, getWarningWhenPossiblePriority, increaseRecentUnrest, init, isEventStarted, reportBattleFinished, reportBattleOccurred, reportEconomyMonthEnd, reportEconomyTick, reportEncounterLootGenerated, reportFleetDespawned, reportFleetJumped, reportFleetReachedEntity, reportFleetSpawned, reportPlayerActivatedAbility, reportPlayerClosedMarket, reportPlayerDeactivatedAbility, reportPlayerDidNotTakeCargo, reportPlayerDumpedCargo, reportPlayerEngagement, reportPlayerMarketTransaction, reportPlayerOpenedMarket, reportPlayerOpenedMarketAndCargoUpdated, reportPlayerReputationChange, reportPlayerReputationChange, reportShownInteractionDialog, setParam, setProbability, setTarget, showLatestMessageIfOngoing, startEvent, useEventNameAsId
-
Field Details
-
DISTRESS_REPEAT_TIMEOUT
public static float DISTRESS_REPEAT_TIMEOUT -
DISTRESS_ALREADY_WAS_NEARBY_TIMEOUT
public static float DISTRESS_ALREADY_WAS_NEARBY_TIMEOUT -
DISTRESS_MIN_SINCE_PLAYER_IN_SYSTEM
public static float DISTRESS_MIN_SINCE_PLAYER_IN_SYSTEM -
DISTRESS_MIN_CHECK_INTERVAL
public static float DISTRESS_MIN_CHECK_INTERVAL -
DISTRESS_MAX_CHECK_INTERVAL
public static float DISTRESS_MAX_CHECK_INTERVAL -
DISTRESS_PROB_PER_SYSTEM
public static float DISTRESS_PROB_PER_SYSTEM -
DISTRESS_MAX_PROB
public static float DISTRESS_MAX_PROB -
DERELICT_SKIP_PROB
public static float DERELICT_SKIP_PROB -
DERELICT_SKIP_PROB_ABYSS
public static float DERELICT_SKIP_PROB_ABYSS -
derelictShipInterval
-
distressCallInterval
-
skipForDistressCalls
-
TEST_MODE
public static boolean TEST_MODE -
distressCallAllowedThemes
-
-
Constructor Details
-
NearbyEventsEvent
public NearbyEventsEvent()
-
-
Method Details
-
init
Description copied from interface:CampaignEventPlugin
Called when the EventProbability for this event is accessed. Doesn't mean the event will actually happen.- Specified by:
init
in interfaceCampaignEventPlugin
- Overrides:
init
in classBaseEventPlugin
-
startEvent
public void startEvent()Description copied from interface:CampaignEventPlugin
Called when the event starts.- Specified by:
startEvent
in interfaceCampaignEventPlugin
- Overrides:
startEvent
in classBaseEventPlugin
-
advance
public void advance(float amount) - Specified by:
advance
in interfaceCampaignEventPlugin
- Overrides:
advance
in classBaseEventPlugin
-
maybeSpawnDerelictShip
protected void maybeSpawnDerelictShip() -
maybeSpawnDistressCall
protected void maybeSpawnDistressCall() -
generateDistressDerelictShip
-
generateDistressCallAmbushTrap
-
generateDistressCallAmbush
-
generateDistressCallNormal
-
reportAboutToBeDespawnedByRouteManager
- Specified by:
reportAboutToBeDespawnedByRouteManager
in interfaceRouteManager.RouteFleetSpawner
-
shouldCancelRouteAfterDelayCheck
- Specified by:
shouldCancelRouteAfterDelayCheck
in interfaceRouteManager.RouteFleetSpawner
-
shouldRepeat
- Specified by:
shouldRepeat
in interfaceRouteManager.RouteFleetSpawner
-
spawnFleet
- Specified by:
spawnFleet
in interfaceRouteManager.RouteFleetSpawner
-
callEvent
public boolean callEvent(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) Description copied from interface:CampaignEventPlugin
Called by the CallEvent command (called from rules.csv).- Specified by:
callEvent
in interfaceCallEvent.CallableEvent
- Specified by:
callEvent
in interfaceCampaignEventPlugin
- Overrides:
callEvent
in classBaseEventPlugin
-
adjustRep
protected void adjustRep(float repChangePercent, RepLevel limit, FactionAPI faction, PersonAPI person, TextPanelAPI text) -
getTokenReplacements
Description copied from interface:CampaignEventPlugin
Token values for filling out descriptions from reports.csv.- Specified by:
getTokenReplacements
in interfaceCampaignEventPlugin
- Overrides:
getTokenReplacements
in classBaseEventPlugin
- Returns:
-
getHighlights
Description copied from interface:CampaignEventPlugin
Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.- Specified by:
getHighlights
in interfaceCampaignEventPlugin
- Overrides:
getHighlights
in classBaseEventPlugin
- Returns:
-
getHighlightColors
Description copied from interface:CampaignEventPlugin
Since multiple reports (possibly from different channels) are possible per stage: 1) All reports must have the highlighted text occur in the same order, which is the order this method returns them in, and 2) Not all highlights have to occur in every report.- Specified by:
getHighlightColors
in interfaceCampaignEventPlugin
- Overrides:
getHighlightColors
in classBaseEventPlugin
- Returns:
-
getEventTarget
- Specified by:
getEventTarget
in interfaceCampaignEventPlugin
- Overrides:
getEventTarget
in classBaseEventPlugin
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceCampaignEventPlugin
- Overrides:
isDone
in classBaseEventPlugin
-
getEventCategory
- Specified by:
getEventCategory
in interfaceCampaignEventPlugin
- Overrides:
getEventCategory
in classBaseEventPlugin
-
showAllMessagesIfOngoing
public boolean showAllMessagesIfOngoing()Description copied from interface:CampaignEventPlugin
If true, messages for an ongoing event will be shown in the intel UI even if they don't meet the "last week/month/cycle" criteria.- Specified by:
showAllMessagesIfOngoing
in interfaceCampaignEventPlugin
- Overrides:
showAllMessagesIfOngoing
in classBaseEventPlugin
- Returns:
-
main
- Throws:
ParseException
-