Fix: Update last servicing dates when using the date cheat (#9694)

This commit is contained in:
nchappe
2021-11-19 00:04:22 +00:00
committed by GitHub
parent 0533b666b7
commit 2cb6351af5
4 changed files with 15 additions and 1 deletions

View File

@@ -211,7 +211,7 @@ static void OnNewYear()
_cur_year--;
days_this_year = IsLeapYear(_cur_year) ? DAYS_IN_LEAP_YEAR : DAYS_IN_YEAR;
_date -= days_this_year;
for (Vehicle *v : Vehicle::Iterate()) v->date_of_last_service -= days_this_year;
for (Vehicle *v : Vehicle::Iterate()) v->ShiftDates(-days_this_year);
for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(-days_this_year);
/* Because the _date wraps here, and text-messages expire by game-days, we have to clean out