diff options
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index d5fdb161b..99aad12b7 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2126,6 +2126,10 @@ static bool IndustriesChangeInfo(uint indid, int numinfo, int prop, byte **bufp, indsp->removal_cost_multiplier = grf_load_dword(&buf); break; + case 0x24: // name for nearby station + indsp->station_name = GRFMappedStringID(grf_load_dword(&buf), _cur_grffile->grfid); + break; + default: ret = true; break; @@ -5421,6 +5425,14 @@ static void FinaliseIndustriesArray() strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->new_industry_text); if (strid != STR_UNDEFINED) indsp->new_industry_text = strid; + indsp->station_name.MapString(); + if (indsp->station_name != STR_NULL) { + /* STR_NULL (0) can be set by grf. It has a meaning regarding assignation of the + * station's name. Don't wont to loose the value, therefor, do not process. */ + strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->station_name); + if (strid != STR_UNDEFINED) indsp->station_name = strid; + } + _industry_mngr.SetEntitySpec(indsp); _loaded_newgrf_features.has_newindustries = true; } |