Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.combat.HullModEffect Interface Reference
Inheritance diagram for com.fs.starfarer.api.combat.HullModEffect:
[legend]

Public Member Functions

void init (HullModSpecAPI spec)
 
void applyEffectsBeforeShipCreation (HullSize hullSize, MutableShipStatsAPI stats, String id)
 
void applyEffectsAfterShipCreation (ShipAPI ship, String id)
 
String getDescriptionParam (int index, HullSize hullSize)
 
String getDescriptionParam (int index, HullSize hullSize, ShipAPI ship)
 
void applyEffectsToFighterSpawnedByShip (ShipAPI fighter, ShipAPI ship, String id)
 
boolean isApplicableToShip (ShipAPI ship)
 
String getUnapplicableReason (ShipAPI ship)
 
boolean canBeAddedOrRemovedNow (ShipAPI ship, MarketAPI marketOrNull, CoreUITradeMode mode)
 
String getCanNotBeInstalledNowReason (ShipAPI ship, MarketAPI marketOrNull, CoreUITradeMode mode)
 
void advanceInCampaign (FleetMemberAPI member, float amount)
 
void advanceInCombat (ShipAPI ship, float amount)
 
boolean affectsOPCosts ()
 
boolean shouldAddDescriptionToTooltip (HullSize hullSize, ShipAPI ship, boolean isForModSpec)
 
void addPostDescriptionSection (TooltipMakerAPI tooltip, HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec)
 
Color getBorderColor ()
 
Color getNameColor ()
 
int getDisplaySortOrder ()
 
int getDisplayCategoryIndex ()
 
boolean hasSModEffectSection (HullSize hullSize, ShipAPI ship, boolean isForModSpec)
 
void addSModSection (TooltipMakerAPI tooltip, HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec, boolean isForBuildInList)
 
void addSModEffectSection (TooltipMakerAPI tooltip, HullSize hullSize, ShipAPI ship, float width, boolean isForModSpec, boolean isForBuildInList)
 
boolean hasSModEffect ()
 
String getSModDescriptionParam (int index, HullSize hullSize)
 
String getSModDescriptionParam (int index, HullSize hullSize, ShipAPI ship)
 
float getTooltipWidth ()
 
boolean isSModEffectAPenalty ()
 
boolean showInRefitScreenModPickerFor (ShipAPI ship)
 

Detailed Description

Note: the effect class is instantiated once per application session. Storing campaign data in members of an implementing class is a bad idea, use SectorAPI.getPersistentData() instead.

Author
Alex Mosolov

Copyright 2015 Fractal Softworks, LLC

Definition at line 20 of file HullModEffect.java.

Member Function Documentation

◆ addPostDescriptionSection()

void com.fs.starfarer.api.combat.HullModEffect.addPostDescriptionSection ( TooltipMakerAPI  tooltip,
HullSize  hullSize,
ShipAPI  ship,
float  width,
boolean  isForModSpec 
)

ship may be null, will be for modspecs. hullsize will always be CAPITAL_SHIP for modspecs.

Parameters
tooltip
hullSize
ship
width
isForModSpec

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ addSModEffectSection()

void com.fs.starfarer.api.combat.HullModEffect.addSModEffectSection ( TooltipMakerAPI  tooltip,
HullSize  hullSize,
ShipAPI  ship,
float  width,
boolean  isForModSpec,
boolean  isForBuildInList 
)

◆ addSModSection()

void com.fs.starfarer.api.combat.HullModEffect.addSModSection ( TooltipMakerAPI  tooltip,
HullSize  hullSize,
ShipAPI  ship,
float  width,
boolean  isForModSpec,
boolean  isForBuildInList 
)

◆ advanceInCampaign()

void com.fs.starfarer.api.combat.HullModEffect.advanceInCampaign ( FleetMemberAPI  member,
float  amount 
)

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.)

Parameters
member
amount

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ advanceInCombat()

void com.fs.starfarer.api.combat.HullModEffect.advanceInCombat ( ShipAPI  ship,
float  amount 
)

Not called while paused.

Parameters
ship
amount

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ affectsOPCosts()

boolean com.fs.starfarer.api.combat.HullModEffect.affectsOPCosts ( )

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.

Returns

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ applyEffectsAfterShipCreation()

