Class EconomyFleetRouteManager
java.lang.Object
com.fs.starfarer.api.impl.campaign.fleets.BaseRouteFleetManager
com.fs.starfarer.api.impl.campaign.fleets.EconomyFleetRouteManager
- All Implemented Interfaces:
FleetEventListener
,EveryFrameScript
,RouteManager.RouteFleetSpawner
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Map<WarSimScript.LocationDanger,
Float> static boolean
static org.apache.log4j.Logger
protected TimeoutTracker<String>
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final String
Fields inherited from class com.fs.starfarer.api.impl.campaign.fleets.BaseRouteFleetManager
interval
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
advance
(float amount) Use SectorAPI.getClock() to convert to campaign days.static void
applyLostShipping
(EconomyFleetAssignmentAI.EconomyRouteData data, boolean returning, boolean cargo, boolean fuel, boolean personnel) createData
(MarketAPI from, MarketAPI to) static CampaignFleetAPI
createTradeRouteFleet
(RouteManager.RouteData route, Random random) static String
getFleetTypeIdForTier
(float tier, boolean smuggling) protected int
protected String
pickDestMarket
(MarketAPI from) protected Object
void
void
reportBattleOccurred
(CampaignFleetAPI fleet, CampaignFleetAPI primaryWinner, BattleAPI battle) "fleet" will be null if the listener is registered with the ListenerManager, and non-null if the listener is added directly to a fleet.void
reportFleetDespawnedToListener
(CampaignFleetAPI fleet, CampaignEventListener.FleetDespawnReason reason, Object param) protected void
boolean
boolean
spawnFleet
(RouteManager.RouteData route) Methods inherited from class com.fs.starfarer.api.impl.campaign.fleets.BaseRouteFleetManager
isDone, runWhilePaused
-
Field Details
-
ROUTE_SRC_LOAD
-
ROUTE_TRAVEL_DST
-
ROUTE_TRAVEL_WS
-
ROUTE_RESUPPLY_WS
-
ROUTE_DST_UNLOAD
-
ROUTE_DST_LOAD
-
ROUTE_TRAVEL_BACK_WS
-
ROUTE_RESUPPLY_BACK_WS
-
ROUTE_TRAVEL_SRC
-
ROUTE_SRC_UNLOAD
-
SOURCE_ID
- See Also:
-
log
public static org.apache.log4j.Logger log -
DANGER_LOSS_PROB
-
recentlySentTradeFleet
-
ENEMY_STRENGTH_CHECK_EXCLUDE_PIRATES
public static boolean ENEMY_STRENGTH_CHECK_EXCLUDE_PIRATES
-
-
Constructor Details
-
EconomyFleetRouteManager
public EconomyFleetRouteManager()
-
-
Method Details
-
readResolve
-
advance
public void advance(float amount) Description copied from interface:EveryFrameScript
Use SectorAPI.getClock() to convert to campaign days.- Specified by:
advance
in interfaceEveryFrameScript
- Overrides:
advance
in classBaseRouteFleetManager
- Parameters:
amount
- seconds elapsed during the last frame.
-
getRouteSourceId
- Specified by:
getRouteSourceId
in classBaseRouteFleetManager
-
getMaxFleets
protected int getMaxFleets()- Specified by:
getMaxFleets
in classBaseRouteFleetManager
-
addRouteFleetIfPossible
protected void addRouteFleetIfPossible()- Specified by:
addRouteFleetIfPossible
in classBaseRouteFleetManager
-
setDelayAndSendMessage
-
pickSourceMarket
-
pickDestMarket
-
createData
-
shouldCancelRouteAfterDelayCheck
- Specified by:
shouldCancelRouteAfterDelayCheck
in interfaceRouteManager.RouteFleetSpawner
-
spawnFleet
- Specified by:
spawnFleet
in interfaceRouteManager.RouteFleetSpawner
-
getFleetTypeIdForTier
-
createTradeRouteFleet
-
reportBattleOccurred
public void reportBattleOccurred(CampaignFleetAPI fleet, CampaignFleetAPI primaryWinner, BattleAPI battle) Description copied from interface:FleetEventListener
"fleet" will be null if the listener is registered with the ListenerManager, and non-null if the listener is added directly to a fleet.- Specified by:
reportBattleOccurred
in interfaceFleetEventListener
-
applyLostShipping
public static void applyLostShipping(EconomyFleetAssignmentAI.EconomyRouteData data, boolean returning, boolean cargo, boolean fuel, boolean personnel) -
reportFleetDespawnedToListener
public void reportFleetDespawnedToListener(CampaignFleetAPI fleet, CampaignEventListener.FleetDespawnReason reason, Object param) - Specified by:
reportFleetDespawnedToListener
in interfaceFleetEventListener
-
shouldRepeat
- Specified by:
shouldRepeat
in interfaceRouteManager.RouteFleetSpawner
-
reportAboutToBeDespawnedByRouteManager
- Specified by:
reportAboutToBeDespawnedByRouteManager
in interfaceRouteManager.RouteFleetSpawner
-