Class BaseEventIntel
java.lang.Object
com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin
com.fs.starfarer.api.impl.campaign.intel.events.BaseEventIntel
- All Implemented Interfaces:
IntelInfoPlugin
,EconomyTickListener
,EveryFrameScript
,CommRelayEntityPlugin.CommSnifferReadableIntel
,CallEvent.CallableEvent
- Direct Known Subclasses:
HostileActivityEventIntel
,HyperspaceTopographyEventIntel
,TriTachyonCommerceRaiding
For capital-E "Events" with a progress bar, Outcomes, contributing factors, and so on.
Large UI; takes up the map area of the intel screen.
- Author:
- Alex Copyright 2022 Fractal Softworks, LLC
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Just a data holder for display purposes in the BaseEventIntel UI.static enum
static enum
Nested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.comm.IntelInfoPlugin
IntelInfoPlugin.ArrowData, IntelInfoPlugin.IntelSortTier, IntelInfoPlugin.ListInfoMode, IntelInfoPlugin.TableRowClickData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InteractionDialogAPI
Adds factor's progress to event progress if it's a one-time factor.protected List<EventFactor>
protected int
protected boolean
protected int
protected float
protected Random
static final String
Assigned to EventStageData.rollData when no random event was rolled.protected IntelInfoPlugin.IntelSortTier
protected List<BaseEventIntel.EventStageData>
protected float
Fields inherited from class com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin
BULLET, BUTTON_DELETE, ended, ending, endingTimeRemaining, forceAdd, hidden, important, INDENT, listInfoParam, neverClicked, postingLocation, postingRangeLY, tagsForSort, timestamp
Fields inherited from interface com.fs.starfarer.api.campaign.comm.IntelInfoPlugin
LIST_ITEM_TEXT_WIDTH, NEW_DAYS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addEventFactorBulletPoints
(TooltipMakerAPI info, IntelInfoPlugin.ListInfoMode mode, boolean isUpdate, Color tc, float initPad) void
addFactor
(EventFactor factor) void
addFactor
(EventFactor factor, InteractionDialogAPI dialog) void
void
void
addStage
(Object id, int progress, boolean isOneOffEvent, BaseEventIntel.StageIconSize iconSize) void
addStage
(Object id, int progress, BaseEventIntel.StageIconSize iconSize) void
addStageDescriptionText
(TooltipMakerAPI info, float width, Object stageId) void
addStageDescriptionWithImage
(TooltipMakerAPI main, Object stageId) protected void
advanceImpl
(float amount) void
createDisplayData
(Object stageId) void
void
createLargeDescription
(CustomPanelAPI panel, float width, float height) float
float
float
float
protected Color
getBaseStageColor
(Object stageId) protected Color
getDarkStageColor
(Object stageId) getDataFor
(Object stageId) float
getImageIndentForStageDesc
(Object stageId) float
getImageSizeForStageDesc
(Object stageId) getIntelTags
(SectorMapAPI map) Method NEEDS to handle map being null gracefully.getLastActiveStage
(boolean includeOneOffEvents) int
int
int
int
getProgressColor
(int delta) float
int
getRequiredProgress
(Object stageId) protected String
protected String
getSoundForOtherUpdate
(Object param) protected String
getSoundForStageReachedUpdate
(Object stageId) protected Color
getStageColor
(Object stageId) protected float
getStageDownLineLength
(Object stageId) protected String
getStageIcon
(Object stageId) protected Color
getStageIconColor
(Object stageId) protected String
getStageIconImpl
(Object stageId) protected float
getStageIconSize
(Object stageId) protected int
getStageImportance
(Object stageId) protected String
getStageLabel
(Object stageId) protected Color
getStageLabelColor
(Object stageId) getStageTooltip
(Object stageId) getStageTooltipImpl
(Object stageId) boolean
boolean
boolean
boolean
isStageActive
(Object stageId) boolean
isStageActiveAndLast
(Object stageId) boolean
isStageActiveAndLast
(Object stageId, boolean includeOneOffEvents) boolean
isStageOrOneOffEventReached
(Object stageId) protected void
protected void
protected void
boolean
void
removeFactor
(EventFactor factor) void
void
void
reportEconomyTick
(int iterIndex) void
void
void
setHideStageWhenPastIt
(Object stageId) void
setMaxProgress
(int maxProgress) void
setProgress
(int progress) void
void
setRandomized
(Object stageId, BaseEventIntel.RandomizedStageType type, int resetAt, int rollAt, boolean sendUpdateWhenReached) void
setRandomized
(Object stageId, BaseEventIntel.RandomizedStageType type, int resetAt, int rollAt, boolean sendUpdateWhenReached, boolean repeatable) void
setSortTier
(IntelInfoPlugin.IntelSortTier sortTier) boolean
boolean
Methods inherited from class com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin
addBulletPoints, addBulletPoints, addDays, addDays, addDays, addDays, addDeleteButton, addDeleteButton, addGenericButton, addGenericButton, addLogTimestamp, addMarketTable, addMarketToList, addMarketToList, advance, autoAddCampaignMessage, bullet, buttonPressCancelled, buttonPressConfirmed, callEvent, canMakeVisible, canMakeVisibleToCommSniffer, canMakeVisibleToPlayer, canTurnImportantOff, createConfirmationPrompt, createDeleteConfirmationPrompt, createSmallDescription, doesButtonHaveConfirmDialog, endAfterDelay, endAfterDelay, endImmediately, forceAddNextFrame, getArrowData, getBackgroundGlowColor, getBaseDaysAfterEnd, getBulletColorForMode, getButtonStoryPointActionDelegate, getCancelText, getCircleBorderColorOverride, getCommRelayRange, getConfirmationPromptWidth, getConfirmText, getDays, getDaysSincePlayerVisible, getDaysString, getFactionForUIColors, getIcon, getImportantIcon, getListInfoParam, getMapLocation, getName, getPlayerVisibleTimestamp, getPostingLocation, getPostingRangeLY, getSmallDescriptionTitle, getSortString, getSortStringNewestFirst, getSortStringNewestFirst, getSoundColonyThreat, getSoundLogUpdate, getSoundMajorPosting, getSoundMinorMessage, getSoundStandardPosting, getSoundStandardUpdate, getTagsForSort, getTimeRemainingFraction, getTitleColor, hasImportantButton, indent, isDone, isEnded, isEnding, isHidden, isImportant, isNew, isPlayerVisible, isSendingUpdate, notifyPlayerAboutToOpenIntelScreen, reportMadeVisibleToPlayer, reportPlayerClickedOn, reportRemovedIntel, runWhilePaused, sendUpdate, sendUpdateIfPlayerHasIntel, sendUpdateIfPlayerHasIntel, sendUpdateIfPlayerHasIntel, setForceAddNextFrame, setHidden, setImportant, setListInfoParam, setNew, setPlayerVisibleTimestamp, setPostingLocation, setPostingRangeLY, setPostingRangeLY, setTagsForSort, shouldRemoveIntel, storyActionConfirmed, tableRowClicked, unindent
-
Field Details
-
RANDOM_EVENT_NONE
Assigned to EventStageData.rollData when no random event was rolled.- See Also:
-
progress
protected int progress -
maxProgress
protected int maxProgress -
stages
-
sortTier
-
factors
-
random
-
progressDeltaRemainder
protected float progressDeltaRemainder -
uiWidth
protected transient float uiWidth -
addingFactorDialog
Adds factor's progress to event progress if it's a one-time factor. If dialog is passed in, it'll be visible to notifyStageReached() via addingFactorDialog, in case that needs to print an update there. -
prevProgressDeltaWasPositive
protected transient boolean prevProgressDeltaWasPositive
-
-
Constructor Details
-
BaseEventIntel
public BaseEventIntel()
-
-
Method Details
-
advanceImpl
protected void advanceImpl(float amount) - Overrides:
advanceImpl
in classBaseIntelPlugin
-
createIntelInfo
- Specified by:
createIntelInfo
in interfaceIntelInfoPlugin
- Overrides:
createIntelInfo
in classBaseIntelPlugin
-
addEventFactorBulletPoints
protected boolean addEventFactorBulletPoints(TooltipMakerAPI info, IntelInfoPlugin.ListInfoMode mode, boolean isUpdate, Color tc, float initPad) -
createLargeDescription
- Specified by:
createLargeDescription
in interfaceIntelInfoPlugin
- Overrides:
createLargeDescription
in classBaseIntelPlugin
-
getBarTooltip
-
getStageTooltip
-
getStageTooltipImpl
-
getImageSizeForStageDesc
-
getImageIndentForStageDesc
-
afterStageDescriptions
-
addStageDescriptionWithImage
-
addStageDescriptionText
-
createDisplayData
-
getStageIcon
-
getStageIconImpl
-
getStageIconSize
-
getStageDownLineLength
-
getBarWidth
public float getBarWidth() -
getBarHeight
public float getBarHeight() -
putBarProgressIndicatorLabelOnRight
public boolean putBarProgressIndicatorLabelOnRight() -
getBarProgressIndicatorHeight
public float getBarProgressIndicatorHeight() -
getBarProgressIndicatorWidth
public float getBarProgressIndicatorWidth() -
getBarProgressIndicatorLabelColor
-
getBarProgressIndicatorColor
-
getBarBracketColor
-
getBarColor
-
getBaseStageColor
-
getDarkStageColor
-
getStageColor
-
getStageIconColor
-
getStageImportance
-
getStageLabel
-
getStageLabelColor
-
getIntelTags
Description copied from interface:IntelInfoPlugin
Method NEEDS to handle map being null gracefully.- Specified by:
getIntelTags
in interfaceIntelInfoPlugin
- Overrides:
getIntelTags
in classBaseIntelPlugin
- Returns:
-
hasSmallDescription
public boolean hasSmallDescription()- Specified by:
hasSmallDescription
in interfaceIntelInfoPlugin
- Overrides:
hasSmallDescription
in classBaseIntelPlugin
-
hasLargeDescription
public boolean hasLargeDescription()- Specified by:
hasLargeDescription
in interfaceIntelInfoPlugin
- Overrides:
hasLargeDescription
in classBaseIntelPlugin
-
getMaxProgress
public int getMaxProgress() -
setMaxProgress
public void setMaxProgress(int maxProgress) -
getStages
-
isStageOrOneOffEventReached
-
isStageActiveAndLast
-
isStageActiveAndLast
-
addStage
-
addStage
-
addStage
-
addStage
public void addStage(Object id, int progress, boolean isOneOffEvent, BaseEventIntel.StageIconSize iconSize) -
isStageActive
-
getLastActiveStage
-
getDataFor
-
getRequiredProgress
-
setSortTier
-
getSortTier
- Specified by:
getSortTier
in interfaceIntelInfoPlugin
- Overrides:
getSortTier
in classBaseIntelPlugin
-
notifyEnded
protected void notifyEnded()- Overrides:
notifyEnded
in classBaseIntelPlugin
-
notifyEnding
protected void notifyEnding()- Overrides:
notifyEnding
in classBaseIntelPlugin
-
addFactor
-
addFactor
-
getTextPanelForStageChange
-
getFactors
-
getFactorOfClass
-
removeFactor
-
removeFactorOfClass
-
isEventProgressANegativeThingForThePlayer
public boolean isEventProgressANegativeThingForThePlayer() -
getMaxMonthlyProgress
public int getMaxMonthlyProgress() -
getMonthlyProgress
public int getMonthlyProgress() -
reportEconomyTick
public void reportEconomyTick(int iterIndex) - Specified by:
reportEconomyTick
in interfaceEconomyTickListener
-
getProgress
public int getProgress() -
setProgress
public void setProgress(int progress) -
getSoundForStageReachedUpdate
-
getSoundForOneTimeFactorUpdate
-
getSoundForOtherUpdate
-
getCommMessageSound
- Specified by:
getCommMessageSound
in interfaceIntelInfoPlugin
- Overrides:
getCommMessageSound
in classBaseIntelPlugin
-
notifyStageReached
-
reportEconomyMonthEnd
public void reportEconomyMonthEnd()- Specified by:
reportEconomyMonthEnd
in interfaceEconomyTickListener
-
getProgressColor
-
setHideStageWhenPastIt
-
setRandomized
public void setRandomized(Object stageId, BaseEventIntel.RandomizedStageType type, int resetAt, int rollAt, boolean sendUpdateWhenReached) -
setRandomized
public void setRandomized(Object stageId, BaseEventIntel.RandomizedStageType type, int resetAt, int rollAt, boolean sendUpdateWhenReached, boolean repeatable) -
getRandom
-
setRandom
-
resetRandomizedStage
-
rollRandomizedStage
-
getProgressFraction
public float getProgressFraction() -
withMonthlyFactors
public boolean withMonthlyFactors() -
withOneTimeFactors
public boolean withOneTimeFactors()
-