mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Fix #14266: [Plugin] {STRINGID} format is not applied
This commit is contained in:
@@ -680,15 +680,24 @@ namespace OpenRCT2
|
||||
if (argIndex < args.size())
|
||||
{
|
||||
const auto& arg = args[argIndex++];
|
||||
if (auto stringid = std::get_if<uint16_t>(&arg))
|
||||
std::optional<rct_string_id> stringId;
|
||||
if (auto value16 = std::get_if<uint16_t>(&arg))
|
||||
{
|
||||
if (IsRealNameStringId(*stringid))
|
||||
stringId = *value16;
|
||||
}
|
||||
else if (auto value32 = std::get_if<int32_t>(&arg))
|
||||
{
|
||||
stringId = *value32;
|
||||
}
|
||||
if (stringId)
|
||||
{
|
||||
if (IsRealNameStringId(*stringId))
|
||||
{
|
||||
FormatRealName(ss, *stringid);
|
||||
FormatRealName(ss, *stringId);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto subfmt = GetFmtStringById(*stringid);
|
||||
auto subfmt = GetFmtStringById(*stringId);
|
||||
FormatStringAny(ss, subfmt, args, argIndex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user