0x004747D4
| 271 | |
| 272 | // 0x004747D4 |
| 273 | static StringId validateHeadquarterBuilding() |
| 274 | { |
| 275 | size_t numHeadquarterTypes = 0; |
| 276 | for (LoadedObjectId id = 0; id < ObjectManager::getMaxObjects(ObjectType::building); ++id) |
| 277 | { |
| 278 | auto* buildingObj = ObjectManager::get<BuildingObject>(id); |
| 279 | if (buildingObj == nullptr) |
| 280 | { |
| 281 | continue; |
| 282 | } |
| 283 | if (buildingObj->hasFlags(BuildingObjectFlags::isHeadquarters)) |
| 284 | { |
| 285 | numHeadquarterTypes++; |
| 286 | } |
| 287 | } |
| 288 | if (numHeadquarterTypes == 0) |
| 289 | { |
| 290 | return StringIds::company_headquarter_building_type_must_be_selected; |
| 291 | } |
| 292 | else if (numHeadquarterTypes > 1) |
| 293 | { |
| 294 | return StringIds::only_one_company_headquarter_building_type_must_be_selected; |
| 295 | } |
| 296 | return StringIds::null; |
| 297 | } |
| 298 | |
| 299 | // 0x0046F910 |
| 300 | static void setupMultiplayerData() |
no test coverage detected