* DecreaseBuildingCount() * Decrease the number of a building when it is deleted. * @param t The town that the building was built in * @param house_id The id of the house being removed */
| 208 | * @param house_id The id of the house being removed |
| 209 | */ |
| 210 | void DecreaseBuildingCount(Town *t, HouseID house_id) |
| 211 | { |
| 212 | HouseClassID class_id = HouseSpec::Get(house_id)->class_id; |
| 213 | |
| 214 | if (t->cache.building_counts.id_count[house_id] > 0) t->cache.building_counts.id_count[house_id]--; |
| 215 | if (_building_counts.id_count[house_id] > 0) _building_counts.id_count[house_id]--; |
| 216 | |
| 217 | if (class_id == HOUSE_NO_CLASS) return; |
| 218 | |
| 219 | if (t->cache.building_counts.class_count[class_id] > 0) t->cache.building_counts.class_count[class_id]--; |
| 220 | if (_building_counts.class_count[class_id] > 0) _building_counts.class_count[class_id]--; |
| 221 | } |
| 222 | |
| 223 | /* virtual */ uint32_t HouseScopeResolver::GetRandomBits() const |
| 224 | { |
no outgoing calls
no test coverage detected