Skip to content

Commit

Permalink
Issue 5195: Made completion/finished by day calculation unambiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
psikomonkie committed Dec 4, 2024
1 parent 3d3fc7c commit 53e7899
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MekHQ/src/mekhq/campaign/Campaign.java
Original file line number Diff line number Diff line change
Expand Up @@ -3370,7 +3370,7 @@ public void refit(Refit theRefit) {
theRefit.addTimeSpent(tech.getMinutesLeft());
tech.setMinutesLeft(0);
report = report + ", " + theRefit.getTimeLeft() + " minutes left. Completion ";
int daysLeft = (int) Math.ceil(theRefit.getTimeLeft() / tech.getDailyAvailableTechTime()) + 1;
int daysLeft = (int) Math.ceil((double) theRefit.getTimeLeft() / (double) tech.getDailyAvailableTechTime());
if (daysLeft == 1) {
report += " tomorrow.</b>";
} else {
Expand Down Expand Up @@ -3411,7 +3411,7 @@ public void refit(Refit theRefit) {
if (!theRefit.isBeingRefurbished()) {
refit(theRefit);
report += " Completion ";
int daysLeft = (int) Math.ceil(theRefit.getTimeLeft() / tech.getDailyAvailableTechTime()) + 1;
int daysLeft = (int) Math.ceil((double) theRefit.getTimeLeft() / (double) tech.getDailyAvailableTechTime());
if (daysLeft == 1) {
report += " tomorrow.</b>";
} else {
Expand Down Expand Up @@ -3553,7 +3553,7 @@ public String fixPart(IPartWork partWork, Person tech) {
report += " minutes left. Work";
if ((minutesUsed > 0) && (tech.getDailyAvailableTechTime() > 0)) {
report += " will be finished ";
int daysLeft = (int) Math.ceil(partWork.getTimeLeft() / tech.getDailyAvailableTechTime()) + 1;
int daysLeft = (int) Math.ceil((double) partWork.getTimeLeft() / (double)tech.getDailyAvailableTechTime());
if (daysLeft == 1) {
report += " tomorrow.</b>";
} else {
Expand Down

0 comments on commit 53e7899

Please sign in to comment.