Remove bad identifier users

Note this doesn't actually do anything under the hood it will do the same thing for now
This commit is contained in:
duncanspumpkin committed 2023-05-22 08:46:15 +01:00
1 parent b9382ae9fc
commit 8f53c6dbd3
3 files changed
+3 -5

No files matched your search

+1 -2
View File
@@ -41,10 +41,9 @@ void BannerObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* st
// Add banners to 'Signs and items for footpaths' group, rather than lumping them in the Miscellaneous tab.
// Since this is already done the other way round for original items, avoid adding those to prevent duplicates.
auto identifier = GetLegacyIdentifier();
auto& objectRepository = context->GetObjectRepository();
auto item = objectRepository.FindObjectLegacy(identifier);
auto item = objectRepository.FindObject(GetDescriptor());
if (item != nullptr)
{
auto sourceGame = item->GetFirstSourceGame();
+1 -1
View File
@@ -265,7 +265,7 @@ public:
return _usesFallbackImages;
}
// Legacy data structures
// DONOT USE THIS CAN LEAD TO OBJECT COLLISIONS
std::string_view GetLegacyIdentifier() const
{
return _descriptor.GetName();
+1 -2
View File
@@ -45,10 +45,9 @@ void PathAdditionObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre
// Add path additions to 'Signs and items for footpaths' group, rather than lumping them in the Miscellaneous tab.
// Since this is already done the other way round for original items, avoid adding those to prevent duplicates.
auto identifier = GetLegacyIdentifier();
auto& objectRepository = context->GetObjectRepository();
auto item = objectRepository.FindObjectLegacy(identifier);
auto item = objectRepository.FindObject(GetDescriptor());
if (item != nullptr)
{
auto sourceGame = item->GetFirstSourceGame();