1package com.fs.starfarer.api.impl.campaign.intel.bar.events;
5import com.fs.starfarer.api.Global;
6import com.fs.starfarer.api.campaign.CargoAPI;
7import com.fs.starfarer.api.campaign.OptionPanelAPI;
8import com.fs.starfarer.api.campaign.PersonImportance;
9import com.fs.starfarer.api.campaign.RepLevel;
10import com.fs.starfarer.api.campaign.TextPanelAPI;
11import com.fs.starfarer.api.campaign.econ.MarketAPI;
12import com.fs.starfarer.api.characters.PersonAPI;
13import com.fs.starfarer.api.impl.campaign.ids.Factions;
14import com.fs.starfarer.api.impl.campaign.ids.Ranks;
15import com.fs.starfarer.api.impl.campaign.ids.Sounds;
16import com.fs.starfarer.api.impl.campaign.ids.Tags;
17import com.fs.starfarer.api.impl.campaign.rulecmd.AddRemoveCommodity;
18import com.fs.starfarer.api.impl.campaign.rulecmd.SetStoryOption;
19import com.fs.starfarer.api.impl.campaign.rulecmd.SetStoryOption.BaseOptionStoryPointActionDelegate;
20import com.fs.starfarer.api.impl.campaign.rulecmd.SetStoryOption.StoryOptionParams;
21import com.fs.starfarer.api.ui.TooltipMakerAPI;
22import com.fs.starfarer.api.util.Misc;
33 if (!super.shouldShowAtMarket(
market))
return false;
35 if (!
market.getFactionId().equals(Factions.TRITACHYON)) {
39 if (
market.getStabilityValue() < 4)
return false;
41 if (
Global.
getSector().getFaction(Factions.TRITACHYON).getRelToPlayer().isAtBest(RepLevel.HOSTILE)) {
55 if (this.market ==
market)
return;
81 String
id =
"negotiate_id";
82 options.addOption(
"Negotiate a lower rate on the loan",
id);
84 StoryOptionParams params =
new StoryOptionParams(
id, 1,
"negotiateLoanRate", Sounds.STORY_POINT_SPEND_TECHNOLOGY,
85 "Negotiated lower rate on " + Misc.getDGSCredits(
loanAmount) +
" loan from Tri-Tachyon investor");
87 SetStoryOption.set(
dialog, params,
88 new BaseOptionStoryPointActionDelegate(
dialog, params) {
91 public void confirm() {
103 public String getTitle() {
109 public void createDescription(TooltipMakerAPI info) {
111 info.setParaInsigniaLarge();
113 info.addSpacer(-opad * 1f);
115 info.addPara(
"The loan amount is %s.",
116 0f, Misc.getHighlightColor(),
119 info.addPara(
"You're able to negotiate the repayment amount from %s down to " +
120 "%s.", opad, Misc.getHighlightColor(),
124 info.addSpacer(opad * 2f);
125 addActionCostSection(info);
133 super.optionSelected(optionText, optionData);
143 return Factions.TRITACHYON;
148 return Ranks.CITIZEN;
159 super.adjustPerson(
person);
160 person.setImportanceAndVoice(PersonImportance.MEDIUM,
random);
161 person.addTag(Tags.CONTACT_TRADE);
166 return Ranks.POST_EXECUTIVE;
176 return "A Tri-Tachyon careerist sits at a spotless table, sipping something expensive-looking.";
181 return "Introduce yourself to the Tri-Tachyon " +
getManOrWoman() +
" and try to land some investment credits";
186 return "A young Tri-Tachyon factioneer in a perfect suit sips from some insubstantial drink " +
187 "as sophisticated as it is expensive. After introductions " +
getHeOrShe() +
188 " quickly cuts to the point, and says \"I'm simply in the business of statistics, and " +
189 "I like your growth potential. I think that you can take my %s now and pay " +
190 "%s back to me in, oh, %s days. If not, \"" +
getHeOrShe() +
191 " mimics a stricken look, \"I'll ruin your reputation across Tri-Tachyon space. What do you say?\"";
201 return new Color [] { Misc.getHighlightColor(), Misc.getHighlightColor(), Misc.getHighlightColor() };
206 return "Accept the deal and order another round to celebrate";
211 return "Decline the deal, explaining that you're \"just here to network\"";
215 return "The Tri-Tachyon " +
getManOrWoman() +
"'s smile freezes in place as you launch into a sophisticated " +
216 " pitch to modify the proposed terms. You notice " +
getHisOrHer() +
217 " eyes tracking rapidly, navigating some ocular data interface as you speak; " +
getHeOrShe() +
218 " seems thrown off-balance by your savvy, and never quite recovers that signature megacorp implacability." +
219 " By the time it is agreed that a substantially lower repayment figure will benefit all parties, the dazed " +
220 "investor finds " +
getHisOrHer() +
" drink has gone flat. " +
getHeOrShe() +
" brusquely orders a replacement.";
225 return "You leave the lounge rich in credits, having exchanged secure comm keys with the " +
226 "Tri-Tachyon shark and receiving the transfer immediately. Your head spins with plans " +
227 "for how to leverage your new assets - and a bit from the drink, you admit to yourself.";
static SectorAPI getSector()
transient TextPanelAPI text
transient OptionPanelAPI options
transient InteractionDialogAPI dialog
static final String OPTION_CONFIRM
void setLoanAmount(int loanAmount)
String getPersonFaction()
Color[] getMainTextColors()
void setRepaymentAmount(int repaymentAmount)
boolean shouldShowAtMarket(MarketAPI market)
void optionSelected(String optionText, Object optionData)
void doStandardConfirmActions()
void setRepaymentDays(int repaymentDays)
int getNegotiatedAmount()
static int REPAYMENT_DAYS
void adjustPerson(PersonAPI person)
String getNegotiatedText()
String[] getMainTextTokens()
void regen(MarketAPI market)