diff options
author | glx <glx@openttd.org> | 2007-10-13 02:23:11 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-10-13 02:23:11 +0000 |
commit | 73fcdf77e0865025d563a5c9eed6e8c91655ab6c (patch) | |
tree | bf1a8fa343d89f308517e78ca707b1847cda4ffe /src/newgrf.cpp | |
parent | a8936b771b8f17e64cfebcd0152b8d467f100932 (diff) | |
download | openttd-73fcdf77e0865025d563a5c9eed6e8c91655ab6c.tar.xz |
(svn r11252) -Revert r11239, Fix r9620: cargo translation was not done correctly
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 09528486b..28ca65342 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1762,7 +1762,7 @@ static bool IndustrytilesChangeInfo(uint indtid, int numinfo, int prop, byte **b case 0x0B: case 0x0C: { uint16 acctp = grf_load_word(&buf); - tsp->accepts_cargo[prop - 0x0A] = GB(acctp, 0, 8); + tsp->accepts_cargo[prop - 0x0A] = GetCargoTranslation(GB(acctp, 0, 8), _cur_grffile); tsp->acceptance[prop - 0x0A] = GB(acctp, 8, 8); } break; @@ -1963,13 +1963,13 @@ static bool IndustriesChangeInfo(uint indid, int numinfo, int prop, byte **bufp, case 0x10: // Production cargo types for (byte j = 0; j < 2; j++) { - indsp->produced_cargo[j] = grf_load_byte(&buf); + indsp->produced_cargo[j] = GetCargoTranslation(grf_load_byte(&buf), _cur_grffile); } break; case 0x11: // Acceptance cargo types for (byte j = 0; j < 3; j++) { - indsp->accepts_cargo[j] = grf_load_byte(&buf); + indsp->accepts_cargo[j] = GetCargoTranslation(grf_load_byte(&buf), _cur_grffile); } grf_load_byte(&buf); // Unnused, eat it up break; @@ -5237,15 +5237,6 @@ static void FinaliseIndustriesArray() strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->new_industry_text); if (strid != STR_UNDEFINED) indsp->new_industry_text = strid; - for (byte j = 0; j < 2; j++) { - CargoID c = GetCargoTranslation(indsp->produced_cargo[j], indsp->grf_prop.grffile); - indsp->produced_cargo[j] = c; - } - for (byte j = 0; j < 3; j++) { - CargoID c = GetCargoTranslation(indsp->accepts_cargo[j], indsp->grf_prop.grffile); - indsp->accepts_cargo[j] = c; - } - _industry_mngr.SetEntitySpec(indsp); _loaded_newgrf_features.has_newindustries = true; } @@ -5256,10 +5247,6 @@ static void FinaliseIndustriesArray() for (int i = 0; i < NUM_INDUSTRYTILES; i++) { IndustryTileSpec *indtsp = file->indtspec[i]; if (indtsp != NULL) { - for (byte j = 0; j < 3; j++) { - CargoID c = GetCargoTranslation(indtsp->accepts_cargo[j], indtsp->grf_prop.grffile); - indtsp->accepts_cargo[j] = c; - } _industile_mngr.SetEntitySpec(indtsp); } } |