Package com.fs.starfarer.api.fleet
Interface FleetMemberAPI
public interface FleetMemberAPI
- Author:
- Alex Mosolov Copyright 2012 Fractal Softworks, LLC
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
float
In credits.float
float
float
In credits.float
Base value of hull and all mounted non-built-in weapons and fighter LPCs.float
float
Fraction of crew on the ship, 0 to 1, ignores levels of crew.float
From 0 to 1, CR fraction.float
float
int
float
float
getId()
Unique id, generated using Misc.genUID().float
float
Based on fleet points, modified by CR and ordnance points actually used by the variant.float
float
int
int
org.lwjgl.util.vector.Vector2f
int
getOwner()
int
getStats()
getType()
float
boolean
isAlly()
True for non-player-controlled ships on the player's side in combat.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setAlly
(boolean isAlly) True for non-player-controlled ships on the player's side in combat.void
setCaptain
(PersonAPI commander) void
setFlagship
(boolean isFlagship) void
setFlagship
(boolean isFlagship, boolean withCaptainSet) void
setFleetCommanderForStats
(PersonAPI alternateFleetCommander, FleetDataAPI fleetForStats) void
void
setOverrideSpriteSize
(org.lwjgl.util.vector.Vector2f overrideSpriteSize) void
setOwner
(int owner) void
setPersonalityOverride
(String personalityOverride) void
setShipName
(String name) void
setSpriteOverride
(String spriteOverride) Sprite to use in the campaign view.void
setStatUpdateNeeded
(boolean statUpdateNeeded) Probably not needed given the current state of the API.void
setVariant
(ShipVariantAPI variant, boolean withRefit, boolean withStatsUpdate) void
-
Method Details
-
getCaptain
PersonAPI getCaptain() -
getStats
MutableShipStatsAPI getStats() -
getShipName
String getShipName() -
setShipName
-
getId
String getId()Unique id, generated using Misc.genUID().- Returns:
-
getSpecId
String getSpecId() -
getHullId
String getHullId() -
getType
FleetMemberType getType() -
isFlagship
boolean isFlagship() -
getNumFlightDecks
int getNumFlightDecks() -
isCarrier
boolean isCarrier() -
isCivilian
boolean isCivilian() -
setFlagship
void setFlagship(boolean isFlagship) -
getFleetPointCost
int getFleetPointCost() -
isFighterWing
boolean isFighterWing() -
isFrigate
boolean isFrigate() -
isDestroyer
boolean isDestroyer() -
isCruiser
boolean isCruiser() -
isCapital
boolean isCapital() -
getNumFightersInWing
int getNumFightersInWing() -
getFuelCapacity
float getFuelCapacity() -
getCargoCapacity
float getCargoCapacity() -
getMinCrew
float getMinCrew() -
getNeededCrew
float getNeededCrew() -
getMaxCrew
float getMaxCrew() -
getFuelUse
float getFuelUse() -
getRepairTracker
RepairTrackerAPI getRepairTracker() -
getHullSpec
ShipHullSpecAPI getHullSpec() -
getFleetCommander
PersonAPI getFleetCommander() -
canBeDeployedForCombat
boolean canBeDeployedForCombat() -
getVariant
ShipVariantAPI getVariant() -
getFleetData
FleetDataAPI getFleetData() -
setVariant
-
getCrewComposition
CrewCompositionAPI getCrewComposition() -
getStatus
FleetMemberStatusAPI getStatus() -
getCrewFraction
float getCrewFraction()Fraction of crew on the ship, 0 to 1, ignores levels of crew.- Returns:
-
getReplacementChassisCount
int getReplacementChassisCount() -
setStatUpdateNeeded
void setStatUpdateNeeded(boolean statUpdateNeeded) Probably not needed given the current state of the API.- Parameters:
statUpdateNeeded
-
-
getBuffManager
BuffManagerAPI getBuffManager() -
isMothballed
boolean isMothballed() -
getDeployCost
float getDeployCost()From 0 to 1, CR fraction. Multiplied by number of fighters if fighter wing.- Returns:
-
setCaptain
-
getMemberStrength
float getMemberStrength()Based on fleet points, modified by CR and ordnance points actually used by the variant. Not modified by hull status or captain quality.- Returns:
-
getOwner
int getOwner() -
setOwner
void setOwner(int owner) -
getBaseSellValue
float getBaseSellValue()In credits. Includes properly-adjusted cost of mounted weapons. Does not include any tariffs.- Returns:
-
getBaseBuyValue
float getBaseBuyValue()In credits. Includes properly-adjusted cost of mounted weapons. Does not include any tariffs.- Returns:
-
needsRepairs
boolean needsRepairs() -
canBeRepaired
boolean canBeRepaired() -
getDeploymentPointsCost
float getDeploymentPointsCost() -
getDeploymentCostSupplies
float getDeploymentCostSupplies() -
getBaseDeployCost
float getBaseDeployCost() -
isAlly
boolean isAlly()True for non-player-controlled ships on the player's side in combat. Transient, not saved.- Returns:
-
setAlly
void setAlly(boolean isAlly) True for non-player-controlled ships on the player's side in combat. Transient, not saved. -
setFleetCommanderForStats
-
getFleetDataForStats
FleetDataAPI getFleetDataForStats() -
getFleetCommanderForStats
PersonAPI getFleetCommanderForStats() -
updateStats
void updateStats() -
isStation
boolean isStation() -
getBaseDeploymentCostSupplies
float getBaseDeploymentCostSupplies() -
getBaseValue
float getBaseValue()Base value of hull and all mounted non-built-in weapons and fighter LPCs.- Returns:
-
setSpriteOverride
Sprite to use in the campaign view. Currently used by custom stations.- Parameters:
spriteOverride
-
-
getSpriteOverride
String getSpriteOverride() -
getOverrideSpriteSize
org.lwjgl.util.vector.Vector2f getOverrideSpriteSize() -
setOverrideSpriteSize
void setOverrideSpriteSize(org.lwjgl.util.vector.Vector2f overrideSpriteSize) -
isPhaseShip
boolean isPhaseShip() -
setId
-
getUnmodifiedDeploymentPointsCost
float getUnmodifiedDeploymentPointsCost() -
setFlagship
void setFlagship(boolean isFlagship, boolean withCaptainSet) -
getPersonalityOverride
String getPersonalityOverride() -
setPersonalityOverride
-