1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 17:54:50 +01:00

Remove localisation object overrides

This commit is contained in:
duncanspumpkin
2023-05-22 08:50:19 +01:00
parent 8f53c6dbd3
commit b58a17c731
6 changed files with 1 additions and 89 deletions

View File

@@ -115,28 +115,9 @@ void Object::PopulateTablesFromJson(IReadObjectContext* context, json_t& root)
_usesFallbackImages = _imageTable.ReadJson(context, root);
}
std::string Object::GetOverrideString(uint8_t index) const
{
auto legacyIdentifier = GetLegacyIdentifier();
const auto& localisationService = OpenRCT2::GetContext()->GetLocalisationService();
auto stringId = localisationService.GetObjectOverrideStringId(legacyIdentifier, index);
const utf8* result = nullptr;
if (stringId != STR_NONE)
{
result = LanguageGetString(stringId);
}
return String::ToStd(result);
}
std::string Object::GetString(ObjectStringID index) const
{
auto sz = GetOverrideString(static_cast<uint8_t>(index));
if (sz.empty())
{
sz = GetStringTable().GetString(index);
}
return sz;
return GetStringTable().GetString(index);
}
std::string Object::GetString(int32_t language, ObjectStringID index) const