mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +01:00
Use LanguageGetString() if there is nothing to format
This commit is contained in:
committed by
GitHub
parent
24f5675cab
commit
b219ab1ed4
@@ -462,8 +462,7 @@ static Widget window_loadsave_widgets[] =
|
||||
auto buffer = park.Name;
|
||||
if (buffer.empty())
|
||||
{
|
||||
// Use localised "Unnamed Park" if park name was empty.
|
||||
buffer = FormatStringID(STR_UNNAMED_PARK, nullptr);
|
||||
buffer = LanguageGetString(STR_UNNAMED_PARK);
|
||||
}
|
||||
path = Path::Combine(path, buffer);
|
||||
}
|
||||
|
||||
@@ -4855,8 +4855,7 @@ static_assert(std::size(RatingNames) == 6);
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
auto musicObj = static_cast<MusicObject*>(objManager.GetLoadedObject(ObjectType::Music, musicObjectIndex));
|
||||
|
||||
auto name = musicObj->NameStringId;
|
||||
return FormatStringID(name, {});
|
||||
return LanguageGetString(musicObj->NameStringId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -841,7 +841,7 @@ bool ConfigFindOrBrowseInstallDirectory()
|
||||
auto uiContext = GetContext()->GetUiContext();
|
||||
if (!uiContext->HasFilePicker())
|
||||
{
|
||||
uiContext->ShowMessageBox(FormatStringID(STR_NEEDS_RCT2_FILES_MANUAL, nullptr));
|
||||
uiContext->ShowMessageBox(LanguageGetString(STR_NEEDS_RCT2_FILES_MANUAL));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -850,7 +850,7 @@ bool ConfigFindOrBrowseInstallDirectory()
|
||||
const char* g1DatPath = PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat";
|
||||
while (true)
|
||||
{
|
||||
uiContext->ShowMessageBox(FormatStringID(STR_NEEDS_RCT2_FILES, nullptr));
|
||||
uiContext->ShowMessageBox(LanguageGetString(STR_NEEDS_RCT2_FILES));
|
||||
std::string gog = LanguageGetString(STR_OWN_ON_GOG);
|
||||
std::string hdd = LanguageGetString(STR_INSTALLED_ON_HDD);
|
||||
|
||||
@@ -889,7 +889,7 @@ bool ConfigFindOrBrowseInstallDirectory()
|
||||
std::string dummy;
|
||||
if (!Platform::FindApp("innoextract", &dummy))
|
||||
{
|
||||
uiContext->ShowMessageBox(FormatStringID(STR_INSTALL_INNOEXTRACT, nullptr));
|
||||
uiContext->ShowMessageBox(LanguageGetString(STR_INSTALL_INNOEXTRACT));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,9 +258,9 @@ void TitleScreen::TitleInitialise()
|
||||
|
||||
int32_t random = 0;
|
||||
bool safeSequence = false;
|
||||
const std::string RCT1String = FormatStringID(STR_TITLE_SEQUENCE_RCT1, nullptr);
|
||||
const std::string RCT1AAString = FormatStringID(STR_TITLE_SEQUENCE_RCT1_AA, nullptr);
|
||||
const std::string RCT1LLString = FormatStringID(STR_TITLE_SEQUENCE_RCT1_AA_LL, nullptr);
|
||||
const std::string RCT1String = LanguageGetString(STR_TITLE_SEQUENCE_RCT1);
|
||||
const std::string RCT1AAString = LanguageGetString(STR_TITLE_SEQUENCE_RCT1_AA);
|
||||
const std::string RCT1LLString = LanguageGetString(STR_TITLE_SEQUENCE_RCT1_AA_LL);
|
||||
|
||||
// Ensure the random sequence chosen isn't from RCT1 or expansion if the player doesn't have it installed
|
||||
while (!safeSequence)
|
||||
|
||||
@@ -230,7 +230,7 @@ void Park::Initialise()
|
||||
{
|
||||
auto& gameState = GetGameState();
|
||||
|
||||
Name = FormatStringID(STR_UNNAMED_PARK, nullptr);
|
||||
Name = LanguageGetString(STR_UNNAMED_PARK);
|
||||
PluginStorage = {};
|
||||
gameState.StaffHandymanColour = COLOUR_BRIGHT_RED;
|
||||
gameState.StaffMechanicColour = COLOUR_LIGHT_BLUE;
|
||||
|
||||
Reference in New Issue
Block a user