Handle mixed install object loading more gracefully

This commit is contained in:
duncanspumpkin committed 2021-12-15 21:29:02 +00:00
1 parent 7e7947fe8b
commit 2916daa29d
3 files changed
+18 -44

No files matched your search

+7
View File
@@ -27,6 +27,7 @@
#include "../localisation/Localisation.h"
#include "../localisation/LocalisationService.h"
#include "../object/Object.h"
#include "../park/Legacy.h"
#include "../platform/platform.h"
#include "../rct12/SawyerChunkReader.h"
#include "../rct12/SawyerChunkWriter.h"
@@ -420,6 +421,12 @@ private:
bool AddItem(const ObjectRepositoryItem& item)
{
const auto newIdent = MapToNewObjectIdentifier(item.Identifier);
if (!newIdent.empty())
{
Console::Error::WriteLine("Mixed install detected. Not loading: '%s'", item.Identifier.c_str());
return false;
}
const ObjectRepositoryItem* conflict{};
if (item.ObjectEntry.name[0] != '\0')
{