Class MilitaryBase
java.lang.Object
com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry
com.fs.starfarer.api.impl.campaign.econ.impl.MilitaryBase
- All Implemented Interfaces:
Industry
,FleetEventListener
,RouteManager.RouteFleetSpawner
,Cloneable
public class MilitaryBase
extends BaseIndustry
implements RouteManager.RouteFleetSpawner, FleetEventListener
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.econ.Industry
Industry.AICoreDescriptionMode, Industry.ImprovementDescriptionMode, Industry.IndustryTooltipMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic float
static float
static float
static float
static int
static float
static float
static float
protected float
protected IntervalUtil
Fields inherited from class com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry
aiCoreId, BASE_VALUE_TEXT, buildCostOverride, building, buildProgress, buildTime, currTooltipMode, DEFAULT_IMPROVE_SUPPLY_BONUS, demand, DEMAND_REDUCTION, demandReduction, demandReductionFromOther, dKey, hasInstallableItems, hiddenOverride, id, improved, income, market, SIZE_FOR_LARGE_IMAGE, SIZE_FOR_SMALL_IMAGE, spec, special, supply, SUPPLY_BONUS, supplyBonus, supplyBonusFromOther, upgradeId, upkeep, UPKEEP_MULT, wasDisrupted
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAlphaCoreDescription
(TooltipMakerAPI tooltip, Industry.AICoreDescriptionMode mode) void
protected void
addPostDemandSection
(TooltipMakerAPI tooltip, boolean hasDemand, Industry.IndustryTooltipMode mode) adjustCommodityDangerLevel
(String commodityId, MarketCMD.RaidDangerLevel level) adjustItemDangerLevel
(String itemId, String data, MarketCMD.RaidDangerLevel level) Includes nonecon "commodities" such as AI cores.void
advance
(float amount) void
apply()
protected void
protected void
protected void
protected void
protected void
boolean
static CampaignFleetAPI
createPatrol
(FleetFactory.PatrolType type, float extraTankerPts, String factionId, RouteManager.RouteData route, MarketAPI market, org.lwjgl.util.vector.Vector2f locInHyper, Random random) static CampaignFleetAPI
createPatrol
(FleetFactory.PatrolType type, String factionId, RouteManager.RouteData route, MarketAPI market, org.lwjgl.util.vector.Vector2f locInHyper, Random random) protected int
int
getCount
(FleetFactory.PatrolType... types) int
static int
getPatrolCombatFP
(FleetFactory.PatrolType type, Random random) protected boolean
hasPostDemandSection
(boolean hasDemand, Industry.IndustryTooltipMode mode) boolean
boolean
boolean
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) boolean
boolean
spawnFleet
(RouteManager.RouteData route) void
unapply()
protected void
upgradeFinished
(Industry previous) Methods inherited from class com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry
addAICoreSection, addAICoreSection, addBetaCoreDescription, addGammaCoreDescription, addGroundDefensesImpactSection, addImprovedSection, addInstalledItemsSection, addNonAICoreInstalledItems, addPostDescriptionSection, addPostSupplySection, addPostUpkeepSection, addRightAfterDescriptionSection, addStabilityPostDemandSection, addUnknownCoreDescription, adjustMarineTokensToRaidItem, apply, applyAICoreModifiers, applyAICoreToIncomeAndUpkeep, applyBetaCoreModifiers, applyBetaCoreSupplyAndDemandModifiers, applyDeficitToProduction, applyGammaCoreModifiers, applyGammaCoreSupplyAndDemandModifiers, applyIncomeAndUpkeep, buildNextInQueue, canBeDisrupted, cancelUpgrade, canDowngrade, canImproveToIncreaseProduction, canInstallAICores, canShutDown, canUpgrade, clearUnmodified, clone, createTooltip, demand, demand, demand, demand, disruptionFinished, doPostSaveRestore, doPreSaveCleanup, downgrade, finishBuildingOrUpgrading, generateCargoForGatheringPoint, getAICoreId, getAllDeficit, getAllDeficit, getAllDemand, getAllSupply, getBaseUpkeep, getBuildCost, getBuildCostOverride, getBuildOrUpgradeDaysText, getBuildOrUpgradeProgress, getBuildOrUpgradeProgressText, getBuildProgress, getBuildTime, getCanNotShutDownReason, getCargoForInteractionMode, getCargoTitleForGatheringPoint, getCommodityEconUnitMult, getCurrentName, getDeficitMult, getDeficitText, getDemand, getDemandReduction, getDemandReductionFromOther, getDescriptionOverride, getDisruptedDays, getDisruptedKey, getId, getImproveBonusXP, getImproveDialogTitle, getImprovementsDescForModifiers, getImproveMenuText, getImproveProductionBonus, getImproveSoundId, getImproveStoryPoints, getIncome, getInstallableItems, getMarket, getMaxDeficit, getModId, getModId, getPatherInterest, getSizeMult, getSizeMult, getSpec, getSpecialItem, getStabilityPenalty, getSupply, getSupplyBonus, getSupplyBonusFromOther, getTooltipWidth, getUpkeep, getVisibleInstalledItems, init, initWithParams, isAICoreId, isBuilding, isDisrupted, isFunctional, isHidden, isImproved, isIndustry, isOther, isStructure, isTooltipExpandable, isUpgrading, modifyStabilityWithBaseMod, notifyBeingRemoved, notifyColonyRenamed, notifyDisrupted, readResolve, reapply, sendBuildOrUpgradeMessage, setAICoreId, setBuildCostOverride, setBuildProgress, setDisrupted, setDisrupted, setHidden, setImproved, setMarket, setSpecialItem, showShutDown, showWhenUnavailable, startBuilding, startUpgrading, supply, supply, supply, supply, unmodifyStabilityWithBaseMod, updateAICoreToSupplyAndDemandModifiers, updateImprovementSupplyAndDemandModifiers, updateIncomeAndUpkeep, updateSupplyAndDemandModifiers, wantsToUseSpecialItem, writeReplace
-
Field Details
-
OFFICER_PROB_MOD_PATROL_HQ
public static float OFFICER_PROB_MOD_PATROL_HQ -
OFFICER_PROB_MOD_MILITARY_BASE
public static float OFFICER_PROB_MOD_MILITARY_BASE -
OFFICER_PROB_MOD_HIGH_COMMAND
public static float OFFICER_PROB_MOD_HIGH_COMMAND -
DEFENSE_BONUS_PATROL
public static float DEFENSE_BONUS_PATROL -
DEFENSE_BONUS_MILITARY
public static float DEFENSE_BONUS_MILITARY -
DEFENSE_BONUS_COMMAND
public static float DEFENSE_BONUS_COMMAND -
IMPROVE_NUM_PATROLS_BONUS
public static int IMPROVE_NUM_PATROLS_BONUS -
tracker
-
returningPatrolValue
protected float returningPatrolValue -
ALPHA_CORE_BONUS
public static float ALPHA_CORE_BONUS
-
-
Constructor Details
-
MilitaryBase
public MilitaryBase()
-
-
Method Details
-
apply
public void apply() -
unapply
public void unapply()- Specified by:
unapply
in interfaceIndustry
- Overrides:
unapply
in classBaseIndustry
-
hasPostDemandSection
- Overrides:
hasPostDemandSection
in classBaseIndustry
-
addPostDemandSection
protected void addPostDemandSection(TooltipMakerAPI tooltip, boolean hasDemand, Industry.IndustryTooltipMode mode) - Overrides:
addPostDemandSection
in classBaseIndustry
-
getBaseStabilityMod
protected int getBaseStabilityMod()- Overrides:
getBaseStabilityMod
in classBaseIndustry
-
getNameForModifier
- Specified by:
getNameForModifier
in interfaceIndustry
- Overrides:
getNameForModifier
in classBaseIndustry
-
getStabilityAffectingDeficit
- Overrides:
getStabilityAffectingDeficit
in classBaseIndustry
-
getCurrentImage
- Specified by:
getCurrentImage
in interfaceIndustry
- Overrides:
getCurrentImage
in classBaseIndustry
-
isDemandLegal
- Specified by:
isDemandLegal
in interfaceIndustry
- Overrides:
isDemandLegal
in classBaseIndustry
-
isSupplyLegal
- Specified by:
isSupplyLegal
in interfaceIndustry
- Overrides:
isSupplyLegal
in classBaseIndustry
-
isAvailableToBuild
public boolean isAvailableToBuild()- Specified by:
isAvailableToBuild
in interfaceIndustry
- Overrides:
isAvailableToBuild
in classBaseIndustry
-
buildingFinished
protected void buildingFinished()- Overrides:
buildingFinished
in classBaseIndustry
-
upgradeFinished
- Overrides:
upgradeFinished
in classBaseIndustry
-
advance
public void advance(float amount) - Specified by:
advance
in interfaceIndustry
- Overrides:
advance
in classBaseIndustry
-
reportAboutToBeDespawnedByRouteManager
- Specified by:
reportAboutToBeDespawnedByRouteManager
in interfaceRouteManager.RouteFleetSpawner
-
shouldRepeat
- Specified by:
shouldRepeat
in interfaceRouteManager.RouteFleetSpawner
-
getCount
-
getMaxPatrols
-
getRouteSourceId
-
shouldCancelRouteAfterDelayCheck
- Specified by:
shouldCancelRouteAfterDelayCheck
in interfaceRouteManager.RouteFleetSpawner
-
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
-
reportFleetDespawnedToListener
public void reportFleetDespawnedToListener(CampaignFleetAPI fleet, CampaignEventListener.FleetDespawnReason reason, Object param) - Specified by:
reportFleetDespawnedToListener
in interfaceFleetEventListener
-
getPatrolCombatFP
-
spawnFleet
- Specified by:
spawnFleet
in interfaceRouteManager.RouteFleetSpawner
-
createPatrol
public static CampaignFleetAPI createPatrol(FleetFactory.PatrolType type, String factionId, RouteManager.RouteData route, MarketAPI market, org.lwjgl.util.vector.Vector2f locInHyper, Random random) -
createPatrol
public static CampaignFleetAPI createPatrol(FleetFactory.PatrolType type, float extraTankerPts, String factionId, RouteManager.RouteData route, MarketAPI market, org.lwjgl.util.vector.Vector2f locInHyper, Random random) -
applyAlphaCoreModifiers
protected void applyAlphaCoreModifiers()- Overrides:
applyAlphaCoreModifiers
in classBaseIndustry
-
applyNoAICoreModifiers
protected void applyNoAICoreModifiers()- Overrides:
applyNoAICoreModifiers
in classBaseIndustry
-
applyAlphaCoreSupplyAndDemandModifiers
protected void applyAlphaCoreSupplyAndDemandModifiers()- Overrides:
applyAlphaCoreSupplyAndDemandModifiers
in classBaseIndustry
-
addAlphaCoreDescription
protected void addAlphaCoreDescription(TooltipMakerAPI tooltip, Industry.AICoreDescriptionMode mode) - Overrides:
addAlphaCoreDescription
in classBaseIndustry
-
canImprove
public boolean canImprove()- Specified by:
canImprove
in interfaceIndustry
- Overrides:
canImprove
in classBaseIndustry
-
applyImproveModifiers
protected void applyImproveModifiers()- Overrides:
applyImproveModifiers
in classBaseIndustry
-
addImproveDesc
- Specified by:
addImproveDesc
in interfaceIndustry
- Overrides:
addImproveDesc
in classBaseIndustry
-
adjustCommodityDangerLevel
public MarketCMD.RaidDangerLevel adjustCommodityDangerLevel(String commodityId, MarketCMD.RaidDangerLevel level) - Specified by:
adjustCommodityDangerLevel
in interfaceIndustry
- Overrides:
adjustCommodityDangerLevel
in classBaseIndustry
-
adjustItemDangerLevel
public MarketCMD.RaidDangerLevel adjustItemDangerLevel(String itemId, String data, MarketCMD.RaidDangerLevel level) Description copied from interface:Industry
Includes nonecon "commodities" such as AI cores. Rule of thumb: if it requires a set number of marine tokens to raid, then this method determines the danger level. Otherwise, it's getCommodityDangerLevel().- Specified by:
adjustItemDangerLevel
in interfaceIndustry
- Overrides:
adjustItemDangerLevel
in classBaseIndustry
- Returns:
-