Fix: town name language incorrectly decoded

Both the GRF version < 7 and >= 7 are supported, but the debug message assumes
the latter. Also, use the same 'default' language for decoding the string as
is done for the part name later in the function.
This commit is contained in:
Rubidium
2026-05-31 19:00:08 +02:00
committed by rubidium42
parent 4b3d621569
commit 33d9b82c0c
+1 -2
View File
@@ -50,8 +50,7 @@ static void FeatureTownName(ByteReader &buf)
std::string_view name = buf.ReadString();
std::string lang_name = TranslateTTDPatchCodes(grfid, lang, false, name);
GrfMsg(6, "FeatureTownName: lang 0x{:X} -> '{}'", lang, lang_name);
GrfMsg(6, "FeatureTownName: lang 0x{:X} (new_scheme: {}) -> '{}'", lang, new_scheme, TranslateTTDPatchCodes(grfid, 0, false, name));
style = AddGRFString(grfid, GRFStringID{id}, lang, new_scheme, false, name, STR_UNDEFINED);