1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 09:52:44 +01:00

Codechange: Use GetString() with argument parameters in simple cases. (#13551)

Avoids using global string parameters.
This commit is contained in:
Peter Nelson
2025-02-14 00:10:56 +00:00
committed by GitHub
parent c3d5e6d2a0
commit 20e57a02a2
26 changed files with 79 additions and 170 deletions

View File

@@ -284,9 +284,7 @@ std::optional<std::string> BuildCargoAcceptanceString(const CargoArray &acceptan
/* If the accepted value is less than 8, show it in 1/8:ths */
if (acceptance[cargo_type] < 8) {
SetDParam(0, acceptance[cargo_type]);
SetDParam(1, cs->name);
line << GetString(STR_LAND_AREA_INFORMATION_CARGO_EIGHTS);
line << GetString(STR_LAND_AREA_INFORMATION_CARGO_EIGHTS, acceptance[cargo_type], cs->name);
} else {
line << GetString(cs->name);
}