1package com.fs.starfarer.api.impl.campaign.intel.group;
4import java.util.ArrayList;
6import java.util.Random;
9import org.lwjgl.util.vector.Vector2f;
11import com.fs.starfarer.api.Global;
12import com.fs.starfarer.api.campaign.CampaignFleetAPI;
13import com.fs.starfarer.api.campaign.FactionAPI;
14import com.fs.starfarer.api.campaign.LocationAPI;
15import com.fs.starfarer.api.campaign.SectorEntityToken;
16import com.fs.starfarer.api.campaign.StarSystemAPI;
17import com.fs.starfarer.api.campaign.econ.Industry;
18import com.fs.starfarer.api.campaign.econ.MarketAPI;
19import com.fs.starfarer.api.campaign.rules.MemoryAPI;
20import com.fs.starfarer.api.impl.campaign.command.WarSimScript;
21import com.fs.starfarer.api.impl.campaign.fleets.RouteLocationCalculator;
22import com.fs.starfarer.api.impl.campaign.fleets.RouteManager;
23import com.fs.starfarer.api.impl.campaign.fleets.RouteManager.OptionalFleetData;
24import com.fs.starfarer.api.impl.campaign.fleets.RouteManager.RouteData;
25import com.fs.starfarer.api.impl.campaign.fleets.RouteManager.RouteFleetSpawner;
26import com.fs.starfarer.api.impl.campaign.fleets.RouteManager.RouteSegment;
27import com.fs.starfarer.api.impl.campaign.ids.Conditions;
28import com.fs.starfarer.api.impl.campaign.ids.Factions;
29import com.fs.starfarer.api.impl.campaign.ids.Industries;
30import com.fs.starfarer.api.impl.campaign.ids.MemFlags;
31import com.fs.starfarer.api.impl.campaign.ids.Tags;
32import com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin;
33import com.fs.starfarer.api.impl.campaign.missions.FleetCreatorMission;
34import com.fs.starfarer.api.impl.campaign.procgen.themes.RouteFleetAssignmentAI.TravelState;
35import com.fs.starfarer.api.ui.LabelAPI;
36import com.fs.starfarer.api.ui.SectorMapAPI;
37import com.fs.starfarer.api.ui.TooltipMakerAPI;
38import com.fs.starfarer.api.util.CountingMap;
39import com.fs.starfarer.api.util.Misc;
57 public static interface FGIEventListener {
71 public static boolean DEBUG =
false;
74 protected Random
random =
new Random();
75 protected List<FGAction>
actions =
new ArrayList<FGAction>();
78 protected List<CampaignFleetAPI>
fleets =
new ArrayList<CampaignFleetAPI>();
82 protected List<CampaignFleetAPI>
spawning =
new ArrayList<CampaignFleetAPI>();
114 public float getETAUntil(String actionId,
boolean untilEndOfAction) {
117 if (action.getId() !=
null && action.getId().equals(actionId)) {
118 if (untilEndOfAction) {
119 eta += action.getEstimatedDaysToComplete();
123 eta += action.getEstimatedDaysToComplete();
140 MarketAPI market =
getSource().getMarket();
141 if (market ==
null || market.isPlanetConditionMarketOnly())
return false;
143 if (market.hasCondition(Conditions.DECIVILIZED)) {
147 Industry b = market.getIndustry(Industries.MILITARYBASE);
148 if (b ==
null) b = market.getIndustry(Industries.HIGHCOMMAND);
149 if (b ==
null || b.isDisrupted() || !b.isFunctional()) {
156 return route !=
null &&
route.getElapsed() <= 0f &&
route.getDelay() > 0;
165 route.setDelay(delay);
171 return route.getDelay();
184 super.advance(amount);
189 if (
route ==
null)
return;
219 RouteSegment curr =
route.getCurrent();
227 if (
route.isExpired()) {
276 return action !=
null && action.
getId() !=
null;
288 List<CampaignFleetAPI>
remove =
new ArrayList<CampaignFleetAPI>();
289 for (CampaignFleetAPI fleet :
fleets) {
290 if (!fleet.isAlive()) {
300 List<CampaignFleetAPI>
remove =
new ArrayList<CampaignFleetAPI>();
302 for (CampaignFleetAPI fleet :
fleets) {
303 float spawnFP = fleet.getMemoryWithoutUpdate().getFloat(
KEY_SPAWN_FP);
304 if (!fleet.isAlive()) {
310 totalFP += fleet.getFleetPoints();
324 List<CampaignFleetAPI>
remove =
new ArrayList<CampaignFleetAPI>();
325 CountingMap<LocationAPI> fleetLocs =
new CountingMap<LocationAPI>();
327 for (CampaignFleetAPI fleet :
fleets) {
328 fleetLocs.add(fleet.getContainingLocation());
331 LocationAPI withMostFleets =
null;
333 for (LocationAPI loc : fleetLocs.keySet()) {
334 int count = fleetLocs.getCount(loc);
335 if (count > maxCount) {
336 withMostFleets = loc;
341 if (withMostFleets ==
null)
return;
343 Vector2f com =
new Vector2f();
345 for (CampaignFleetAPI fleet :
fleets) {
346 if (fleet.getContainingLocation() != withMostFleets)
continue;
347 float w = fleet.getFleetPoints();
348 Vector2f loc =
new Vector2f(fleet.getLocation());
350 Vector2f.add(com, loc, com);
354 if (weight < 1f) weight = 1f;
355 com.scale(1f / weight);
358 boolean canBeStragglers = action !=
null &&
361 int maybeStragglers = 0;
362 for (CampaignFleetAPI fleet :
fleets) {
363 boolean potentialStraggler = fleet.getContainingLocation() != withMostFleets;
364 if (!potentialStraggler) {
365 potentialStraggler |= Misc.getDistance(fleet.getLocation(), com) > 4000;
367 if (fleet.getMemoryWithoutUpdate().getBoolean(
NEVER_STRAGGLER) || !canBeStragglers) {
368 potentialStraggler =
false;
371 MemoryAPI mem = fleet.getMemoryWithoutUpdate();
422 if (!
actions.get(0).isActionFinished()) {
423 actions.get(0).setActionFinished(
true);
429 RouteManager.getInstance().removeRoute(
route);
434 if (!wasEnding && isAbort) {
453 for (CampaignFleetAPI fleet :
fleets) {
459 fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_FLEET_DO_NOT_GET_SIDETRACKED,
true);
461 Misc.giveStandardReturnAssignments(fleet,
returnLocation,
null,
true);
463 Misc.giveStandardReturnToSourceAssignments(fleet,
true);
468 protected void createRoute(String factionId,
int approximateTotalDifficultyPoints,
470 OptionalFleetData extra =
new OptionalFleetData();
472 extra.factionId =
faction.getId();
473 route = RouteManager.getInstance().addRoute(
"FGI_" + getClass().getSimpleName(),
null,
474 Misc.genRandomSeed(), extra,
this, custom);
477 int before =
route.getSegments().size();
478 action.addRouteSegment(
route);
479 int after =
route.getSegments().size();
480 for (
int i = before; i < after; i++) {
481 route.getSegments().get(i).custom = action;
495 RouteManager.getInstance().removeRoute(
route);
500 if (
route ==
null ||
route.getCurrent() ==
null) {
505 RouteSegment curr =
route.getCurrent();
509 if (action == curr.custom) {
521 System.out.println(getClass().getSimpleName() +
": about to spawn fleets");
530 for (CampaignFleetAPI fleet :
spawning) {
534 fleet.getContainingLocation().removeEntity(fleet);
538 for (CampaignFleetAPI fleet :
fleets) {
539 int fp = fleet.getFleetPoints();
546 actions.get(0).notifyFleetsSpawnedMidSegment(curr);
553 if (fleet ==
null)
return;
559 float days = Misc.getDays(amount);
563 spawnDelay = 0.25f + (float) Math.random() * 0.25f;
565 CampaignFleetAPI fleet =
spawning.remove(0);
571 int fp = fleet.getFleetPoints();
604 for (RouteSegment seg :
getRoute().getSegments()) {
605 if (seg.custom == action)
return seg;
612 if (action !=
null) {
618 if (curr.getId() !=
null && curr.getId().equals(
id)) {
631 if (
actions.isEmpty())
return null;
652 if (segment.isInSystem()) {
653 return TravelState.IN_SYSTEM;
656 if (segment.hasLeaveSystemPhase() && segment.getLeaveProgress() < 1f) {
657 return TravelState.LEAVING_SYSTEM;
659 if (segment.hasEnterSystemPhase() && segment.getEnterProgress() > 0f) {
660 return TravelState.ENTERING_SYSTEM;
663 return TravelState.IN_HYPER_TRANSIT;
672 case ENTERING_SYSTEM: {
673 if (segment.to !=
null) {
674 return segment.to.getContainingLocation();
676 return segment.from.getContainingLocation();
679 case IN_SYSTEM:
return segment.from.getContainingLocation();
680 case LEAVING_SYSTEM:
return segment.from.getContainingLocation();
688 if (state == TravelState.LEAVING_SYSTEM) {
689 float p = current.getLeaveProgress();
690 SectorEntityToken jp = RouteLocationCalculator.findJumpPointToUse(fleet, current.from);
691 if (jp ==
null) jp = current.from;
692 RouteLocationCalculator.setLocation(fleet, p, current.from, jp);
694 else if (state == TravelState.ENTERING_SYSTEM) {
695 float p = current.getEnterProgress();
696 SectorEntityToken jp = RouteLocationCalculator.findJumpPointToUse(fleet, current.to);
697 if (jp ==
null) jp = current.to;
698 RouteLocationCalculator.setLocation(fleet, p, jp, current.to);
700 else if (state == TravelState.IN_SYSTEM) {
701 float p = current.getTransitProgress();
702 RouteLocationCalculator.setLocation(fleet, p,
703 current.from, current.to);
705 else if (state == TravelState.IN_HYPER_TRANSIT) {
706 float p = current.getTransitProgress();
708 current.from.getLocationInHyperspace().x,
709 current.from.getLocationInHyperspace().y);
711 current.to.getLocationInHyperspace().x,
712 current.to.getLocationInHyperspace().y);
713 RouteLocationCalculator.setLocation(fleet, p, t1, t2);
793 if (factionId !=
null) {
795 if (
faction.getCustomBoolean(
"pirateBehavior")) {
799 return points * mult;
809 String factionId =
null;
810 factionId = Factions.LUDDIC_CHURCH;
811 factionId = Factions.LUDDIC_PATH;
812 factionId = Factions.TRITACHYON;
813 factionId = Factions.DIKTAT;
814 factionId = Factions.REMNANTS;
815 factionId = Factions.PIRATES;
816 factionId = Factions.PERSEAN;
817 factionId = Factions.HEGEMONY;
818 factionId = Factions.INDEPENDENT;
820 System.out.println(
"---------------------------------");
821 System.out.println(
"FACTION: " + factionId);
823 System.out.println(
"Difficulty\tStd\tQuality\tQuantity");
824 for (
int j = 0; j < 1; j++) {
825 for (
int i = 1; i <= 10; i++) {
827 Vector2f loc =
new Vector2f();
829 float strStandard = 0;
830 float strQuality = 0;
831 float strQuantity = 0;
834 FleetCreatorMission m =
new FleetCreatorMission(
new Random());
836 m.createStandardFleet(i, factionId, loc);
837 CampaignFleetAPI fleet = m.createFleet();
839 strStandard = fleet.getEffectiveStrength();
844 FleetCreatorMission m =
new FleetCreatorMission(
new Random());
846 m.createQualityFleet(i, factionId, loc);
847 CampaignFleetAPI fleet = m.createFleet();
849 strQuality = fleet.getEffectiveStrength();
854 FleetCreatorMission m =
new FleetCreatorMission(
new Random());
856 m.createQuantityFleet(i, factionId, loc);
857 CampaignFleetAPI fleet = m.createFleet();
859 strQuantity = fleet.getEffectiveStrength();
864 System.out.println(
"" + i +
"\t\t" + (
int)strStandard +
"\t" + (
int)strQuality +
"\t" + (
int)strQuantity);
866 System.out.println(
"---------------------------------");
877 ListInfoMode mode,
float initPad);
879 ListInfoMode mode,
float initPad);
881 protected void addStatusSection(TooltipMakerAPI info,
float width,
float height,
float opad) {
893 Set<String> tags = super.getIntelTags(map);
894 tags.add(Tags.INTEL_MILITARY);
897 StarSystemAPI system = Misc.getStarSystemForAnchor(
getDestination());
898 if (system !=
null &&
899 !Misc.getMarketsInLocation(system, Factions.PLAYER).isEmpty()) {
900 tags.add(Tags.INTEL_COLONIES);
906 !Misc.getMarketsInLocation(
getDestination().getContainingLocation(), Factions.PLAYER).isEmpty()) {
907 tags.add(Tags.INTEL_COLONIES);
914 return "Fleet Group Movement";
918 return " - Successful";
928 return " - Defeated";
953 info.setParaFontDefault();
955 info.addPara(
getName(), c, 0f);
956 info.setParaFontDefault();
974 return super.getSortTier();
987 if (src ==
null || dest ==
null || src.getContainingLocation() == dest.getContainingLocation()) {
991 List<ArrowData> result =
new ArrayList<ArrowData>();
993 ArrowData arrow =
new ArrowData(src, dest);
1013 float initPad = pad;
1014 if (mode == ListInfoMode.IN_DESC) initPad = opad;
1021 boolean isUpdate = param !=
null;
1032 info.addPara(
"Faction: " +
faction.getDisplayName(), initPad, tc,
1037 LabelAPI label = info.addPara(
"Arrived at " + destName, tc, initPad);
1039 if (destHL !=
null) {
1041 label.setHighlightColor(destHL);
1042 label.highlightLast(hl);
1047 String hl = systemName;
1049 if (hl.endsWith(
" system")) {
1050 hl = hl.replaceAll(
" system",
"");
1052 if (hl.endsWith(
" nebula")) {
1053 hl = hl.replaceAll(
" nebula",
"");
1055 if (hl.endsWith(
" star system")) {
1056 hl = hl.replaceAll(
" star system",
"");
1062 public static enum ETAType {
1070 ETAType type, TooltipMakerAPI info, Color tc,
float initPad) {
1071 Color h = Misc.getHighlightColor();
1075 if (type == ETAType.DEPLOYMENT) {
1076 if ((
int) eta <= 0) {
1077 info.addPara(
"Fleet deployment imminent", tc, initPad);
1079 String days = (int)eta == 1 ?
"day" :
"days";
1080 info.addPara(
"Estimated %s " + days +
" until fleet deployment",
1081 initPad, tc, h,
"" + (
int) eta);
1086 if (type == ETAType.DEPARTURE) {
1087 if ((
int) eta <= 0) {
1088 info.addPara(
"Departure imminent", tc, initPad);
1090 String days = (int)eta == 1 ?
"day" :
"days";
1091 info.addPara(
"Estimated %s " + days +
" until departure",
1092 initPad, tc, h,
"" + (
int) eta);
1097 LabelAPI label =
null;
1098 if (withDepartedText && eta <= 0) {
1100 label = info.addPara(
"Operating in the " + destName, tc, initPad);
1102 if (destHL !=
null && label !=
null) {
1103 label.setHighlightColor(destHL);
1104 label.highlightLast(hl);
1107 if (withDepartedText) {
1108 String pre =
"Departed for ";
1109 if (type == ETAType.RETURNING) {
1110 pre =
"Returning to ";
1112 label = info.addPara(pre + destName, tc, initPad);
1114 if (destHL !=
null && label !=
null) {
1115 label.setHighlightColor(destHL);
1116 label.setHighlight(hl);
1120 if ((
int) eta > 0) {
1121 String days = (int)eta == 1 ?
"day" :
"days";
1122 String post =
" until arrival";
1123 if (type == ETAType.RETURNING) {
1124 post =
" until return";
1126 if (!withDepartedText) {
1127 if (type == ETAType.RETURNING) post +=
" to " + destName;
1128 else if (type == ETAType.ARRIVING) post +=
" at " + destName;
1130 label = info.addPara(
"Estimated %s " + days + post, initPad, tc, h,
"" + (
int) eta);
1132 if (!withDepartedText && destHL !=
null && label !=
null) {
1133 label.setHighlightColors(h, destHL);
1134 label.setHighlight(
"" + (
int) eta, hl);
1137 String pre =
"Arrival at ";
1138 if (type == ETAType.RETURNING) {
1141 label = info.addPara(pre + destName +
" is imminent", tc, initPad);
1143 if (destHL !=
null && label !=
null) {
1144 label.setHighlightColor(destHL);
1145 label.highlightLast(hl);
1154 Color h = Misc.getHighlightColor();
1155 Color g = Misc.getGrayColor();
1156 Color tc = Misc.getTextColor();
1170 List<MarketAPI> targets, String safeStr, String riskStr, String riskStrHighlight) {
1172 Color h = Misc.getHighlightColor();
1173 float raidStr =
getRoute().getExtra().getStrengthModifiedByDamage();
1176 List<MarketAPI> safe =
new ArrayList<MarketAPI>();
1177 List<MarketAPI> unsafe =
new ArrayList<MarketAPI>();
1178 for (MarketAPI market : targets) {
1179 float defensiveStr = defenderStr + WarSimScript.getStationStrength(market.getFaction(), system, market.getPrimaryEntity());
1180 if (defensiveStr > raidStr * 1.25f) {
1187 if (safe.size() == targets.size()) {
1188 info.addPara(
"However, all colonies " + safeStr +
", " +
1189 "owing to their orbital defenses.", opad);
1191 info.addPara(
"The following colonies " + riskStr, opad,
1192 Misc.getNegativeHighlightColor(), riskStrHighlight);
1195 addMarketTable(info, f.getBaseUIColor(), f.getDarkUIColor(), f.getBrightUIColor(), unsafe, width, opad);
1207 float raidStr =
getRoute().getExtra().getStrengthModifiedByDamage();
1208 float defenderStr = 0f;
1211 if (raidStr < defenderStr * 0.75f) {
1213 }
else if (raidStr < defenderStr * 1.25f) {
1225 String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess) {
1226 Color h = Misc.getHighlightColor();
1228 float raidStr =
getRoute().getExtra().getStrengthModifiedByDamage();
1229 float defenderStr = 0f;
1232 String strDesc = Misc.getStrengthDesc(raidStr);
1234 String
fleets =
"fleets";
1235 if (numFleets == 1)
fleets =
"fleet";
1237 String defenderDesc =
"";
1238 String defenderHighlight =
"";
1239 Color defenderHighlightColor = h;
1241 boolean potentialDanger =
false;
1242 String outcome =
null;
1243 if (raidStr < defenderStr * 0.75f) {
1244 defenderDesc =
"The defending fleets are superior";
1245 defenderHighlightColor = Misc.getPositiveHighlightColor();
1246 defenderHighlight =
"superior";
1247 outcome = outcomeFailure;
1248 }
else if (raidStr < defenderStr * 1.25f) {
1249 defenderDesc =
"The defending fleets are evenly matched";
1250 defenderHighlightColor = h;
1251 defenderHighlight =
"evenly matched";
1252 outcome = outcomeUncertain;
1253 potentialDanger =
true;
1255 defenderDesc =
"The defending fleets are outmatched";
1256 defenderHighlightColor = Misc.getNegativeHighlightColor();
1257 defenderHighlight =
"outmatched";
1258 outcome = outcomeSuccess;
1259 potentialDanger =
true;
1262 if (outcome !=
null) {
1263 defenderDesc +=
", and " + outcome +
".";
1265 defenderDesc +=
".";
1268 defenderDesc =
" " + defenderDesc;
1270 if (system ==
null) defenderDesc =
"";
1273 LabelAPI label = info.addPara(
"The " + forces +
" are " +
1274 "projected to be %s and likely comprised of %s " +
fleets +
"." + defenderDesc,
1275 opad, h, strDesc,
"" + numFleets);
1276 label.setHighlight(strDesc,
"" + numFleets, defenderHighlight);
1277 label.setHighlightColors(h, h, defenderHighlightColor);
1279 return potentialDanger;
1288 String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess) {
1289 Color h = Misc.getHighlightColor();
1291 float raidStr =
getRoute().getExtra().getStrengthModifiedByDamage();
1292 float defenderStr = 0f;
1293 StarSystemAPI system = target.getStarSystem();
1296 defenderStr += WarSimScript.getStationStrength(target.getFaction(), system, target.getPrimaryEntity());
1298 String strDesc = Misc.getStrengthDesc(raidStr);
1300 String
fleets =
"fleets";
1301 if (numFleets == 1)
fleets =
"fleet";
1303 String defenderDesc =
"";
1304 String defenderHighlight =
"";
1305 Color defenderHighlightColor = h;
1307 boolean potentialDanger =
false;
1308 String outcome =
null;
1309 if (raidStr < defenderStr * 0.75f) {
1310 defenderDesc =
"The defending forces are superior";
1311 defenderHighlightColor = Misc.getPositiveHighlightColor();
1312 defenderHighlight =
"superior";
1313 outcome = outcomeFailure;
1314 }
else if (raidStr < defenderStr * 1.25f) {
1315 defenderDesc =
"The defending forces are evenly matched";
1316 defenderHighlightColor = h;
1317 defenderHighlight =
"evenly matched";
1318 outcome = outcomeUncertain;
1319 potentialDanger =
true;
1321 defenderDesc =
"The defending forces are outmatched";
1322 defenderHighlightColor = Misc.getNegativeHighlightColor();
1323 defenderHighlight =
"outmatched";
1324 outcome = outcomeSuccess;
1325 potentialDanger =
true;
1328 if (outcome !=
null) {
1329 defenderDesc +=
", and " + outcome +
".";
1331 defenderDesc +=
".";
1334 defenderDesc =
" " + defenderDesc;
1336 if (system ==
null) defenderDesc =
"";
1339 LabelAPI label = info.addPara(
"The " + forces +
" are " +
1340 "projected to be %s and likely comprised of %s " +
fleets +
"." + defenderDesc,
1341 opad, h, strDesc,
"" + numFleets);
1342 label.setHighlight(strDesc,
"" + numFleets, defenderHighlight);
1343 label.setHighlightColors(h, h, defenderHighlightColor);
1345 return potentialDanger;
static SectorAPI getSector()
boolean isSendingUpdate()
static void addMarketTable(TooltipMakerAPI info, Color base, Color dark, Color bright, List< MarketAPI > markets, float width, float pad)
void unindent(TooltipMakerAPI info)
static String getSoundStandardUpdate()
void sendUpdateIfPlayerHasIntel(Object listInfoParam, TextPanelAPI textPanel)
Object getListInfoParam()
Color getBulletColorForMode(ListInfoMode mode)
void bullet(TooltipMakerAPI info)
static String getSoundMajorPosting()
Color getTitleColor(ListInfoMode mode)
LocationAPI spawnLocation
float groupAbortsMissionFPFraction
List< CampaignFleetAPI > fleets
boolean isInPreLaunchDelay()
abstract SectorEntityToken getSource()
void finish(boolean isAbort)
SectorEntityToken getMapLocation(SectorMapAPI map)
float getGroupAbortsMissionFPFraction()
float getETAUntil(String actionId, boolean untilEndOfAction)
FGIEventListener getListener()
Set< String > getIntelTags(SectorMapAPI map)
String getSmallDescriptionTitle()
void addArrivedBulletPoint(String destName, Color destHL, TooltipMakerAPI info, Color tc, float initPad)
void createRoute(String factionId, int approximateTotalDifficultyPoints, int approximateNumberOfFleets, Object custom)
FGIEventListener listener
void notifyActionFinished(FGAction action)
void advance(float amount)
void setFleetAbortsMissionFPFraction(float fleetAbortsMissionFPFraction)
FGAction getCurrentAction()
boolean shouldCancelRouteAfterDelayCheck(RouteData route)
void giveFleetsReturnAssignments()
boolean isFailedButNotDefeated()
void addETABulletPoints(String destName, Color destHL, boolean withDepartedText, float eta, ETAType type, TooltipMakerAPI info, Color tc, float initPad)
int getRelativeFGStrength(StarSystemAPI target)
static String FLEET_LAUNCH_UPDATE
List< ArrowData > getArrowData(SectorMapAPI map)
void createIntelInfo(TooltipMakerAPI info, ListInfoMode mode)
float getDelayRemaining()
static final String KEY_STRAGGLER_RETURN_COUNTDOWN
void setTotalFPSpawned(float totalFPSpawned)
void addBulletPoints(TooltipMakerAPI info, ListInfoMode mode)
String getNameWithNoType(String systemName)
abstract void addUpdateBulletPoints(TooltipMakerAPI info, Color tc, Object param, ListInfoMode mode, float initPad)
void showMarketsInDanger(TooltipMakerAPI info, float opad, float width, StarSystemAPI system, List< MarketAPI > targets, String safeStr, String riskStr, String riskStrHighlight)
static LocationAPI getLocationForState(RouteSegment segment, TravelState state)
void removeAction(String id)
boolean isSpawnedFleets()
static String ABORT_UPDATE
float getETAUntil(String actionId)
abstract void spawnFleets()
void addAction(FGAction action, String id)
static TravelState getTravelState(RouteSegment segment)
void setFaction(FactionAPI faction)
void setRandom(Random random)
String getCommMessageSound()
void setListener(FGIEventListener listener)
List< CampaignFleetAPI > spawning
void pruneDestroyedOrDamagedFleetsAndAbortIfNeeded()
void setPreFleetDeploymentDelay(float delay)
void setReturnLocation(SectorEntityToken returnLocation)
boolean addStrengthDesc(TooltipMakerAPI info, float opad, StarSystemAPI system, String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess)
void setGroupAbortsMissionFPFraction(float groupAbortsMissionFPFraction)
static final String KEY_SPAWN_FP
void addAction(FGAction action)
void setFaction(String factionId)
abstract String getBaseName()
boolean sendFleetLaunchUpdate
String getSuccessPostfix()
float getPotentialStragglerCountdownDays()
void giveReturnAssignments(CampaignFleetAPI fleet)
void addFactionBulletPoint(TooltipMakerAPI info, Color tc, float initPad)
static void setLocationAndCoordinates(CampaignFleetAPI fleet, RouteSegment current)
boolean isDoIncrementalSpawn()
abstract void addNonUpdateBulletPoints(TooltipMakerAPI info, Color tc, Object param, ListInfoMode mode, float initPad)
boolean shouldSendIntelUpdateWhenActionFinished(FGAction action)
FGAction getAction(String id)
void reportAboutToBeDespawnedByRouteManager(RouteData route)
CampaignFleetAPI spawnFleet(RouteData route)
float fleetAbortsMissionFPFraction
String getFailurePostfix()
boolean failedButNotDefeated
RouteSegment getSegmentForAction(FGAction action)
float getFleetAbortsMissionFPFraction()
void addAssessmentSection(TooltipMakerAPI info, float width, float height, float opad)
boolean doIncrementalSpawn
static final String NEVER_STRAGGLER
SectorEntityToken returnLocation
FactionAPI getFactionForUIColors()
float getTotalFPSpawned()
void addStatusSection(TooltipMakerAPI info, float width, float height, float opad)
abstract boolean isPlayerTargeted()
IntelSortTier getSortTier()
void setSpawnedFleets(boolean spawnedFleets)
void createSmallDescription(TooltipMakerAPI info, float width, float height)
void setNeverStraggler(CampaignFleetAPI fleet)
boolean shouldRepeat(RouteData route)
boolean isSourceFunctionalMilitaryMarket()
abstract SectorEntityToken getDestination()
int getApproximateNumberOfFleets()
List< CampaignFleetAPI > getFleets()
boolean isCurrent(String id)
void handleIncrementalSpawning(float amount)
static float getApproximateStrengthForTotalDifficultyPoints(String factionId, int points)
void addBasicDescription(TooltipMakerAPI info, float width, float height, float opad)
List< FGAction > getActions()
int approximateNumberOfFleets
static LocationAPI getLocation(RouteSegment segment)
void setElapsed(float elapsed)
void setFailedButNotDefeated(boolean failedButNotDefeated)
SectorEntityToken getReturnLocation()
boolean sourceWasEverMilitaryMarket
static final String KEY_POTENTIAL_STRAGGLER
static void computeSampleFleetStrengths()
void setDoIncrementalSpawn(boolean doIncrementalSpawn)
void setRoute(RouteData route)
boolean addStrengthDesc(TooltipMakerAPI info, float opad, MarketAPI target, String forces, String outcomeFailure, String outcomeUncertain, String outcomeSuccess)
void setApproximateNumberOfFleets(int approximateNumberOfFleets)
boolean isActionFinished()
void directFleets(float amount)
void notifySegmentFinished(RouteSegment segment)
void setIntel(FleetGroupIntel intel)