1package com.fs.starfarer.api.impl.campaign.intel.events;
4import java.util.LinkedHashSet;
7import com.fs.starfarer.api.Global;
8import com.fs.starfarer.api.campaign.CampaignFleetAPI;
9import com.fs.starfarer.api.campaign.StarSystemAPI;
10import com.fs.starfarer.api.impl.campaign.ids.Factions;
11import com.fs.starfarer.api.ui.Alignment;
12import com.fs.starfarer.api.ui.MapParams;
13import com.fs.starfarer.api.ui.TooltipMakerAPI;
14import com.fs.starfarer.api.ui.TooltipMakerAPI.TooltipCreator;
15import com.fs.starfarer.api.ui.TooltipMakerAPI.TooltipLocation;
16import com.fs.starfarer.api.ui.UIPanelAPI;
17import com.fs.starfarer.api.util.Misc;
32 Set<CampaignFleetAPI> seen =
new LinkedHashSet<CampaignFleetAPI>();
35 if (nexus ==
null)
continue;
37 if (nexus ==
null || seen.contains(nexus))
continue;
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;
57 public void createTooltip(
TooltipMakerAPI tooltip,
boolean expanded, Object tooltipParam) {
64 float h = Math.round(w / 1.6f);
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 "
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,
100 if (nexus ==
null)
continue;
108 if (nexus ==
null)
return 0;
127 if (nexus ==
null)
return 0f;
static SettingsAPI getSettings()
static final String PLAYER
Color getProgressColor(BaseEventIntel intel)
HostileActivityEventIntel intel
Color getDescColor(BaseEventIntel intel)
static CampaignFleetAPI getRemnantNexus(StarSystemAPI system)
static int PROGRESS_NEXUS_DAMAGED
int getProgressForNexus(CampaignFleetAPI nexus)
RemnantNexusActivityCause(HostileActivityEventIntel intel)
static int PROGRESS_NEXUS_NORMAL
void addExtraRows(TooltipMakerAPI info, BaseEventIntel intel)
float getMagnitudeContribution(StarSystemAPI system)
void showSystem(StarSystemAPI system)
void positionToShowAllMarkersAndSystems(boolean showPlayerFleet, float heightOnScreen)
static List< StarSystemAPI > getSystemsWithPlayerColonies(boolean includeNonPlayerFaction)
static List< MarketAPI > getMarketsInLocation(LocationAPI location, String factionId)
static Color getNegativeHighlightColor()
static Color getHighlightColor()
MemoryAPI getMemoryWithoutUpdate()
boolean getBoolean(String key)