File tree 1 file changed +7
-2
lines changed
MekHQ/src/mekhq/campaign/unit
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 28
28
*/
29
29
package mekhq .campaign .unit ;
30
30
31
+ import static java .lang .Math .ceil ;
31
32
import static java .lang .Math .max ;
32
33
import static megamek .common .MiscType .F_CARGO ;
33
34
import static mekhq .campaign .parts .enums .PartQuality .QUALITY_A ;
@@ -265,7 +266,11 @@ public String getStatus() {
265
266
} else if (!isPresent ()) {
266
267
return "In transit (" + getDaysToArrival () + " days)" ;
267
268
} else if (isRefitting ()) {
268
- return "Refitting" ;
269
+ int minutesInHour = 60 ;
270
+ int hoursInDay = 24 ;
271
+ int minutesInDay = hoursInDay * minutesInHour ;
272
+ int days = (int ) ceil ((double ) getRefit ().getTimeLeft () / minutesInDay );
273
+ return "Refitting" + " (" + days + " days)" ;
269
274
} else {
270
275
return getCondition ();
271
276
}
@@ -5962,7 +5967,7 @@ private int getMothballOrActivationTime() {
5962
5967
if (getEntity () instanceof Infantry ) {
5963
5968
return TECH_WORK_DAY ;
5964
5969
} else if ((getEntity () instanceof Dropship ) || (getEntity () instanceof Jumpship )) {
5965
- return TECH_WORK_DAY * (int ) Math . ceil (getEntity ().getWeight () / 500.0 );
5970
+ return TECH_WORK_DAY * (int ) ceil (getEntity ().getWeight () / 500.0 );
5966
5971
} else if (isMothballed ()) {
5967
5972
return TECH_WORK_DAY ;
5968
5973
} else {
You can’t perform that action at this time.
0 commit comments