Class TestEvent
java.lang.Object
com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
com.fs.starfarer.api.impl.campaign.events.TestEvent
- All Implemented Interfaces:
CampaignEventListener
,CampaignEventPlugin
,CallEvent.CallableEvent
-
Nested Class Summary
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
Fields inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
entity, eventType, faction, market, memory, startProbability, statModId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) boolean
DO NOT USE, DOES NOT WORK.void
cleanup()
Called when this instance of the event is removed from the event manager (either due to event being over, or due to event probability dropping to 0).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.event_stage for when the event is likely, but hasn't happened yet.event_stage for when the event is possible, but hasn't happened yet.Token values for filling out descriptions from reports.csv.Message priority for the "event is likely" report.Message priority for the "event is possible" report.void
init
(String type, CampaignEventTarget eventTarget) Called when the EventProbability for this event is accessed.boolean
isDone()
void
Only called when an event is started via CampaignEventManagerAPI.startEvent().void
Called when the event starts.Methods inherited from class com.fs.starfarer.api.impl.campaign.events.BaseEventPlugin
addFactionNameTokens, addPersonTokens, addTokensToList, callEvent, findMatchingMarkets, findNearestMarket, getCurrentImage, getCurrentMessageIcon, getDefaultPriority, getEventCategory, getEventIcon, getEventName, getId, getLoggingId, getMemory, getPriceUpdates, getRelatedCommodities, getStatModId, getTargetName, increaseRecentUnrest, init, isEventStarted, reportBattleFinished, reportBattleOccurred, reportEconomyMonthEnd, reportEconomyTick, reportEncounterLootGenerated, reportFleetDespawned, reportFleetJumped, reportFleetReachedEntity, reportFleetSpawned, reportPlayerActivatedAbility, reportPlayerClosedMarket, reportPlayerDeactivatedAbility, reportPlayerDidNotTakeCargo, reportPlayerDumpedCargo, reportPlayerEngagement, reportPlayerMarketTransaction, reportPlayerOpenedMarket, reportPlayerOpenedMarketAndCargoUpdated, reportPlayerReputationChange, reportPlayerReputationChange, reportShownInteractionDialog, setProbability, setTarget, showAllMessagesIfOngoing, showLatestMessageIfOngoing, startEvent, useEventNameAsId
-
Constructor Details
-
TestEvent
public TestEvent()
-
-
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
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceCampaignEventPlugin
- Overrides:
isDone
in classBaseEventPlugin
-
getEventTarget
- Specified by:
getEventTarget
in interfaceCampaignEventPlugin
- Overrides:
getEventTarget
in classBaseEventPlugin
-
getEventType
- Specified by:
getEventType
in interfaceCampaignEventPlugin
- Overrides:
getEventType
in classBaseEventPlugin
-
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:
-
getWarningWhenPossiblePriority
Description copied from interface:CampaignEventPlugin
Message priority for the "event is possible" report.- Specified by:
getWarningWhenPossiblePriority
in interfaceCampaignEventPlugin
- Overrides:
getWarningWhenPossiblePriority
in classBaseEventPlugin
- Returns:
-
getWarningWhenLikelyPriority
Description copied from interface:CampaignEventPlugin
Message priority for the "event is likely" report.- Specified by:
getWarningWhenLikelyPriority
in interfaceCampaignEventPlugin
- Overrides:
getWarningWhenLikelyPriority
in classBaseEventPlugin
- Returns:
-
getStageIdForLikely
Description copied from interface:CampaignEventPlugin
event_stage for when the event is likely, but hasn't happened yet.- Specified by:
getStageIdForLikely
in interfaceCampaignEventPlugin
- Overrides:
getStageIdForLikely
in classBaseEventPlugin
- Returns:
-
getStageIdForPossible
Description copied from interface:CampaignEventPlugin
event_stage for when the event is possible, but hasn't happened yet.- Specified by:
getStageIdForPossible
in interfaceCampaignEventPlugin
- Overrides:
getStageIdForPossible
in classBaseEventPlugin
- Returns:
-
cleanup
public void cleanup()Description copied from interface:CampaignEventPlugin
Called when this instance of the event is removed from the event manager (either due to event being over, or due to event probability dropping to 0).- Specified by:
cleanup
in interfaceCampaignEventPlugin
- Overrides:
cleanup
in classBaseEventPlugin
-
setParam
Description copied from interface:CampaignEventPlugin
Only called when an event is started via CampaignEventManagerAPI.startEvent().- Specified by:
setParam
in interfaceCampaignEventPlugin
- Overrides:
setParam
in classBaseEventPlugin
-
allowMultipleOngoingForSameTarget
public boolean allowMultipleOngoingForSameTarget()Description copied from interface:CampaignEventPlugin
DO NOT USE, DOES NOT WORK. Should always return false.- Specified by:
allowMultipleOngoingForSameTarget
in interfaceCampaignEventPlugin
- Overrides:
allowMultipleOngoingForSameTarget
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:
-
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:
-