Starsector API
Loading...
Searching...
No Matches
TriTachMajorLoanBarEvent.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.intel.bar.events;
2
3import java.awt.Color;
4
5import com.fs.starfarer.api.Global;
6import com.fs.starfarer.api.campaign.PersonImportance;
7import com.fs.starfarer.api.campaign.econ.MarketAPI;
8import com.fs.starfarer.api.characters.PersonAPI;
9import com.fs.starfarer.api.impl.campaign.ids.Ranks;
10import com.fs.starfarer.api.impl.campaign.ids.Tags;
11import com.fs.starfarer.api.util.Misc;
12
14
15 public static int REPAYMENT_DAYS_MAJOR = 500;
16
18 super();
19 }
20
21 @Override
22 protected void regen(MarketAPI market) {
23 if (this.market == market) return;
24
25 super.regen(market);
26
27
28 loanAmount = 1000000 + random.nextInt(6) * 100000;
29 repaymentAmount = (int) (loanAmount * 1.5f);
31 }
32
33// do this after load is repaid
34// @Override
35// protected void doExtraConfirmActions() {
36// ContactIntel.addPotentialContact(person, market, text);
37// }
38
39 @Override
40 protected void adjustPerson(PersonAPI person) {
41 person.setImportanceAndVoice(PersonImportance.VERY_HIGH, random);
42 person.addTag(Tags.CONTACT_TRADE);
43 person.addTag(Tags.CONTACT_MILITARY);
44 }
45
46 @Override
47 protected String getPersonPost() {
48 return Ranks.POST_SENIOR_EXECUTIVE;
49 }
50
51
52 @Override
53 protected void createIntel() {
54 TriTachLoanIntel intel = new TriTachLoanIntel(this, market);
55 intel.setMajorLoan(true);
56 Global.getSector().getIntelManager().addIntel(intel, false, dialog.getTextPanel());
57 }
58
59 @Override
60 protected String getPrompt() {
61 return "A Tri-Tachyon executive sits in a private booth, scrolling through " + getHisOrHer() + " TriPad. An untouched drink sits on the immaculate table.";
62 }
63
64 @Override
65 protected String getOptionText() {
66 return "Throw some credits around like a big spender, to see if you can attract the executive's attention";
67 }
68
69 @Override
70 protected String getMainText() {
71 return "An impeccable Tri-Tachyon factioneer of completely indeterminate age has you invited to " +
72 getHisOrHer() + " booth. " + Misc.ucFirst(getHeOrShe()) + " appraises you coolly as " +
73 getHeOrShe() + " fills a glass from a bottle that looks to cost more than many starships.";
74
75 }
76
77 @Override
78 protected String getMainText2() {
79 return
80 "\"The vintage predates the Collapse, you know,\" " + getHeOrShe() + " says. " +
81 "\"I enjoy the idea of owning a small part of history.\" " + Misc.ucFirst(getHeOrShe()) +
82 " smiles, \"So let's talk about you.\" As " + getHeOrShe() + " lists detailed specifications " +
83 "and statistical trends regarding your career in the Persean Sector you make a mental " +
84 "note to have a discussion with your senior officers on the subject of " +
85 "information security. \"So,\" " + getHeOrShe() + " concludes, \"I'd like to see " +
86 "what you could accomplish with a short-term capital infusion of let us say %s. " +
87 "To incentivize the ruthless enterprise I so admire, let us say you would repay %s " +
88 "within %s days.\n\n" +
89
90 "You take this in as you sip your drink. " +
91 "It's a lot of money. You also consider that this Tri-Tach suit paid too much for the bottle.";
92
93 }
94
95 @Override
96 protected String [] getMainText2Tokens() {
97 return new String [] { Misc.getDGSCredits(loanAmount), Misc.getDGSCredits(repaymentAmount),
98 "" + (int)repaymentDays };
99 }
100 @Override
101 protected Color [] getMainText2Colors() {
102 return new Color [] { Misc.getHighlightColor(), Misc.getHighlightColor(), Misc.getHighlightColor() };
103 }
104
105 @Override
106 protected String getConfirmText() {
107 return "Accept the deal and toast your joint venture";
108 }
109
110 @Override
111 protected String getCancelText() {
112 return "Decline the deal, explaining that you're \"just here to network\"";
113 }
114
115 @Override
116 protected String getNegotiatedText() {
117 return "As the negotiations conclude, the Tri-Tachyon " + getManOrWoman() + " leans back, rolling the stem of " +
118 getHisOrHer() + " glass between " + getHisOrHer() + " fingertips. " +
119 "\"You didn't accept my initial offer\", " + getHeOrShe() + " says. \"I find that reassuring.\"";
120 }
121
122 @Override
123 protected String getAcceptText() {
124 return "You leave the lounge rich in credits, having exchanged secure comm keys with the " +
125 "Tri-Tachyon shark and receiving the transfer immediately. Your head spins with plans " +
126 "for how to leverage your new assets - and a bit from the drink, you admit to yourself.";
127 }
128
129}
130
131
132
static SectorAPI getSector()
Definition Global.java:59