Add departure boards and timetable tick status to SLXI info.

Implementing converting timetable start date to/from ticks/days in
afterload code.
This commit is contained in:
Jonathan G Rennison
2015-08-01 21:07:14 +01:00
parent 00f9f75d34
commit 6c81f8f35b
3 changed files with 22 additions and 0 deletions

View File

@@ -2968,6 +2968,23 @@ bool AfterLoadGame()
#endif
}
if (SlXvIsFeaturePresent(XSLFI_TIMETABLES_START_TICKS) && WALLCLOCK_NETWORK_COMPATIBLE) {
// savegame timetable start is in ticks, but we want it in days, fix it up
Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->timetable_start != 0) {
v->timetable_start /= DAY_TICKS;
}
}
} else if (SlXvIsFeatureMissing(XSLFI_TIMETABLES_START_TICKS) && (!WALLCLOCK_NETWORK_COMPATIBLE)) {
// savegame timetable start is in days, but we want it in ticks, fix it up
Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->timetable_start != 0) {
v->timetable_start *= DAY_TICKS;
}
}
}
/* Station acceptance is some kind of cache */
if (IsSavegameVersionBefore(127)) {