1package com.fs.starfarer.api.impl.campaign.intel.events;
6import com.fs.starfarer.api.Global;
7import com.fs.starfarer.api.campaign.StarSystemAPI;
8import com.fs.starfarer.api.campaign.econ.Industry;
9import com.fs.starfarer.api.campaign.econ.MarketAPI;
10import com.fs.starfarer.api.impl.campaign.ids.Commodities;
11import com.fs.starfarer.api.impl.campaign.ids.Factions;
12import com.fs.starfarer.api.impl.campaign.intel.PerseanLeagueMembership;
13import com.fs.starfarer.api.ui.LabelAPI;
14import com.fs.starfarer.api.ui.TooltipMakerAPI;
15import com.fs.starfarer.api.ui.TooltipMakerAPI.TooltipCreator;
16import com.fs.starfarer.api.util.Misc;
30 public void createTooltip(TooltipMakerAPI tooltip,
boolean expanded, Object tooltipParam) {
32 tooltip.addPara(
"The Hegemony considers the use of %s illegal, though it is unlikely "
33 +
"to take much notice of what goes on at colonies of size %s or smaller.", 0f,
37 Color c =
Global.
getSector().getFaction(Factions.PERSEAN).getBaseUIColor();
38 LabelAPI label = tooltip.addPara(
"However, your membership in the Persean League makes it politically "
39 +
"difficult for the Hegemony to pursue the matter.", opad);
40 label.setHighlight(
"Persean League",
"politically difficult");
41 label.setHighlightColors(c, Misc.getPositiveHighlightColor());
55 return super.getProgressStr();
61 return super.getProgressColor(
intel);
90 int reduced = Math.round(adjusted);
91 if (progress > 0 && reduced < 1) reduced = 1;
102 return "AI core use";
107 for (StarSystemAPI system : Misc.getPlayerSystems(
false)) {
115 List<MarketAPI> markets = Misc.getMarketsInLocation(system, Factions.PLAYER);
116 for (MarketAPI market : markets) {
132 String aiCoreId = market.getAdmin().getAICoreId();
133 if (aiCoreId !=
null) {
137 for (Industry ind : market.getIndustries()) {
138 String core = ind.getAICoreId();
139 if (Commodities.ALPHA_CORE.equals(core)) {
141 }
else if (Commodities.BETA_CORE.equals(core)) {
143 }
else if (Commodities.GAMMA_CORE.equals(core)) {
157 List<MarketAPI> markets = Misc.getMarketsInLocation(system, Factions.PLAYER);
162 for (MarketAPI market : markets) {
167 total = Math.round(total * 100f) / 100f;
static SettingsAPI getSettings()
static SectorAPI getSector()
static boolean isLeagueMember()
HostileActivityEventIntel intel
float getTotalAICorePoints()
static int IGNORE_COLONY_THRESHOLD
static float getAICorePoints(StarSystemAPI system)
Color getProgressColor(BaseEventIntel intel)
float getMagnitudeContribution(StarSystemAPI system)
TooltipCreator getTooltip()
HegemonyAICoresActivityCause(HostileActivityEventIntel intel)
int getProgress(boolean checkNegated)
boolean isNegatedByPLMembership()
static float getAICorePoints(MarketAPI market)
static boolean isPlayerDefeatedHegemony()
float getFloat(String key)
static String NEGATED_FACTOR_PROGRESS