Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 5195: Made completion/finished by day calculation unambiguous #5298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading