Merge branch 'departure-boards-sx' into jgrpp
Conflicts: src/saveload/extended_ver_sl.cpp src/saveload/extended_ver_sl.h src/window_type.h
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "../debug.h"
|
||||
#include "saveload.h"
|
||||
#include "extended_ver_sl.h"
|
||||
#include "../timetable.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -45,9 +46,11 @@ std::vector<uint32> _sl_xv_discardable_chunk_ids; ///< list of chunks
|
||||
static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk
|
||||
|
||||
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_TRACE_RESTRICT, XSCF_NULL, 1, 1, "tracerestrict", NULL, NULL, "TRRM,TRRP" },
|
||||
{ XSLFI_PROG_SIGS, XSCF_NULL, 1, 1, "programmable_signals", NULL, NULL, "SPRG" },
|
||||
{ XSLFI_ADJACENT_CROSSINGS, XSCF_NULL, 1, 1, "adjacent_crossings", NULL, NULL, NULL },
|
||||
{ XSLFI_TRACE_RESTRICT, XSCF_NULL, 1, 1, "tracerestrict", NULL, NULL, "TRRM,TRRP" },
|
||||
{ XSLFI_PROG_SIGS, XSCF_NULL, 1, 1, "programmable_signals", NULL, NULL, "SPRG" },
|
||||
{ XSLFI_ADJACENT_CROSSINGS, XSCF_NULL, 1, 1, "adjacent_crossings", NULL, NULL, NULL },
|
||||
{ XSLFI_DEPARTURE_BOARDS, XSCF_IGNORABLE_UNKNOWN, 1, 1, "departure_boards", NULL, NULL, NULL },
|
||||
{ XSLFI_TIMETABLES_START_TICKS, XSCF_NULL, WALLCLOCK_NETWORK_COMPATIBLE ? 0 : 1, 1, "timetable_start_ticks", NULL, NULL, NULL },
|
||||
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ enum SlXvFeatureIndex {
|
||||
XSLFI_TRACE_RESTRICT, ///< Trace restrict
|
||||
XSLFI_PROG_SIGS, ///< programmable signals patch
|
||||
XSLFI_ADJACENT_CROSSINGS, ///< Adjacent level crossings closure patch
|
||||
XSLFI_DEPARTURE_BOARDS, ///< Departure boards patch, in ticks mode
|
||||
XSLFI_TIMETABLES_START_TICKS, ///< Timetable start time is in ticks, instead of days (from departure boards patch)
|
||||
|
||||
XSLFI_SIZE, ///< Total count of features, including null feature
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user