116 if (optionData ==
null)
return;
118 if (optionData == DumpMemory.OPTION_ID) {
119 Map<String, MemoryAPI> memoryMap =
new HashMap<String, MemoryAPI>();
120 MemoryAPI memory = dialog.getInteractionTarget().getMemory();
122 memoryMap.put(MemKeys.LOCAL, memory);
123 if (dialog.getInteractionTarget().getFaction() !=
null) {
124 memoryMap.put(MemKeys.FACTION, dialog.getInteractionTarget().getFaction().getMemory());
129 memoryMap.put(MemKeys.PLAYER,
Global.
getSector().getCharacterData().getMemory());
131 if (dialog.getInteractionTarget().getMarket() !=
null) {
132 memoryMap.put(MemKeys.MARKET, dialog.getInteractionTarget().getMarket().getMemory());
135 new DumpMemory().execute(
null, dialog,
null, memoryMap);
143 OptionId option = (OptionId) optionData;
147 dialog.addOptionSelectedText(option);
150 String type =
"star";
151 String corona =
"star's corona";
152 String corona2 =
"in the star's corona";
153 if (planet.getSpec().isBlackHole()) {
155 corona =
"event horizon";
156 corona2 =
"near the event horizon";
162 boolean didAlready = planet.getMemoryWithoutUpdate().getBoolean(
ADDED_KEY);
163 addText(getString(
"approach"));
165 if (planet.getMemoryWithoutUpdate().getBoolean(
"$abyssalBlackHoleReadings")) {
166 planet.getMemoryWithoutUpdate().unset(
"$abyssalBlackHoleReadings");
167 planet.getMemoryWithoutUpdate().set(
"$abyssalBlackHoleReadingsRevisit",
true);
169 addText(
"Your sensors officer hesitates, then calls for your attention. \"Captain, there's a... pattern. "
170 +
"From the black hole. Or, rather,\" they pause, looking almost embarrassed. \"-The energy radiated"
171 +
" by the accretion disc."
173 +
"They pull a collated sensor output map into the primary holo. \"It's almost a signal. See, if we "
174 +
"chart these fluctuations in energy output over time..."
176 +
"You see it now, an orderly series. Not quite a sequence of prime numbers, "
177 +
"unless you jig the math. Statistically this is nearly impossible. Possible explanations "
178 +
"are as unlikely: a series of planets - large moons? - with specific mass-ratio relationships, "
179 +
"all pulled into the accretion disc at just such an angle, like an intentional "
180 +
"message... or orderly annihilation of a constructed planetary system at a scale beyond the wildest "
181 +
"dreams of the most bloody-minded war-planners of the Domain."
183 +
"It can't be known. The pattern disappears as quickly as it arose.");
185 int points = HTPoints.ABYSSAL_BLACK_HOLE_UNUSUAL_READINGS;
187 HyperspaceTopographyEventIntel.addFactorCreateIfNecessary(
188 new HTNonASBScanFactor(
"Picked up unusual readings from abyssal black hole", points), dialog);
190 }
else if (planet.getMemoryWithoutUpdate().getBoolean(
"$abyssalBlackHoleReadingsRevisit")) {
191 addText(
"Your sensors officer detects no more unusual energy patterns from the inner rim of the accretion disc, just noise,"
192 +
" as mindless as the background radiation of the cosmos itself.");
196 addText(
"The " + corona +
" exhibits fluctuations indicative of recent antimatter application.");
203 if (desc !=
null && desc.hasText3()) {
204 addText(desc.getText3());
208 case DUMP_PLANETKILLER:
209 addText(
"Your officers respond promptly to the order, and move to the task with all alacrity. There is an edge to their call-and-response,"
210 +
" however, as if they cannot help but acknowledge the deep sense of the gravity in this act.\n"
211 +
"\"Package ready to drop, captain,\" your ops chief says. \"On your order.\"");
212 options.clearOptions();
213 options.addOption(
"\"Destroy it!\"", OptionId.DUMP_PLANETKILLER_CONT_1,
null);
214 options.addOption(
"\"No... I will keep it.\"", OptionId.DUMP_PLANETKILLER_ON_SECOND_THOUGHT,
null);
216 case DUMP_PLANETKILLER_ON_SECOND_THOUGHT:
219 case DUMP_PLANETKILLER_CONT_1:
220 addText(
"At your command the planetkiller, locked in its cradle, is boosted toward the very center of the black hole, up and over the plane of the accretion disc.\n\n"
221 +
"With a flash only a little more than noise in the sensor telemetry, it is gone.");
222 AddRemoveCommodity.addItemLossText(
new SpecialItemData(Items.PLANETKILLER,
null), 1, dialog.getTextPanel());
223 Global.
getSector().getPlayerStats().addStoryPoints(1, dialog.getTextPanel(),
false);
225 options.clearOptions();
226 options.addOption(
"Leave", OptionId.LEAVE,
null);
227 options.setShortcut(OptionId.LEAVE, Keyboard.KEY_ESCAPE,
false,
false,
false,
true);
238 case ADD_STABLE_CONFIRM:
239 StarSystemAPI system = planet.getStarSystem();
240 if (system !=
null) {
244 AddRemoveCommodity.addCommodityLossText(Commodities.FUEL,
STABLE_FUEL_REQ, dialog.getTextPanel());
245 StarSystemGenerator.addStableLocations(system, 1);
246 planet.getMemoryWithoutUpdate().set(
ADDED_KEY,
true);
247 addText(
"Preparations are made, and you give the go-ahead. " +
248 "A few tense minutes later, the chief engineer reports success. " +
249 "The resulting stable location won't last for millennia, like " +
250 "naturally-occurring ones - but it'll do for your purposes.");
254 case ADD_STABLE_DESCRIBE:
255 addText(
"The procedure requires spreading prodigious amounts of antimatter " + corona2 +
", " +
256 "according to calculations far beyond the ability of anything on the right side of the " +
257 "treaty that ended the Second AI War.");
258 boolean canAfford = dialog.getTextPanel().addCostPanel(
"Resources required (available)",
259 Commodities.ALPHA_CORE, 1,
false,
264 options.clearOptions();
266 int num = Misc.getNumStableLocations(planet.getStarSystem());
267 boolean alreadyCant =
false;
269 options.addOption(
"Proceed with the operation", OptionId.ADD_STABLE_CONFIRM,
null);
270 }
else if (num < 2) {
271 addText(
"Normally, this procedure can only be performed in a star system without any " +
272 "stable locations. However, your chief engineer suggests an unorthodox workaround.");
273 options.addOption(
"Proceed with the operation", OptionId.ADD_STABLE_CONFIRM,
null);
275 OptionId.ADD_STABLE_CONFIRM,
"createStableLocation", Sounds.STORY_POINT_SPEND_TECHNOLOGY,
276 "Created additional stable location in " + planet.getStarSystem().getNameWithLowercaseType() +
"");
280 String reason =
"This procedure can not performed in a star system that already has " +
281 "numerous stable locations.";
282 options.addOption(
"Proceed with the operation", OptionId.ADD_STABLE_CONFIRM,
null);
283 options.setEnabled(OptionId.ADD_STABLE_CONFIRM,
false);
285 options.setTooltip(OptionId.ADD_STABLE_CONFIRM, reason);
288 if (!canAfford && !alreadyCant) {
289 String reason =
"You do not have the necessary resources to carry out this procedure.";
290 options.setEnabled(OptionId.ADD_STABLE_CONFIRM,
false);
292 options.setTooltip(OptionId.ADD_STABLE_CONFIRM, reason);
296 options.addOption(
"Never mind", OptionId.ADD_STABLE_NEVER_MIND,
null);
299 case ADD_STABLE_NEVER_MIND: