Starsector API
Loading...
Searching...
No Matches
RepairTrackerAPI.java
Go to the documentation of this file.
1package com.fs.starfarer.api.fleet;
2
3import java.util.List;
4
5public interface RepairTrackerAPI {
6
7 public static class CREvent {
8 public float crAmount;
9 public String text;
10 public float elapsed = 0f;
11 public String id;
12 public CREvent(float crAmount, String text) {
13 this.crAmount = crAmount;
14 this.text = text;
15 }
16 public float getCrAmount() {
17 return crAmount;
18 }
19 public String getText() {
20 return text;
21 }
22
23 public void advance(float days) {
24 elapsed += days;
25 }
26
27 public boolean isExpired() {
28 return elapsed > 7;
29 }
30 public float getElapsed() {
31 return elapsed;
32 }
33 }
34
39 void applyCREvent(float crChange, String description);
40
45 float getCR();
46
51 void setCR(float cr);
52
55
56
59
63 float getMaxCR();
64
65
70 float getBaseCR();
71
72
73 List<CREvent> getRecentEvents();
74
81
82
84 void setSuspendRepairs(boolean suspendRepairs);
85
86
87 //void performRepairsUsingSupplies(float supplies);
88 void performRepairsFraction(float fraction);
89
91
97
98// boolean isLogisticalPriority();
99// void setLogisticalPriority(boolean priorizeRepairs);
100
101 boolean isMothballed();
102 void setMothballed(boolean mothballed);
103
105 void setCrashMothballed(boolean crashMothballed);
106
108
116 void applyCREvent(float crChange, String id, String description);
117
119
121 void setCRPriorToMothballing(float crPriorToMothballing);
122
123}
void setMothballed(boolean mothballed)
void applyCREvent(float crChange, String description)
void setCRPriorToMothballing(float crPriorToMothballing)
void setSuspendRepairs(boolean suspendRepairs)
void applyCREvent(float crChange, String id, String description)
void setCrashMothballed(boolean crashMothballed)