Update existing assertions to log tile information where suitable

This commit is contained in:
Jonathan G Rennison
2018-07-26 19:13:35 +01:00
parent 5661763d6a
commit 9e1e074c2b
36 changed files with 243 additions and 243 deletions

View File

@@ -154,14 +154,14 @@ void DecreaseBuildingCount(Town *t, HouseID house_id)
/* virtual */ uint32 HouseScopeResolver::GetRandomBits() const
{
/* Note: Towns build houses over houses. So during construction checks 'tile' may be a valid but unrelated house. */
assert(IsValidTile(this->tile) && (this->not_yet_constructed || IsTileType(this->tile, MP_HOUSE)));
assert_tile(IsValidTile(this->tile) && (this->not_yet_constructed || IsTileType(this->tile, MP_HOUSE)), this->tile);
return this->not_yet_constructed ? this->initial_random_bits : GetHouseRandomBits(this->tile);
}
/* virtual */ uint32 HouseScopeResolver::GetTriggers() const
{
/* Note: Towns build houses over houses. So during construction checks 'tile' may be a valid but unrelated house. */
assert(IsValidTile(this->tile) && (this->not_yet_constructed || IsTileType(this->tile, MP_HOUSE)));
assert_tile(IsValidTile(this->tile) && (this->not_yet_constructed || IsTileType(this->tile, MP_HOUSE)), this->tile);
return this->not_yet_constructed ? 0 : GetHouseTriggers(this->tile);
}
@@ -735,7 +735,7 @@ bool NewHouseTileLoop(TileIndex tile)
static void DoTriggerHouse(TileIndex tile, HouseTrigger trigger, byte base_random, bool first)
{
/* We can't trigger a non-existent building... */
assert(IsTileType(tile, MP_HOUSE));
assert_tile(IsTileType(tile, MP_HOUSE), tile);
HouseID hid = GetHouseType(tile);
HouseSpec *hs = HouseSpec::Get(hid);
@@ -806,7 +806,7 @@ void DoWatchedCargoCallback(TileIndex tile, TileIndex origin, CargoTypes trigger
*/
void WatchedCargoCallback(TileIndex tile, CargoTypes trigger_cargoes)
{
assert(IsTileType(tile, MP_HOUSE));
assert_tile(IsTileType(tile, MP_HOUSE), tile);
HouseID id = GetHouseType(tile);
const HouseSpec *hs = HouseSpec::Get(id);