| 69 | static void ClearMapForEditing(bool fromSave); |
| 70 | |
| 71 | static void ObjectListLoad() |
| 72 | { |
| 73 | auto* context = GetContext(); |
| 74 | context->OpenProgress(STR_LOADING_GENERIC); |
| 75 | |
| 76 | // Unload objects first, the repository is re-populated which owns the objects. |
| 77 | auto& objectManager = context->GetObjectManager(); |
| 78 | objectManager.UnloadAll(); |
| 79 | |
| 80 | // Scan objects if necessary |
| 81 | const auto& localisationService = context->GetLocalisationService(); |
| 82 | auto& objectRepository = context->GetObjectRepository(); |
| 83 | objectRepository.LoadOrConstruct(localisationService.GetCurrentLanguage()); |
| 84 | |
| 85 | Audio::LoadAudioObjects(); |
| 86 | |
| 87 | // Reset loaded objects to just defaults |
| 88 | // Load minimum required objects (like surface and edge) |
| 89 | for (const auto& entry : kMinimumRequiredObjects) |
| 90 | { |
| 91 | objectManager.LoadObject(entry); |
| 92 | } |
| 93 | |
| 94 | context->CloseProgress(); |
| 95 | } |
| 96 | |
| 97 | static WindowBase* OpenEditorWindows() |
| 98 | { |
no test coverage detected