void com.fs.starfarer.api.combat.HullModEffect.applyEffectsAfterShipCreation ( ShipAPI  ship,
String  id 
)

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.

Parameters
ship
id

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ applyEffectsBeforeShipCreation()

void com.fs.starfarer.api.combat.HullModEffect.applyEffectsBeforeShipCreation ( HullSize  hullSize,
MutableShipStatsAPI  stats,
String  id 
)

◆ applyEffectsToFighterSpawnedByShip()

void com.fs.starfarer.api.combat.HullModEffect.applyEffectsToFighterSpawnedByShip ( ShipAPI  fighter,
ShipAPI  ship,
String  id 
)

◆ canBeAddedOrRemovedNow()

boolean com.fs.starfarer.api.combat.HullModEffect.canBeAddedOrRemovedNow ( ShipAPI  ship,
MarketAPI  marketOrNull,
CoreUITradeMode  mode 
)

Ship may be null from autofit.

Parameters
ship
marketOrNull
mode
Returns

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ getBorderColor()

Color com.fs.starfarer.api.combat.HullModEffect.getBorderColor ( )

◆ getCanNotBeInstalledNowReason()

String com.fs.starfarer.api.combat.HullModEffect.getCanNotBeInstalledNowReason ( ShipAPI  ship,
MarketAPI  marketOrNull,
CoreUITradeMode  mode 
)

◆ getDescriptionParam() [1/2]

String com.fs.starfarer.api.combat.HullModEffect.getDescriptionParam ( int  index,
HullSize  hullSize 
)

◆ getDescriptionParam() [2/2]

String com.fs.starfarer.api.combat.HullModEffect.getDescriptionParam ( int  index,
HullSize  hullSize,
ShipAPI  ship 
)

◆ getDisplayCategoryIndex()

int com.fs.starfarer.api.combat.HullModEffect.getDisplayCategoryIndex ( )

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

Returns

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ getDisplaySortOrder()

int com.fs.starfarer.api.combat.HullModEffect.getDisplaySortOrder ( )

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.

Returns

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ getNameColor()

Color com.fs.starfarer.api.combat.HullModEffect.getNameColor ( )

◆ getSModDescriptionParam() [1/2]

String com.fs.starfarer.api.combat.HullModEffect.getSModDescriptionParam ( int  index,
HullSize  hullSize 
)

◆ getSModDescriptionParam() [2/2]

String com.fs.starfarer.api.combat.HullModEffect.getSModDescriptionParam ( int  index,
HullSize  hullSize,
ShipAPI  ship 
)

◆ getTooltipWidth()

float com.fs.starfarer.api.combat.HullModEffect.getTooltipWidth ( )

◆ getUnapplicableReason()

String com.fs.starfarer.api.combat.HullModEffect.getUnapplicableReason ( ShipAPI  ship)

◆ hasSModEffect()

boolean com.fs.starfarer.api.combat.HullModEffect.hasSModEffect ( )

◆ hasSModEffectSection()

boolean com.fs.starfarer.api.combat.HullModEffect.hasSModEffectSection ( HullSize  hullSize,
ShipAPI  ship,
boolean  isForModSpec 
)

◆ init()

void com.fs.starfarer.api.combat.HullModEffect.init ( HullModSpecAPI  spec)

◆ isApplicableToShip()

boolean com.fs.starfarer.api.combat.HullModEffect.isApplicableToShip ( ShipAPI  ship)

◆ isSModEffectAPenalty()

boolean com.fs.starfarer.api.combat.HullModEffect.isSModEffectAPenalty ( )

◆ shouldAddDescriptionToTooltip()

boolean com.fs.starfarer.api.combat.HullModEffect.shouldAddDescriptionToTooltip ( HullSize  hullSize,
ShipAPI  ship,
boolean  isForModSpec 
)

ship may be null, will be for modspecs. hullsize will always be CAPITAL_SHIP for modspecs.

Parameters
hullSize
ship
isForModSpec
Returns

Implemented in com.fs.starfarer.api.combat.BaseHullMod.

◆ showInRefitScreenModPickerFor()

boolean com.fs.starfarer.api.combat.HullModEffect.showInRefitScreenModPickerFor ( ShipAPI  ship)

The documentation for this interface was generated from the following file: