Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/release.yml
#	bin/CMakeLists.txt
#	src/dock_gui.cpp
#	src/lang/brazilian_portuguese.txt
#	src/lang/catalan.txt
#	src/lang/czech.txt
#	src/lang/dutch.txt
#	src/lang/english.txt
#	src/lang/english_US.txt
#	src/lang/estonian.txt
#	src/lang/finnish.txt
#	src/lang/french.txt
#	src/lang/german.txt
#	src/lang/hungarian.txt
#	src/lang/indonesian.txt
#	src/lang/italian.txt
#	src/lang/japanese.txt
#	src/lang/korean.txt
#	src/lang/lithuanian.txt
#	src/lang/luxembourgish.txt
#	src/lang/norwegian_bokmal.txt
#	src/lang/polish.txt
#	src/lang/portuguese.txt
#	src/lang/romanian.txt
#	src/lang/russian.txt
#	src/lang/serbian.txt
#	src/lang/simplified_chinese.txt
#	src/lang/slovak.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/lang/swedish.txt
#	src/lang/tamil.txt
#	src/lang/ukrainian.txt
#	src/lang/vietnamese.txt
#	src/newgrf.cpp
#	src/newgrf_gui.cpp
#	src/object_gui.cpp
#	src/pathfinder/yapf/yapf_costrail.hpp
#	src/pathfinder/yapf/yapf_node_rail.hpp
#	src/rail_cmd.cpp
#	src/roadveh_cmd.cpp
#	src/town_cmd.cpp
#	src/vehicle.cpp
#	src/water_cmd.cpp
This commit is contained in:
Jonathan G Rennison
2021-04-11 02:39:07 +01:00
86 changed files with 1854 additions and 1042 deletions

View File

@@ -113,10 +113,12 @@ Town::~Town()
DeleteWindowById(WC_TOWN_VIEW, this->index);
/* Check no industry is related to us. */
#ifdef WITH_ASSERT
for (const Industry *i : Industry::Iterate()) assert(i->town != this);
/* ... and no object is related to us. */
for (const Object *o : Object::Iterate()) assert(o->town != this);
#endif
/* Check no tile is related to us. */
for (TileIndex tile = 0; tile < MapSize(); ++tile) {
@@ -2392,6 +2394,7 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size
Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
CommandCost rc = DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN);
(void)rc; // assert only
cur_company.Restore();
assert(rc.Succeeded());
@@ -2513,7 +2516,7 @@ HouseZonesBits GetTownRadiusGroup(const Town *t, TileIndex tile)
static inline void ClearMakeHouseTile(TileIndex tile, Town *t, byte counter, byte stage, HouseID type, byte random_bits)
{
CommandCost cc = DoCommand(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER | DC_TOWN, CMD_LANDSCAPE_CLEAR);
(void)cc; // assert only
assert(cc.Succeeded());
IncreaseBuildingCount(t, type);