Calculate houses_constructing and real_population

This commit is contained in:
dP
2020-06-20 01:25:33 +03:00
parent 62afdc2ddd
commit ce96863776
8 changed files with 81 additions and 41 deletions
+4 -1
View File
@@ -2685,7 +2685,8 @@ void ClearTownHouse(Town *t, TileIndex tile)
const HouseSpec *hs = HouseSpec::Get(house);
/* Remove population from the town if the house is finished. */
if (IsHouseCompleted(tile)) {
bool is_completed = IsHouseCompleted(tile);
if (is_completed) {
ChangePopulation(t, -hs->population);
}
@@ -2710,6 +2711,8 @@ void ClearTownHouse(Town *t, TileIndex tile)
/* Update cargo acceptance. */
UpdateTownCargoes(t, tile);
citymania::Emit(citymania::event::HouseCleared{t, tile, hs, is_completed});
}
/**