Starsector API
Loading...
Searching...
No Matches
DiktatLobsterBarEvent.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.campaign.econ.MarketAPI;
6import com.fs.starfarer.api.characters.PersonAPI;
7import com.fs.starfarer.api.impl.campaign.ids.Commodities;
8import com.fs.starfarer.api.impl.campaign.ids.Factions;
9import com.fs.starfarer.api.impl.campaign.ids.Ranks;
10import com.fs.starfarer.api.impl.campaign.ids.Tags;
11import com.fs.starfarer.api.impl.campaign.intel.contacts.ContactIntel;
12import com.fs.starfarer.api.util.Misc;
13
15
17 super();
18 }
19
20 public boolean shouldShowAtMarket(MarketAPI market) {
21 if (!super.shouldShowAtMarket(market)) return false;
23
24 if (!market.getFactionId().equals(Factions.DIKTAT)) {
25 return false;
26 }
27
28 return true;
29 }
30
31 @Override
32 protected void doExtraConfirmActions() {
33 ContactIntel.addPotentialContact(person, market, text);
34 }
35
36 @Override
37 protected void adjustPerson(PersonAPI person) {
38 super.adjustPerson(person);
39 person.setImportanceAndVoice(pickMediumImportance(), random);
40 person.addTag(Tags.CONTACT_MILITARY);
41 }
42
43 @Override
44 protected String getPersonPost() {
45 return Ranks.POST_AGENT;
46 }
47
48 @Override
49 protected String getCommodityId() {
50 return Commodities.LOBSTER;
51 }
52
53 @Override
54 protected String getPersonFaction() {
55 return Factions.DIKTAT;
56 }
57
58 @Override
59 protected String getPersonRank() {
60 return Ranks.GROUND_CAPTAIN;
61 }
62
63 @Override
64 protected int computeQuantity() {
65 int quantity = 50 + 50 * random.nextInt(4);
66 return quantity;
67 }
68
69 @Override
70 protected float getPriceMult() {
71 return 0.75f;
72 }
73
74 @Override
75 protected String getPrompt() {
76 return "A grinning security officer is gesturing excitedly to a nearby patron.";
77 }
78
79 @Override
80 protected String getOptionText() {
81 return "Sidle up to the security officer and see what they're so pleased about";
82 }
83
84 @Override
85 protected String getMainText() {
86 String heOrShe = getHeOrShe();
87 String himOrHer = getHimOrHer();
88 String hisOrHer = getHisOrHer();
89
90 return "\"Why, just today an amazing opportunity fell into my lap. " +
91 "And yours as well, how wonderful!\" " + heOrShe + " sweeps " + hisOrHer + " arm regally " +
92 "to encompass the scale of your shared luck, somehow managing not to spill the drinks of " +
93 "several patrons.\n\n"
94 + "You are told the story of tiresome property seizures from " +
95 "'disloyal elements'.\n\n"
96 + " \"It's not so much trouble to, you know. Play along? " +
97 "But they insist on carrying on, and on... not that I mind the perks of the job, of course.\"";
98 }
99
100 @Override
101 protected String getMainText2() {
102 String heOrShe = getHeOrShe();
103 String himOrHer = getHimOrHer();
104 String hisOrHer = getHisOrHer();
105
106 return
107 "What this amounts to, you are told, is that the District 4 Gendarmerie's evidence " +
108 "locker - and maintenance bay, and several interrogation rooms - are filled with cases " +
109 "of cyro-stabilized Volturnian Lobster, nearly %s units in all. The officers eat like " +
110 "royalty, yes, but there's only so much one can take and the coolant cells won't last " +
111 "another week without replacement, so.\n\n"
112 + Misc.ucFirst(heOrShe) + " turns to " +
113 "you. %s will satisfy the district commandant as well as your new friend here, " +
114 "and the entire cargo can be transferred to your holds without the bother of tariffs.\n\n" +
115
116 "\"What do you say, will you help maintain a little law and order?\"";
117 }
118
119 @Override
120 protected String [] getMainText2Tokens() {
121 return new String [] { Misc.getWithDGS(quantity), Misc.getDGSCredits(unitPrice * quantity) };
122 }
123 @Override
124 protected Color [] getMainText2Colors() {
125 return new Color [] { Misc.getHighlightColor(), Misc.getHighlightColor() };
126 }
127
128 @Override
129 protected String getConfirmText() {
130 return "Accept the offer and transfer " + Misc.getDGSCredits(unitPrice * quantity) + " to the provided TriAnon account";
131 }
132
133 @Override
134 protected String getCancelText() {
135 return "Decline the offer apologetically, citing a terrible shellfish allergy";
136 }
137
138 @Override
139 protected String getAcceptText() {
140 return null;
141 }
142
143 @Override
144 protected String [] getAcceptTextTokens() {
145 return new String [] {};
146 }
147 @Override
148 protected Color [] getAcceptTextColors() {
149 return new Color [] {};
150 }
151
152}
153
154
155