Class TowCable
java.lang.Object
com.fs.starfarer.api.impl.campaign.TowCable
- All Implemented Interfaces:
HullModEffect
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPostDescriptionSection
(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec) ship may be null, will be for modspecs.void
addRequiredItemSection
(TooltipMakerAPI tooltip, FleetMemberAPI member, ShipVariantAPI currentVariant, MarketAPI dockedAt, float width, boolean isForModSpec) void
addSModEffectSection
(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec, boolean isForBuildInList) void
addSModSection
(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec) void
addSModSection
(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec, boolean isForBuildInList) void
advanceInCampaign
(FleetMemberAPI member, float amount) Not called while paused.void
advanceInCombat
(ShipAPI ship, float amount) Not called while paused.boolean
Hullmods that return true here should only ever be built-in, as cost changes aren't handled when these mods can be added or removed to/from the variant.void
applyEffectsAfterShipCreation
(ShipAPI ship, String id) Effects applied here should NOT affect ship stats as this does not get called from the campaign.void
applyEffectsBeforeShipCreation
(ShipAPI.HullSize hullSize, MutableShipStatsAPI stats, String id) void
applyEffectsToFighterSpawnedByShip
(ShipAPI fighter, ShipAPI ship, String id) boolean
canBeAddedOrRemovedNow
(ShipAPI ship, MarketAPI marketOrNull, CampaignUIAPI.CoreUITradeMode mode) Ship may be null from autofit.getCanNotBeInstalledNowReason
(ShipAPI ship, MarketAPI marketOrNull, CampaignUIAPI.CoreUITradeMode mode) getDescriptionParam
(int index, ShipAPI.HullSize hullSize) getDescriptionParam
(int index, ShipAPI.HullSize hullSize, ShipAPI ship) int
Should return 0 to 4; -1 for "use default".int
Sort order within the mod's display category.getSModDescriptionParam
(int index, ShipAPI.HullSize hullSize) getSModDescriptionParam
(int index, ShipAPI.HullSize hullSize, ShipAPI ship) float
getUnapplicableReason
(ShipAPI ship) boolean
boolean
hasSModEffectSection
(ShipAPI.HullSize hullSize, ShipAPI ship, boolean isForModSpec) void
init
(HullModSpecAPI spec) boolean
isApplicableToShip
(ShipAPI ship) boolean
boolean
shouldAddDescriptionToTooltip
(ShipAPI.HullSize hullSize, ShipAPI ship, boolean isForModSpec) ship may be null, will be for modspecs.boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fs.starfarer.api.combat.HullModEffect
applyEffectsAfterShipAddedToCombatEngine, getRequiredItem
-
Field Details
-
HULLMOD_ID
- See Also:
-
TOW_CABLE_KEY
One instance of the buff object per ship with a Tow Cable.- See Also:
-
-
Constructor Details
-
TowCable
public TowCable()
-
-
Method Details
-
init
- Specified by:
init
in interfaceHullModEffect
-
advanceInCampaign
Description copied from interface:HullModEffect
Not called while paused. But, called when the fleet data needs to be re-synced, with amount=0 (such as if, say, a fleet member is moved around. in the fleet screen.)- Specified by:
advanceInCampaign
in interfaceHullModEffect
-
advanceInCombat
Description copied from interface:HullModEffect
Not called while paused.- Specified by:
advanceInCombat
in interfaceHullModEffect
-
applyEffectsAfterShipCreation
Description copied from interface:HullModEffect
Effects applied here should NOT affect ship stats as this does not get called from the campaign. Apply stat changes in applyEffectsBeforeShipCreation() instead, as that does affect the campaign.- Specified by:
applyEffectsAfterShipCreation
in interfaceHullModEffect
-
applyEffectsBeforeShipCreation
public void applyEffectsBeforeShipCreation(ShipAPI.HullSize hullSize, MutableShipStatsAPI stats, String id) - Specified by:
applyEffectsBeforeShipCreation
in interfaceHullModEffect
-
isApplicableToShip
- Specified by:
isApplicableToShip
in interfaceHullModEffect
-
getDescriptionParam
- Specified by:
getDescriptionParam
in interfaceHullModEffect
-
getUnapplicableReason
- Specified by:
getUnapplicableReason
in interfaceHullModEffect
-
affectsOPCosts
public boolean affectsOPCosts()Description copied from interface:HullModEffect
Hullmods that return true here should only ever be built-in, as cost changes aren't handled when these mods can be added or removed to/from the variant.- Specified by:
affectsOPCosts
in interfaceHullModEffect
- Returns:
-
getDescriptionParam
- Specified by:
getDescriptionParam
in interfaceHullModEffect
-
canBeAddedOrRemovedNow
public boolean canBeAddedOrRemovedNow(ShipAPI ship, MarketAPI marketOrNull, CampaignUIAPI.CoreUITradeMode mode) Description copied from interface:HullModEffect
Ship may be null from autofit.- Specified by:
canBeAddedOrRemovedNow
in interfaceHullModEffect
- Returns:
-
getCanNotBeInstalledNowReason
public String getCanNotBeInstalledNowReason(ShipAPI ship, MarketAPI marketOrNull, CampaignUIAPI.CoreUITradeMode mode) - Specified by:
getCanNotBeInstalledNowReason
in interfaceHullModEffect
-
shouldAddDescriptionToTooltip
public boolean shouldAddDescriptionToTooltip(ShipAPI.HullSize hullSize, ShipAPI ship, boolean isForModSpec) Description copied from interface:HullModEffect
ship may be null, will be for modspecs. hullsize will always be CAPITAL_SHIP for modspecs.- Specified by:
shouldAddDescriptionToTooltip
in interfaceHullModEffect
- Returns:
-
addPostDescriptionSection
public void addPostDescriptionSection(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec) Description copied from interface:HullModEffect
ship may be null, will be for modspecs. hullsize will always be CAPITAL_SHIP for modspecs.- Specified by:
addPostDescriptionSection
in interfaceHullModEffect
-
applyEffectsToFighterSpawnedByShip
- Specified by:
applyEffectsToFighterSpawnedByShip
in interfaceHullModEffect
-
getBorderColor
- Specified by:
getBorderColor
in interfaceHullModEffect
-
getNameColor
- Specified by:
getNameColor
in interfaceHullModEffect
-
getDisplaySortOrder
public int getDisplaySortOrder()Description copied from interface:HullModEffect
Sort order within the mod's display category. Not used when category == 4, since then the order is determined by the order in which the player added the hullmods.- Specified by:
getDisplaySortOrder
in interfaceHullModEffect
- Returns:
-
getDisplayCategoryIndex
public int getDisplayCategoryIndex()Description copied from interface:HullModEffect
Should return 0 to 4; -1 for "use default". The default categories are: 0: built-in mods in the base hull 1: perma-mods that are not story point mods 2: d-mods 3: mods built in via story points 4: regular mods- Specified by:
getDisplayCategoryIndex
in interfaceHullModEffect
- Returns:
-
hasSModEffectSection
- Specified by:
hasSModEffectSection
in interfaceHullModEffect
-
addSModSection
public void addSModSection(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec) -
addSModEffectSection
public void addSModEffectSection(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec, boolean isForBuildInList) - Specified by:
addSModEffectSection
in interfaceHullModEffect
-
addSModSection
public void addSModSection(TooltipMakerAPI tooltip, ShipAPI.HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec, boolean isForBuildInList) - Specified by:
addSModSection
in interfaceHullModEffect
-
hasSModEffect
public boolean hasSModEffect()- Specified by:
hasSModEffect
in interfaceHullModEffect
-
getSModDescriptionParam
- Specified by:
getSModDescriptionParam
in interfaceHullModEffect
-
getSModDescriptionParam
- Specified by:
getSModDescriptionParam
in interfaceHullModEffect
-
getTooltipWidth
public float getTooltipWidth()- Specified by:
getTooltipWidth
in interfaceHullModEffect
-
isSModEffectAPenalty
public boolean isSModEffectAPenalty()- Specified by:
isSModEffectAPenalty
in interfaceHullModEffect
-
showInRefitScreenModPickerFor
- Specified by:
showInRefitScreenModPickerFor
in interfaceHullModEffect
-
addRequiredItemSection
public void addRequiredItemSection(TooltipMakerAPI tooltip, FleetMemberAPI member, ShipVariantAPI currentVariant, MarketAPI dockedAt, float width, boolean isForModSpec) - Specified by:
addRequiredItemSection
in interfaceHullModEffect
-