1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Handle mixed install object loading more gracefully

This commit is contained in:
duncanspumpkin
2021-11-26 16:59:46 +00:00
parent 7e7947fe8b
commit 2916daa29d
3 changed files with 18 additions and 44 deletions

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')
{