Class PhaseField
java.lang.Object
com.fs.starfarer.api.combat.BaseHullMod
com.fs.starfarer.api.impl.hullmods.PhaseField
- All Implemented Interfaces:
HullModEffect
,HullModFleetEffect
-
Field Summary
FieldsFields inherited from class com.fs.starfarer.api.combat.BaseHullMod
spec
-
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
Called for *every* fleet, even fleets that don't have a ship with the specific hullmod.void
applyEffectsBeforeShipCreation
(ShipAPI.HullSize hullSize, MutableShipStatsAPI stats, String id) getDescriptionParam
(int index, ShipAPI.HullSize hullSize) static float[]
getPhaseFieldMultBaseProfileAndTotal
(CampaignFleetAPI fleet, String skipId, float addProfile, float addSensor) static float
getTopKValuesSum
(float[] arr, int k) void
onFleetSync
(CampaignFleetAPI fleet) Called when anything about the fleet composition changes, including hullmod changes.boolean
shouldAddDescriptionToTooltip
(ShipAPI.HullSize hullSize, ShipAPI ship, boolean isForModSpec) ship may be null, will be for modspecs.boolean
Whether the advanceInCampaign() method should be called for this hullmod.boolean
Whether the withOnFleetSync() method should be called for this hullmod.Methods inherited from class com.fs.starfarer.api.combat.BaseHullMod
addRequiredItemSection, addSModEffectSection, addSModSection, advanceInCampaign, advanceInCombat, affectsOPCosts, applyEffectsAfterShipCreation, applyEffectsToFighterSpawnedByShip, canBeAddedOrRemovedNow, getBorderColor, getCanNotBeInstalledNowReason, getDescriptionParam, getDisplayCategoryIndex, getDisplaySortOrder, getNameColor, getSModDescriptionParam, getSModDescriptionParam, getTooltipWidth, getUnapplicableReason, hasSModEffect, hasSModEffectSection, init, isApplicableToShip, isBuiltIn, isInPlayerFleet, isInPlayerFleet, isSMod, isSMod, isSModEffectAPenalty, shipHasOtherModInCategory, showInRefitScreenModPickerFor
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
-
MIN_CR
public static float MIN_CR -
MOD_KEY
-
PROFILE_MULT
public static float PROFILE_MULT -
MIN_FIELD_MULT
public static float MIN_FIELD_MULT
-
-
Constructor Details
-
PhaseField
public PhaseField()
-
-
Method Details
-
applyEffectsBeforeShipCreation
public void applyEffectsBeforeShipCreation(ShipAPI.HullSize hullSize, MutableShipStatsAPI stats, String id) - Specified by:
applyEffectsBeforeShipCreation
in interfaceHullModEffect
- Overrides:
applyEffectsBeforeShipCreation
in classBaseHullMod
-
getDescriptionParam
- Specified by:
getDescriptionParam
in interfaceHullModEffect
- Overrides:
getDescriptionParam
in classBaseHullMod
-
advanceInCampaign
Description copied from interface:HullModFleetEffect
Called for *every* fleet, even fleets that don't have a ship with the specific hullmod. Shouldn't try to do a lot here; could have a lot of performance repercussions.- Specified by:
advanceInCampaign
in interfaceHullModFleetEffect
-
withAdvanceInCampaign
public boolean withAdvanceInCampaign()Description copied from interface:HullModFleetEffect
Whether the advanceInCampaign() method should be called for this hullmod.- Specified by:
withAdvanceInCampaign
in interfaceHullModFleetEffect
- Returns:
-
withOnFleetSync
public boolean withOnFleetSync()Description copied from interface:HullModFleetEffect
Whether the withOnFleetSync() method should be called for this hullmod.- Specified by:
withOnFleetSync
in interfaceHullModFleetEffect
- Returns:
-
onFleetSync
Description copied from interface:HullModFleetEffect
Called when anything about the fleet composition changes, including hullmod changes. Also called for all fleets, including fleets without ships with this hullmod.- Specified by:
onFleetSync
in interfaceHullModFleetEffect
-
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
- Overrides:
shouldAddDescriptionToTooltip
in classBaseHullMod
- 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
- Overrides:
addPostDescriptionSection
in classBaseHullMod
-
getPhaseFieldMultBaseProfileAndTotal
public static float[] getPhaseFieldMultBaseProfileAndTotal(CampaignFleetAPI fleet, String skipId, float addProfile, float addSensor) -
getTopKValuesSum
public static float getTopKValuesSum(float[] arr, int k)
-