From bc7dfd7b46c0184dc4b2cc376556702ac0ac1019 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 18 Apr 2023 00:07:57 +0100 Subject: [PATCH] Add: Station property 1C/1D to set name/classname. These are an alternative to the original "generic" C4xx/C5xx method, which can only assign strings to IDs up to 256. --- src/newgrf.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index bcb6d8d3ac..c91aa489ae 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2124,6 +2124,14 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, Byte buf->ReadWord(); break; + case 0x1C: // Station Name + AddStringForMapping(buf->ReadWord(), &statspec->name); + break; + + case 0x1D: // Station Class name + AddStringForMapping(buf->ReadWord(), &StationClass::Get(statspec->cls_id)->name); + break; + default: ret = CIR_UNKNOWN; break;