* IncreaseBuildingCount() * Increase the count of a building when it has been added by a town. * @param t The town that the building is being built in * @param house_id The id of the house being added */
| 189 | * @param house_id The id of the house being added |
| 190 | */ |
| 191 | void IncreaseBuildingCount(Town *t, HouseID house_id) |
| 192 | { |
| 193 | HouseClassID class_id = HouseSpec::Get(house_id)->class_id; |
| 194 | |
| 195 | t->cache.building_counts.id_count[house_id]++; |
| 196 | _building_counts.id_count[house_id]++; |
| 197 | |
| 198 | if (class_id == HOUSE_NO_CLASS) return; |
| 199 | |
| 200 | t->cache.building_counts.class_count[class_id]++; |
| 201 | _building_counts.class_count[class_id]++; |
| 202 | } |
| 203 | |
| 204 | /** |
| 205 | * DecreaseBuildingCount() |
no outgoing calls
no test coverage detected