mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
Split identifier and legacyIdentifier on Object
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (c) 2014-2019 OpenRCT2 developers
|
||||
* Copyright (c) 2014-2020 OpenRCT2 developers
|
||||
*
|
||||
* For a complete list of all authors, please refer to contributors.md
|
||||
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
||||
@@ -252,12 +252,10 @@ public:
|
||||
return _items.data();
|
||||
}
|
||||
|
||||
const ObjectRepositoryItem* FindObject(const utf8* name) const override
|
||||
const ObjectRepositoryItem* FindObject(const std::string_view& legacyIdentifier) const override
|
||||
{
|
||||
rct_object_entry entry = {};
|
||||
utf8 entryName[9] = { ' ' };
|
||||
String::Set(entryName, sizeof(entryName), name);
|
||||
std::copy_n(entryName, 8, entry.name);
|
||||
entry.SetName(legacyIdentifier);
|
||||
|
||||
auto kvp = _itemMap.find(entry);
|
||||
if (kvp != _itemMap.end())
|
||||
|
||||
Reference in New Issue
Block a user