Package com.fs.starfarer.api.combat
Interface ShipVariantAPI
public interface ShipVariantAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addPermaMod
(String modId) void
addPermaMod
(String modId, boolean isSMod) void
addSuppressedMod
(String modId) void
void
void
addWeaponGroup
(WeaponGroupSpec group) void
void
void
clear()
Removes everything non-built-in - weapons, fighters, hullmods - and sets vents/capacitors to 0.void
Doesn't clear out built-in hullmods (or permamods), as opposed to getHullMods().clear().void
void
void
void
clone()
int
int
int
int
getGroup
(int index) getHints()
getModuleVariant
(String slotId) Only returns slots that have actual weapons in them, not empty slots.int
int
If autofitted, what the goal variant was.getSMods()
getTags()
int
getWeaponId
(String slotId) getWeaponSpec
(String slotId) getWing
(int index) getWingId
(int index) getWings()
boolean
hasDMods()
boolean
hasHullMod
(String id) boolean
boolean
boolean
boolean
boolean
isCombat()
boolean
isDHull()
Whether variant has any unsuppressed dmods.boolean
boolean
boolean
boolean
boolean
isLiner()
boolean
boolean
boolean
boolean
isTanker()
boolean
void
void
void
removePermaMod
(String modId) void
removeSuppressedMod
(String modId) void
void
setGoalVariant
(boolean goalVariant) void
setHullSpecAPI
(ShipHullSpecAPI hullSpec) void
setHullVariantId
(String hullVariantId) void
setMayAutoAssignWeapons
(boolean mayAutoAssign) void
setModuleVariant
(String slotId, ShipVariantAPI variant) void
setNumFluxCapacitors
(int capacitors) void
setNumFluxVents
(int vents) void
setOriginalVariant
(String targetVariant) If autofitted by a FleetInflater, what the goal variant was.void
setSource
(VariantSource source) void
setVariantDisplayName
(String variantName) void
org.json.JSONObject
-
Method Details
-
clone
ShipVariantAPI clone() -
getHullSpec
ShipHullSpecAPI getHullSpec() -
getDisplayName
String getDisplayName() -
getDesignation
String getDesignation() -
getHullMods
Collection<String> getHullMods() -
clearHullMods
void clearHullMods()Doesn't clear out built-in hullmods (or permamods), as opposed to getHullMods().clear(). -
getHints
EnumSet<ShipHullSpecAPI.ShipTypeHints> getHints() -
addMod
-
removeMod
-
addWeapon
-
getNumFluxVents
int getNumFluxVents() -
getNumFluxCapacitors
int getNumFluxCapacitors() -
getNonBuiltInWeaponSlots
Only returns slots that have actual weapons in them, not empty slots.- Returns:
-
getWeaponId
-
setNumFluxCapacitors
void setNumFluxCapacitors(int capacitors) -
setNumFluxVents
void setNumFluxVents(int vents) -
setSource
-
clearSlot
-
getWeaponSpec
-
getFittedWeaponSlots
Collection<String> getFittedWeaponSlots() -
autoGenerateWeaponGroups
void autoGenerateWeaponGroups() -
hasUnassignedWeapons
boolean hasUnassignedWeapons() -
assignUnassignedWeapons
void assignUnassignedWeapons() -
getGroup
-
computeOPCost
-
computeWeaponOPCost
-
computeHullModOPCost
int computeHullModOPCost() -
computeHullModOPCost
-
getSource
VariantSource getSource() -
isStockVariant
boolean isStockVariant() -
isEmptyHullVariant
boolean isEmptyHullVariant() -
setHullVariantId
-
getHullVariantId
String getHullVariantId() -
getWeaponGroups
List<WeaponGroupSpec> getWeaponGroups() -
addWeaponGroup
-
setVariantDisplayName
-
getHullSize
ShipAPI.HullSize getHullSize() -
isFighter
boolean isFighter() -
getFullDesignationWithHullName
String getFullDesignationWithHullName() -
hasHullMod
-
getSlot
-
isCombat
boolean isCombat() -
isStation
boolean isStation() -
getWingId
-
setWingId
-
getWings
-
getLaunchBaysSlotIds
-
getFittedWings
-
setHullSpecAPI
-
getPermaMods
-
clearPermaMods
void clearPermaMods() -
removePermaMod
-
addPermaMod
-
addPermaMod
-
isCarrier
boolean isCarrier() -
getSortedMods
-
getSuppressedMods
-
addSuppressedMod
-
removeSuppressedMod
-
clearSuppressedMods
void clearSuppressedMods() -
isGoalVariant
boolean isGoalVariant() -
setGoalVariant
void setGoalVariant(boolean goalVariant) -
getNonBuiltInHullmods
Collection<String> getNonBuiltInHullmods() -
getWing
-
getUnusedOP
-
isCivilian
boolean isCivilian() -
getModuleSlots
-
getStatsForOpCosts
MutableShipStatsAPI getStatsForOpCosts() -
isLiner
boolean isLiner() -
isFreighter
boolean isFreighter() -
isTanker
boolean isTanker() -
isDHull
boolean isDHull()Whether variant has any unsuppressed dmods.- Returns:
-
getStationModules
-
getNonBuiltInWings
-
hasTag
-
addTag
-
removeTag
-
getTags
Collection<String> getTags() -
clearTags
void clearTags() -
clear
void clear()Removes everything non-built-in - weapons, fighters, hullmods - and sets vents/capacitors to 0. -
getOriginalVariant
String getOriginalVariant()If autofitted, what the goal variant was. May or may not be set. Must be set for fleet.deflate() to work.- Returns:
-
setOriginalVariant
If autofitted by a FleetInflater, what the goal variant was. May or may not be set. Must be set for fleet.deflate() to work. -
getModuleVariant
-
setModuleVariant
-
isTransport
boolean isTransport() -
getVariantFilePath
String getVariantFilePath() -
getSMods
LinkedHashSet<String> getSMods() -
getFullDesignationWithHullNameForShip
String getFullDesignationWithHullNameForShip() -
refreshBuiltInWings
void refreshBuiltInWings() -
hasDMods
boolean hasDMods() -
getSModdedBuiltIns
LinkedHashSet<String> getSModdedBuiltIns() -
isMayAutoAssignWeapons
boolean isMayAutoAssignWeapons() -
setMayAutoAssignWeapons
void setMayAutoAssignWeapons(boolean mayAutoAssign) -
getFullDesignationForShip
String getFullDesignationForShip() -
toJSONObject
org.json.JSONObject toJSONObject() throws org.json.JSONException- Throws:
org.json.JSONException
-