1package com.fs.starfarer.api.impl.campaign.intel.bar.events;
9import com.fs.starfarer.api.Global;
10import com.fs.starfarer.api.campaign.CampaignFleetAPI;
11import com.fs.starfarer.api.campaign.CargoAPI;
12import com.fs.starfarer.api.campaign.FactionAPI;
13import com.fs.starfarer.api.campaign.InteractionDialogAPI;
14import com.fs.starfarer.api.campaign.PlanetAPI;
15import com.fs.starfarer.api.campaign.SectorEntityToken;
16import com.fs.starfarer.api.campaign.econ.MarketAPI;
17import com.fs.starfarer.api.campaign.rules.MemoryAPI;
18import com.fs.starfarer.api.characters.PersonAPI;
19import com.fs.starfarer.api.impl.campaign.ids.Tags;
20import com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin;
21import com.fs.starfarer.api.impl.campaign.rulecmd.AddRemoveCommodity;
22import com.fs.starfarer.api.ui.SectorMapAPI;
23import com.fs.starfarer.api.ui.TooltipMakerAPI;
24import com.fs.starfarer.api.util.Misc;
25import com.fs.starfarer.api.util.Misc.Token;
29 public static enum PSIStage {
51 MarketAPI market =
event.getPilotMarket();
65 stage = PSIStage.TALK_TO_PILOT;
74 MarketAPI market =
event.getPilotMarket();
84 List<Token> params, Map<String, MemoryAPI> memoryMap) {
85 String action = params.get(0).getString(memoryMap);
92 MarketAPI market =
event.getPilotMarket();
94 if (action.equals(
"prepare")) {
97 }
else if (action.equals(
"canPay")) {
99 }
else if (action.equals(
"payPilot")) {
108 stage = PSIStage.GO_TO_PLANET;
117 stage = PSIStage.DONE;
119 super.endAfterDelay();
124 super.notifyEnding();
136 if (mode == ListInfoMode.IN_DESC) initPad = opad;
143 MarketAPI market =
event.getPilotMarket();
145 if (
stage == PSIStage.TALK_TO_PILOT) {
147 }
else if (
stage == PSIStage.GO_TO_PLANET) {
148 info.
addPara(
"Explore the planet", tc, initPad);
175 if (
stage == PSIStage.TALK_TO_PILOT) {
176 info.
addPara(
"An old spacer told you a tale about a mysterious red planet. " +
177 "The pilot - the only other survivor of the salvage expedition - may know the planet's location.", opad);
178 }
else if (
stage == PSIStage.GO_TO_PLANET) {
179 info.
addPara(
"You've talked to the old spacer's pilot comrade and convinced " +
180 "them to divulge the location of the planet.", opad);
182 info.
addPara(
"You've found the planet and uncovered its secret.", opad);
196 Set<String> tags = super.getIntelTags(map);
206 return IntelSortTier.TIER_2;
215 return "Red Planet - Completed";
222 return super.getFactionForUIColors();
231 if (
stage == PSIStage.TALK_TO_PILOT) {
232 return event.getPilotMarket().getPrimaryEntity();
239 return super.shouldRemoveIntel();
static SettingsAPI getSettings()
static SectorAPI getSector()
void sendUpdate(Object listInfoParam, TextPanelAPI textPanel)
void unindent(TooltipMakerAPI info)
Object getListInfoParam()
Color getBulletColorForMode(ListInfoMode mode)
void bullet(TooltipMakerAPI info)
static String getSoundMajorPosting()
Color getTitleColor(ListInfoMode mode)
IntelSortTier getSortTier()
String getCommMessageSound()
PlanetaryShieldBarEvent event
void createIntelInfo(TooltipMakerAPI info, ListInfoMode mode)
boolean callEvent(String ruleId, InteractionDialogAPI dialog, List< Token > params, Map< String, MemoryAPI > memoryMap)
String getSmallDescriptionTitle()
SectorEntityToken getMapLocation(SectorMapAPI map)
boolean shouldRemoveIntel()
void createSmallDescription(TooltipMakerAPI info, float width, float height)
FactionAPI getFactionForUIColors()
Set< String > getIntelTags(SectorMapAPI map)
void addBulletPoints(TooltipMakerAPI info, ListInfoMode mode)
PlanetaryShieldIntel(PlanetAPI planet, PlanetaryShieldBarEvent event)
static void addCreditsLossText(int credits, TextPanelAPI text)
static Color getTextColor()
static String getDGSCredits(float num)
static void makeImportant(SectorEntityToken entity, String reason)
static Color getGrayColor()
static void makeUnimportant(SectorEntityToken entity, String reason)
static Color getHighlightColor()
String getSpriteName(String category, String id)
MutableValue getCredits()
void removePerson(PersonAPI person)
String addPerson(PersonAPI person)
TextPanelAPI getTextPanel()
CampaignFleetAPI getPlayerFleet()
void removeScript(EveryFrameScript script)
PersonAPI getPlayerPerson()
void addPerson(PersonAPI person)
CommDirectoryAPI getCommDirectory()
void removePerson(PersonAPI person)
void set(String key, Object value)
void addXP(long xp, TextPanelAPI textPanel, boolean withMessage, boolean allowBonusXP, boolean withLevelUp)
MutableCharacterStatsAPI getStats()
MemoryAPI getMemoryWithoutUpdate()