See: https://github.com/OpenTTD/OpenTTD/issues/9591
See: https://github.com/OpenTTD/OpenTTD/pull/9594
Non-extended savegame bump to be applied later
(cherry picked from commit e404d16929
)
# Conflicts:
# src/object_cmd.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.h
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include "date_func.h"
|
#include "date_func.h"
|
||||||
#include "newgrf_debug.h"
|
#include "newgrf_debug.h"
|
||||||
#include "vehicle_func.h"
|
#include "vehicle_func.h"
|
||||||
|
#include "station_func.h"
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
#include "table/object_land.h"
|
#include "table/object_land.h"
|
||||||
@@ -122,7 +123,9 @@ void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town, u
|
|||||||
Company::Get(owner)->infrastructure.water++;
|
Company::Get(owner)->infrastructure.water++;
|
||||||
DirtyCompanyInfrastructureWindows(owner);
|
DirtyCompanyInfrastructureWindows(owner);
|
||||||
}
|
}
|
||||||
|
bool remove = IsDockingTile(t);
|
||||||
MakeObject(t, owner, o->index, wc, Random());
|
MakeObject(t, owner, o->index, wc, Random());
|
||||||
|
if (remove) RemoveDockingTile(t);
|
||||||
MarkTileDirtyByTile(t, VMDF_NOT_MAP_MODE);
|
MarkTileDirtyByTile(t, VMDF_NOT_MAP_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3743,7 +3743,7 @@ bool AfterLoadGame()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsSavegameVersionUntil(SLV_ENDING_YEAR) || !SlXvIsFeaturePresent(XSLFI_MULTIPLE_DOCKS, 2) || !SlXvIsFeaturePresent(XSLFI_DOCKING_CACHE_VER, 1)) {
|
if (IsSavegameVersionUntil(SLV_ENDING_YEAR) || !SlXvIsFeaturePresent(XSLFI_MULTIPLE_DOCKS, 2) || !SlXvIsFeaturePresent(XSLFI_DOCKING_CACHE_VER, 2)) {
|
||||||
/* Update station docking tiles. Was only needed for pre-SLV_MULTITLE_DOCKS
|
/* Update station docking tiles. Was only needed for pre-SLV_MULTITLE_DOCKS
|
||||||
* savegames, but a bug in docking tiles touched all savegames between
|
* savegames, but a bug in docking tiles touched all savegames between
|
||||||
* SLV_MULTITILE_DOCKS and SLV_ENDING_YEAR. */
|
* SLV_MULTITILE_DOCKS and SLV_ENDING_YEAR. */
|
||||||
|
@@ -131,7 +131,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
|||||||
{ XSLFI_FLOW_STAT_FLAGS, XSCF_NULL, 1, 1, "flow_stat_flags", nullptr, nullptr, nullptr },
|
{ XSLFI_FLOW_STAT_FLAGS, XSCF_NULL, 1, 1, "flow_stat_flags", nullptr, nullptr, nullptr },
|
||||||
{ XSLFI_SPEED_RESTRICTION, XSCF_NULL, 1, 1, "speed_restriction", nullptr, nullptr, "VESR" },
|
{ XSLFI_SPEED_RESTRICTION, XSCF_NULL, 1, 1, "speed_restriction", nullptr, nullptr, "VESR" },
|
||||||
{ XSLFI_STATION_GOODS_EXTRA, XSCF_NULL, 1, 1, "station_goods_extra", nullptr, nullptr, nullptr },
|
{ XSLFI_STATION_GOODS_EXTRA, XSCF_NULL, 1, 1, "station_goods_extra", nullptr, nullptr, nullptr },
|
||||||
{ XSLFI_DOCKING_CACHE_VER, XSCF_IGNORABLE_ALL, 1, 1, "docking_cache_ver", nullptr, nullptr, nullptr },
|
{ XSLFI_DOCKING_CACHE_VER, XSCF_IGNORABLE_ALL, 2, 2, "docking_cache_ver", nullptr, nullptr, nullptr },
|
||||||
{ XSLFI_EXTRA_CHEATS, XSCF_NULL, 1, 1, "extra_cheats", nullptr, nullptr, "CHTX" },
|
{ XSLFI_EXTRA_CHEATS, XSCF_NULL, 1, 1, "extra_cheats", nullptr, nullptr, "CHTX" },
|
||||||
{ XSLFI_TOWN_MULTI_BUILDING, XSCF_NULL, 1, 1, "town_multi_building", nullptr, nullptr, nullptr },
|
{ XSLFI_TOWN_MULTI_BUILDING, XSCF_NULL, 1, 1, "town_multi_building", nullptr, nullptr, nullptr },
|
||||||
{ XSLFI_SHIP_LOST_COUNTER, XSCF_NULL, 1, 1, "ship_lost_counter", nullptr, nullptr, nullptr },
|
{ XSLFI_SHIP_LOST_COUNTER, XSCF_NULL, 1, 1, "ship_lost_counter", nullptr, nullptr, nullptr },
|
||||||
|
Reference in New Issue
Block a user