Codechange: Use GetString() with local parameters in script functions. (#13585)
This commit is contained in:
@@ -36,8 +36,7 @@
|
||||
{
|
||||
if (!IsValidTown(town_id)) return std::nullopt;
|
||||
|
||||
::SetDParam(0, town_id);
|
||||
return GetString(STR_TOWN_NAME);
|
||||
return ::StrMakeValid(::GetString(STR_TOWN_NAME, town_id));
|
||||
}
|
||||
|
||||
/* static */ bool ScriptTown::SetName(TownID town_id, Text *name)
|
||||
|
||||
Reference in New Issue
Block a user