Interface FleetMemberStatusAPI


public interface FleetMemberStatusAPI
  • 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

      void setRandom(Random random)
    • getRandom

      Random getRandom()
    • setDetached

      void setDetached(int index, Boolean detached)
    • setHullFraction

      void setHullFraction(int index, float hullFraction)
    • getHullFraction

      float getHullFraction(int index)
    • isDetached

      boolean isDetached(int index)
    • needsRepairs

      boolean needsRepairs()
    • setPermaDetached

      void setPermaDetached(int index, Boolean detached)
    • isPermaDetached

      boolean isPermaDetached(int index)
    • resetAmmoState

      void resetAmmoState()
    • applyDamage

      void applyDamage(float hitStrength, float forceHullFractionDamage)