27 public void createTooltip(TooltipMakerAPI tooltip,
boolean expanded, Object tooltipParam) {
29 tooltip.addPara(
"Any colony, especially one outside the core, attracts some degree of piracy."
30 +
" %s and %s colonies attract more pirates.", 0f,
31 Misc.getHighlightColor(),
"Larger",
"less stable");
32 tooltip.addPara(
"Event progress value is based on the size and stability of the largest colony "
33 +
"under your control. If multiple colonies have the same size, the one with higher "
34 +
"stability is used.", opad);
37 if (biggest !=
null && biggest.getStarSystem() !=
null) {
38 tooltip.addPara(
"Biggest colony: %s, size: %s, stability: %s", opad, Misc.getHighlightColor(),
40 "" + biggest.getSize(),
41 "" + (
int) biggest.getStabilityValue());
43 MapParams params =
new MapParams();
44 params.showSystem(biggest.getStarSystem());
45 float w = tooltip.getWidthSoFar();
46 float h = Math.round(w / 1.6f);
47 params.positionToShowAllMarkersAndSystems(
true, Math.min(w, h));
48 UIPanelAPI map = tooltip.createSectorMap(w, h, params, biggest.getStarSystem().getNameWithLowercaseTypeShort());
49 tooltip.addCustom(map, opad);
113 if (KantaCMD.playerHasProtection())
return 0f;
117 List<MarketAPI> markets = Misc.getMarketsInLocation(system, Factions.PLAYER);
120 for (MarketAPI market : markets) {
123 max = Math.max(val, max);
128 max = Math.round(max * 100f) / 100f;