Interface RepairTrackerAPI


public interface RepairTrackerAPI
  • Method Details

    • applyCREvent

      void applyCREvent(float crChange, String description)
      Parameters:
      crChange - from -1 to 1
      description - shows up in the CR tooltip
    • getCR

      float getCR()
      Returned value is modified by crew fraction.
      Returns:
      from 0 to 1.
    • setCR

      void setCR(float cr)
      getCR() will return this value, modified by the crew fraction
      Parameters:
      cr - from 0 to 1.
    • getSuppliesFromScuttling

      float getSuppliesFromScuttling()
    • getFuelFromScuttling

      float getFuelFromScuttling()
    • getRecoveryRate

      float getRecoveryRate()
    • getDecreaseRate

      float getDecreaseRate()
    • getMaxCR

      float getMaxCR()
      Returns:
      0 to 1
    • getBaseCR

      float getBaseCR()
      Current CR without the crew understrength multiplier, if any.
      Returns:
    • getRecentEvents

      List<RepairTrackerAPI.CREvent> getRecentEvents()
    • getNoSupplyCRLossEvent

      RepairTrackerAPI.CREvent getNoSupplyCRLossEvent()
      The "event" for gradual supply loss over the last week is not included in the return value of getRecentEvents().
      Returns:
    • isSuspendRepairs

      boolean isSuspendRepairs()
    • setSuspendRepairs

      void setSuspendRepairs(boolean suspendRepairs)
    • performRepairsFraction

      void performRepairsFraction(float fraction)
    • getRemainingRepairTime

      float getRemainingRepairTime()
    • computeRepairednessFraction

      float computeRepairednessFraction()
      Including both hull and armor.
      Returns:
      0 to 1
    • isMothballed

      boolean isMothballed()
    • setMothballed

      void setMothballed(boolean mothballed)
    • isCrashMothballed

      boolean isCrashMothballed()
    • setCrashMothballed

      void setCrashMothballed(boolean crashMothballed)
    • getRepairRatePerDay

      float getRepairRatePerDay()
    • applyCREvent

      void applyCREvent(float crChange, String id, String description)
      Uses id to apply subsequent CR changes to the same "recent event". Useful for gradual CR loss, i.e. from star corona.
      Parameters:
      crChange -
      id -
      description -
    • getHeavyMachineryFromScuttling

      float getHeavyMachineryFromScuttling()
    • getCRPriorToMothballing

      float getCRPriorToMothballing()
    • setCRPriorToMothballing

      void setCRPriorToMothballing(float crPriorToMothballing)