32 public void createTooltip(TooltipMakerAPI tooltip,
boolean expanded, Object tooltipParam) {
33 Color h = Misc.getHighlightColor();
37 tooltip.addPara(
"The presence of military infrastructure slows down event progress, but does not actually stop or reverse it. "
38 +
"The highest level military structure present on any of your colonies determines the multiplier.", 0f);
42 tooltip.beginTable(Misc.getBasePlayerColor(), Misc.getDarkPlayerColor(), Misc.getBrightPlayerColor(),
43 20f,
"Infrastructure", 200f,
"Multiplier", 100f);
45 Color c = Misc.getGrayColor();
46 Color c2 = Misc.getGrayColor();
47 if (data.industry !=
null && data.industry.getId().equals(Industries.PATROLHQ)) {
48 c = Misc.getHighlightColor();
49 c2 = Misc.getPositiveHighlightColor();
51 tooltip.addRow(c,
"Patrol HQ", c2, Strings.X + Misc.getRoundedValueMaxOneAfterDecimal(
PATROL_HQ_MULT));
53 c = Misc.getGrayColor();
54 c2 = Misc.getGrayColor();
55 if (data.industry !=
null && data.industry.getId().equals(Industries.MILITARYBASE)) {
56 c = Misc.getHighlightColor();
57 c2 = Misc.getPositiveHighlightColor();
59 tooltip.addRow(c,
"Military Base", c2, Strings.X + Misc.getRoundedValueMaxOneAfterDecimal(
MILITARY_BASE_MULT));
61 c = Misc.getGrayColor();
62 c2 = Misc.getGrayColor();
63 if (data.industry !=
null && data.industry.getId().equals(Industries.HIGHCOMMAND)) {
64 c = Misc.getHighlightColor();
65 c2 = Misc.getPositiveHighlightColor();
67 tooltip.addRow(c,
"High Command", c2, Strings.X + Misc.getRoundedValueMaxOneAfterDecimal(
HIGH_COMMAND_MULT));
69 tooltip.addTable(
"None", 0, opad);
70 tooltip.addSpacer(5f);
72 if (data.industry !=
null && data.market !=
null) {
73 tooltip.addPara(
"You have a %s at %s.", opad, h,
74 data.industry.getCurrentName(), data.market.getName());
131 HAColonyDefenseData best =
new HAColonyDefenseData();
133 List<MarketAPI> markets = Misc.getPlayerMarkets(
false);
134 for (MarketAPI market : markets) {
136 Industry industry =
null;
137 if (market.hasFunctionalIndustry(Industries.PATROLHQ)) {
139 industry = market.getIndustry(Industries.PATROLHQ);
141 if (Misc.isMilitary(market)) {
142 if (market.hasFunctionalIndustry(Industries.HIGHCOMMAND)) {
144 industry = market.getIndustry(Industries.HIGHCOMMAND);
147 industry = market.getIndustry(Industries.MILITARYBASE);
151 if (industry !=
null && mult < best.mult) {
152 best.market = market;
153 best.industry = industry;