Fix: [Timetable] Use days as precision in day mode for accurate timetable syncing (#12683)

Co-authored-by: flowprint <61750128+flowprint@users.noreply.github.com>
This commit is contained in:
felixprigge
2024-11-21 23:27:07 +01:00
committed by GitHub
parent 6d3adc6169
commit 67a0fccfad
3 changed files with 12 additions and 3 deletions

View File

@@ -565,7 +565,13 @@ struct TimetableWindow : Window {
TimerGameTick::Ticks total_time = v->orders != nullptr ? v->orders->GetTimetableDurationIncomplete() : 0;
if (total_time != 0) {
SetTimetableParams(0, 1, total_time);
DrawString(tr, v->orders->IsCompleteTimetable() ? STR_TIMETABLE_TOTAL_TIME : STR_TIMETABLE_TOTAL_TIME_INCOMPLETE);
if (!v->orders->IsCompleteTimetable()) {
DrawString(tr, STR_TIMETABLE_TOTAL_TIME_INCOMPLETE);
} else if (total_time % TicksPerTimetableUnit() == 0) {
DrawString(tr, STR_TIMETABLE_TOTAL_TIME);
} else {
DrawString(tr, STR_TIMETABLE_APPROX_TIME);
}
}
tr.top += GetCharacterHeight(FS_NORMAL);