1package com.fs.starfarer.api.impl.campaign.intel.bar.events;
3import java.util.LinkedHashSet;
7import com.fs.starfarer.api.Global;
8import com.fs.starfarer.api.campaign.CargoAPI;
9import com.fs.starfarer.api.campaign.InteractionDialogAPI;
10import com.fs.starfarer.api.campaign.OptionPanelAPI;
11import com.fs.starfarer.api.campaign.PlanetAPI;
12import com.fs.starfarer.api.campaign.TextPanelAPI;
13import com.fs.starfarer.api.campaign.econ.MarketAPI;
14import com.fs.starfarer.api.campaign.rules.MemoryAPI;
15import com.fs.starfarer.api.characters.FullName.Gender;
16import com.fs.starfarer.api.characters.PersonAPI;
17import com.fs.starfarer.api.impl.campaign.DebugFlags;
18import com.fs.starfarer.api.impl.campaign.ids.Factions;
19import com.fs.starfarer.api.impl.campaign.ids.Ranks;
20import com.fs.starfarer.api.impl.campaign.ids.Tags;
21import com.fs.starfarer.api.impl.campaign.procgen.themes.MiscellaneousThemeGenerator;
22import com.fs.starfarer.api.util.Misc;
23import com.fs.starfarer.api.util.WeightedRandomPicker;
27 public static enum OptionId {
48 if (!super.shouldShowAtMarket(
market))
return false;
71 if (this.market ==
market)
return;
86 if (curr ==
market)
continue;
87 if (curr.isPlayerOwned())
continue;
88 if (curr.isHidden())
continue;
89 if (curr.isInvalidMissionTarget())
continue;
90 if (curr.getStabilityValue() <= 0)
continue;
92 float w = curr.getSize();
93 if (curr.isFreePort()) w += 10f;
109 text.
addPara(
"A rough-looking veteran spacer with cybernetic eyes seems to be staring intently at you; " +
110 "it's a little unnerving.");
133 if (!(optionData instanceof OptionId)) {
136 OptionId option = (OptionId) optionData;
151 " growls back. Then laughs, and taps " +
getHisOrHer() +
" temple. " +
152 "\"Swear I'll never get proper used to these things.\"");
157 text.
addPara(
"The old space-hand opens up as one drink turns to two or three. " +
159 getHisOrHer() +
" lost eyes.\n\n\"Was just two survivors from that mission, me and the pilot. " +
160 "Lucky bastards, we two.\" It all began when " +
getHeOrShe() +
" was hired on to " +
161 "a salvage fleet trawling decivilized systems outside the Core Worlds. " +
162 "The loot was good, and any brigand they couldn't fight, they could flee." +
163 "\n\nThen the officers found something new in a data-cache. " +
164 "Rumours flew among the crew, who were told nothing, as the fleet suddenly left a rich " +
165 "asteroid belt to make for the outer system jump-point. " +
166 "They fared two hyperspace storms before arriving at a distant star system.");
171 text.
addPara(
"There they found a planet all shining and red. \"It weren't anything natural. " +
172 "It was all... shapes, angles, glowing like plasma. That's truth,\" " +
getHeOrShe() +
173 " says quietly, \"I've seen Gates, sure, and orbital works big as you like. Ain't " +
174 "never seen anything Domain-made glow like that across a whole planet's face. " +
175 "Not anything that weren't a weapon, I mean.\"");
180 text.
addPara(
"\"While we were gawkin', the prox alarm goes and it's battle stations\", " +
getHeOrShe() +
181 " continues. Hostile ships came fast upon the salvage fleet, flitting with agility " +
182 "belying advanced tech. They had equally advanced weapons, too, and with those they " +
183 "attacked with no mercy. \"It weren't pirates, nor military,\" here the spacer loses " +
184 getHisOrHer() +
" cheer at a good story. \"Ludd's hells, I swear to you it weren't anything human.\"");
187 "escape pod which was only \"mostly\" malfunctioning. \"The miracle wasn't that I " +
188 "fixed it, it's that they could thaw enough of me out at the end of it for me to keep " +
189 "livin', if you call this livin'.\"");
191 options.
addOption(
"\"Where was this system with the red planet?\"", OptionId.WHERE_WAS_SYSTEM);
193 case WHERE_WAS_SYSTEM:
194 text.
addPara(
"You emphasize your interest in the subject by having the spacer's drink refreshed. " +
196 "I wouldn't wish my fate on you or anyone. Besides, I have no idea.\" A pause, then, " +
200 "stride as " +
getHimOrHerself() +
", and has taken to drinking themselves senseless " +
202 "\"Some folks, I don't think they react well " +
203 "to the emergency cryo-pods. Like a bit o' their brain is still froze up and not coming back.\"");
206 Set<String> tags =
new LinkedHashSet<String>();
211 true, icon,
null, tags);
217 "this mysterious planet with its unknown technology. You also realize that the old spacer " +
218 "has fallen asleep in " +
getHisOrHer() +
" seat, cybernetic eyes blanked out in standby mode.");
238 boolean success =
false;
239 if (planet !=
null) {
248 text.
addPara(
"For a minute there, you were caught by the story, but you now see that following up " +
249 "on it would be a fool's errand.");
static SettingsAPI getSettings()
static SectorAPI getSector()
static final String LUDDIC_PATH
static final String LUDDIC_CHURCH
static final String INDEPENDENT
static String POST_CITIZEN
static String SPACE_SAILOR
void notifyWasInteractedWith(PortsideBarEvent event)
static BarEventManager getInstance()
transient boolean noContinue
transient TextPanelAPI text
transient OptionPanelAPI options
transient Map< String, MemoryAPI > memoryMap
transient InteractionDialogAPI dialog
void addPromptAndOption(InteractionDialogAPI dialog, Map< String, MemoryAPI > memoryMap)
static PlanetAPI getTargetPlanet()
String getPersonPortrait()
void init(InteractionDialogAPI dialog, Map< String, MemoryAPI > memoryMap)
void regen(MarketAPI market)
MarketAPI getPilotMarket()
String getPersonFaction()
PlanetaryShieldBarEvent()
void optionSelected(String optionText, Object optionData)
boolean shouldShowAtMarket(MarketAPI market)
static String PLANETARY_SHIELD_PLANET_KEY
static String ucFirst(String str)
String getSpriteName(String category, String id)
PersonAPI createRandomPerson()
TextPanelAPI getTextPanel()
VisualPanelAPI getVisualPanel()
SectorEntityToken getInteractionTarget()
OptionPanelAPI getOptionPanel()
void addOption(String text, Object data)
CampaignFleetAPI getPlayerFleet()
IntelManagerAPI getIntelManager()
MutableCharacterStatsAPI getPlayerStats()
FactionAPI getFaction(String factionId)
MemoryAPI getMemoryWithoutUpdate()
LabelAPI addPara(String text)
void showMapMarker(SectorEntityToken marker, String title, Color titleColor, boolean withIntel, String icon, String text, Set< String > intelTags)
void showPersonInfo(PersonAPI person)
void addIntel(IntelInfoPlugin plugin)
boolean hasIntelOfClass(Class<?> c)
List< MarketAPI > getMarketsInGroup(String group)
SectorEntityToken getPrimaryEntity()
void setPortraitSprite(String portraitSprite)
void setRankId(String rank)
void setPostId(String postId)