Package com.fs.starfarer.api.fleet
Interface FleetMemberStatusAPI
public interface FleetMemberStatusAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyDamage
(float hitStrength) Applies damage in a random location on the hull.void
applyDamage
(float hitStrength, float forceHullFractionDamage) void
applyHullFractionDamage
(float fraction) Applied to a random location on the hull, deals guaranteed amount of hull damage, expressed as a fraction of the maximum hull value.void
applyHullFractionDamage
(float fraction, int index) Useful for applying damage to specific fighters.void
disable()
float
float
Total hull damage (as a fraction) since resetDamageTaken() was last called.float
From 0 to 1.float
getHullFraction
(int index) int
boolean
isDetached
(int index) boolean
isPermaDetached
(int index) boolean
void
repairArmorAllCells
(float fraction) void
Repairs the disabled ship's hull a few percentage points.void
repairFraction
(float fraction) void
void
void
repairHullFraction
(float fraction) void
void
After this call, getHullDamageTaken() will return 0 until the ship takes more damage.void
setDetached
(int index, Boolean detached) void
setHullFraction
(float fraction) void
setHullFraction
(int index, float hullFraction) void
setPermaDetached
(int index, Boolean detached) void
-
Method Details
-
getHullDamageTaken
float getHullDamageTaken()Total hull damage (as a fraction) since resetDamageTaken() was last called.- Returns:
-
getHullFraction
float getHullFraction()From 0 to 1.- Returns:
-
resetDamageTaken
void resetDamageTaken()After this call, getHullDamageTaken() will return 0 until the ship takes more damage. -
repairDisabledABit
void repairDisabledABit()Repairs the disabled ship's hull a few percentage points. -
disable
void disable() -
repairFully
void repairFully() -
repairFullyNoNewFighters
void repairFullyNoNewFighters() -
repairFraction
void repairFraction(float fraction) -
applyDamage
void applyDamage(float hitStrength) Applies damage in a random location on the hull. In the case of a fighter wing, first picks a random wing member.- Parameters:
hitStrength
-
-
applyHullFractionDamage
void applyHullFractionDamage(float fraction) Applied to a random location on the hull, deals guaranteed amount of hull damage, expressed as a fraction of the maximum hull value.- Parameters:
fraction
-
-
applyHullFractionDamage
void applyHullFractionDamage(float fraction, int index) Useful for applying damage to specific fighters.- Parameters:
fraction
-index
-
-
getNumStatuses
int getNumStatuses()- Returns:
- 1, or number of fighters in the wing, or number of modules including the base.
-
setHullFraction
void setHullFraction(float fraction) -
repairArmorAllCells
void repairArmorAllCells(float fraction) -
repairHullFraction
void repairHullFraction(float fraction) -
getArmorDamageTaken
float getArmorDamageTaken() -
setRandom
-
getRandom
Random getRandom() -
setDetached
-
setHullFraction
void setHullFraction(int index, float hullFraction) -
getHullFraction
float getHullFraction(int index) -
isDetached
boolean isDetached(int index) -
needsRepairs
boolean needsRepairs() -
setPermaDetached
-
isPermaDetached
boolean isPermaDetached(int index) -
resetAmmoState
void resetAmmoState() -
applyDamage
void applyDamage(float hitStrength, float forceHullFractionDamage)
-