| 597 | } |
| 598 | |
| 599 | static void AskManyRandomIndustriesCallback(Window *, bool confirmed) |
| 600 | { |
| 601 | if (!confirmed) return; |
| 602 | |
| 603 | if (Town::GetNumItems() == 0) { |
| 604 | ShowErrorMessage(GetEncodedString(STR_ERROR_CAN_T_GENERATE_INDUSTRIES), GetEncodedString(STR_ERROR_MUST_FOUND_TOWN_FIRST), WL_INFO); |
| 605 | } else { |
| 606 | Backup<bool> old_generating_world(_generating_world, true); |
| 607 | BasePersistentStorageArray::SwitchMode(PSM_ENTER_GAMELOOP); |
| 608 | GenerateIndustries(); |
| 609 | BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP); |
| 610 | old_generating_world.Restore(); |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | static void AskRemoveAllIndustriesCallback(Window *, bool confirmed) |
| 615 | { |
nothing calls this directly
no test coverage detected