diff options
author | rubidium <rubidium@openttd.org> | 2010-11-17 18:35:59 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-11-17 18:35:59 +0000 |
commit | 7826b78415bac7d6a85e3e1f0b5ac860b2a4e6b1 (patch) | |
tree | df702f78ebd43773eee69970e01da9322e2b8bb5 /src | |
parent | 602a0f10fa56b68a35d92d7a1f9dfd931c0a16cf (diff) | |
download | openttd-7826b78415bac7d6a85e3e1f0b5ac860b2a4e6b1.tar.xz |
(svn r21224) -Fix [FS#4172]: [NewGRF] The specs' cargo strings and OpenTTD's use of the clashed. Provide properties so NewGRFs can provide cargo strings tailored for OpenTTD while retaining (some) backward compatability
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index fca8f96bf..d4b74045a 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2097,14 +2097,20 @@ static ChangeInfoResult CargoChangeInfo(uint cid, int numinfo, int prop, ByteRea _string_to_grf_mapping[&cs->name_single] = _cur_grffile->grfid; break; - case 0x0B: - /* String for units of cargo. This is different in OpenTTD to TTDPatch - * (e.g. 10 tonnes of coal) */ + case 0x0B: // String for singular quantity of cargo (e.g. 1 tonne of coal) + case 0x1B: // String for cargo units + /* String for units of cargo. This is different in OpenTTD + * (e.g. tonnes) to TTDPatch (e.g. {COMMA} tonne of coal). + * Property 1B is used to set OpenTTD's behaviour. */ cs->units_volume = buf->ReadWord(); _string_to_grf_mapping[&cs->units_volume] = _cur_grffile->grfid; break; - case 0x0C: // String for quantity of cargo (e.g. 10 tonnes of coal) + case 0x0C: // String for plural quantity of cargo (e.g. 10 tonnes of coal) + case 0x1C: // String for any amount of cargo + /* Strings for an amount of cargo. This is different in OpenTTD + * (e.g. {WEIGHT} of coal) to TTDPatch (e.g. {COMMA} tonnes of coal). + * Property 1C is used to set OpenTTD's behaviour. */ cs->quantifier = buf->ReadWord(); _string_to_grf_mapping[&cs->quantifier] = _cur_grffile->grfid; break; |