mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #14266: [Plugin] {STRINGID} format is not applied
This commit is contained in:
parent
f0dc28e9fc
commit
a9584ad797
|
@ -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))
|
||||
{
|
||||
FormatRealName(ss, *stringid);
|
||||
stringId = *value32;
|
||||
}
|
||||
if (stringId)
|
||||
{
|
||||
if (IsRealNameStringId(*stringId))
|
||||
{
|
||||
FormatRealName(ss, *stringId);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto subfmt = GetFmtStringById(*stringid);
|
||||
auto subfmt = GetFmtStringById(*stringId);
|
||||
FormatStringAny(ss, subfmt, args, argIndex);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue