(svn r20003) -Feature [FS#3886]: [NewGRF] var 43 depot build date for railtypes

This commit is contained in:
yexo
2010-06-20 19:13:02 +00:00
parent 24b5c2f8aa
commit ec723b7744
8 changed files with 27 additions and 2 deletions

View File

@@ -2126,6 +2126,11 @@ bool AfterLoadGame()
FOR_ALL_DEPOTS(d) MakeDefaultName(d);
}
if (CheckSavegameVersion(142)) {
Depot *d;
FOR_ALL_DEPOTS(d) d->build_date = _date;
}
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();

View File

@@ -24,6 +24,7 @@ static const SaveLoad _depot_desc[] = {
SLE_CONDREF(Depot, town, REF_TOWN, 141, SL_MAX_VERSION),
SLE_CONDVAR(Depot, town_cn, SLE_UINT16, 141, SL_MAX_VERSION),
SLE_CONDSTR(Depot, name, SLE_STR, 0, 141, SL_MAX_VERSION),
SLE_CONDVAR(Depot, build_date, SLE_INT32, 142, SL_MAX_VERSION),
SLE_END()
};

View File

@@ -47,7 +47,7 @@
#include "saveload_internal.h"
extern const uint16 SAVEGAME_VERSION = 141;
extern const uint16 SAVEGAME_VERSION = 142;
SavegameType _savegame_type; ///< type of savegame we are loading