32 Set<CampaignFleetAPI> seen =
new LinkedHashSet<CampaignFleetAPI>();
33 for (
final StarSystemAPI system : Misc.getSystemsWithPlayerColonies(
false)) {
35 if (nexus ==
null)
continue;
37 if (nexus ==
null || seen.contains(nexus))
continue;
40 int numColonies = Misc.getMarketsInLocation(system, Factions.PLAYER).size();
41 final String colonies = numColonies != 1 ?
"colonies" :
"colony";
42 final String isOrAre = numColonies != 1 ?
"are" :
"is";
44 String desc =
"Remnant Nexus in the " + system.getNameWithLowercaseTypeShort();
47 String progressStr =
"+" + progress;
48 if (progress < 0) progressStr =
"" + progress;
52 info.addRowWithGlow(Alignment.LMID, descColor,
" " + desc,
53 Alignment.RMID, progressColor, progressStr);
57 public void createTooltip(TooltipMakerAPI tooltip,
boolean expanded, Object tooltipParam) {
60 MapParams params =
new MapParams();
61 params.showSystem(system);
63 float w = tooltip.getWidthSoFar();
64 float h = Math.round(w / 1.6f);
65 params.positionToShowAllMarkersAndSystems(
true, Math.min(w, h));
68 UIPanelAPI map = tooltip.createSectorMap(w, h, params, system.getNameWithLowercaseType());
70 tooltip.addPara(
"Your " + colonies +
" in the " + system.getNameWithLowercaseTypeShort() +
71 " " + isOrAre +
" threatened by a Remnant Nexus located in the system. " +
72 "This results in a greater risk of trade fleets being attacked, and eventual "
73 +
"existential danger for your " + colonies +
".", 0f, Misc.getNegativeHighlightColor(),
74 "existential danger for your " + colonies);
76 tooltip.addPara(
"Even when relatively dormant, " +
77 "the Remnant fleets are a constant thorn in your side, wasting defensive resources and "
78 +
"exposing your " + colonies +
79 " to other dangers.", opad);
81 tooltip.addPara(
"%s should address all these concerns.", opad,
82 Misc.getHighlightColor(),
"Destroying the Nexus");
84 tooltip.addCustom(map, opad);
87 info.addTooltipToAddedRow(t, TooltipLocation.RIGHT,
false);