Package com.fs.starfarer.api.fleet
Interface RepairTrackerAPI
public interface RepairTrackerAPI
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyCREvent
(float crChange, String description) void
applyCREvent
(float crChange, String id, String description) Uses id to apply subsequent CR changes to the same "recent event".float
Including both hull and armor.float
Current CR without the crew understrength multiplier, if any.float
getCR()
Returned value is modified by crew fraction.float
float
float
float
float
getMaxCR()
The "event" for gradual supply loss over the last week is not included in the return value of getRecentEvents().float
float
float
float
boolean
boolean
boolean
void
performRepairsFraction
(float fraction) void
setCR
(float cr) getCR() will return this value, modified by the crew fractionvoid
setCrashMothballed
(boolean crashMothballed) void
setCRPriorToMothballing
(float crPriorToMothballing) void
setMothballed
(boolean mothballed) void
setSuspendRepairs
(boolean suspendRepairs)
-
Method Details
-
applyCREvent
- Parameters:
crChange
- from -1 to 1description
- 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
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)
-