diff options
author | peter1138 <peter1138@openttd.org> | 2008-01-04 17:25:53 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-01-04 17:25:53 +0000 |
commit | 6a1306793108d0ebd51c8d79b8bb8cecd77a6ef6 (patch) | |
tree | 8157fc7cf7ad8566d8a2b0c35c903ec629fd0e28 | |
parent | 6b37ab36eaa10e70e222f468f11e1cdc2a52cb71 (diff) | |
download | openttd-6a1306793108d0ebd51c8d79b8bb8cecd77a6ef6.tar.xz |
(svn r11758) -Fix(ette): Populate 'void' cargo slots (unused slots in temperate and arctic) with default data as per pre-newcargo support. These slots are still disabled by default, but some NewGRFs (erroneously?) expect the default data.
-rw-r--r-- | src/cargotype.cpp | 2 | ||||
-rw-r--r-- | src/table/cargo_const.h | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/cargotype.cpp b/src/cargotype.cpp index 6a880b93b..0d3bcd827 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -37,7 +37,7 @@ void SetupCargoForClimate(LandscapeID l) if (cl < lengthof(_default_cargo)) { /* Copy the indexed cargo */ _cargo[i] = _default_cargo[cl]; - SetBit(_cargo_mask, i); + if (_cargo[i].bitnum != INVALID_CARGO) SetBit(_cargo_mask, i); continue; } diff --git a/src/table/cargo_const.h b/src/table/cargo_const.h index 184897025..4fe3d375f 100644 --- a/src/table/cargo_const.h +++ b/src/table/cargo_const.h @@ -141,13 +141,23 @@ static const CargoSpec _default_cargo[] = { STR_002D_FIZZY_DRINKS, STR_004D_FIZZY_DRINK, STR_NOTHING, STR_QUANTITY_FIZZY_DRINKS, STR_ABBREV_FIZZY_DRINKS, SPR_CARGO_FIZZYDRINK, CC_PIECE_GOODS ), + /* Void slot in temperate */ + MK( 0xFF, 0, 1, 0, 5688, 0, 30, true, TE_NONE, + STR_000E, STR_002E, STR_TONS, STR_QUANTITY_NOTHING, STR_ABBREV_NOTHING, + SPR_ASCII_SPACE, CC_NOAVAILABLE ), + + /* Void slot in arctic */ + MK( 0xFF, 0, 184, 0, 5120, 9, 255, true, TE_NONE, + STR_000E, STR_002E, STR_TONS, STR_QUANTITY_NOTHING, STR_ABBREV_NOTHING, + SPR_ASCII_SPACE, CC_NOAVAILABLE ), + }; /* Table of which cargo types are available in each climate, by default */ static const CargoLabel _default_climate_cargo[NUM_LANDSCAPE][12] = { - { 'PASS', 'COAL', 'MAIL', 'OIL_', 'LVST', 'GOOD', 'GRAI', 'WOOD', 'IORE', 'STEL', 'VALU', 'VOID', }, - { 'PASS', 'COAL', 'MAIL', 'OIL_', 'LVST', 'GOOD', 'WHEA', 'WOOD', 'VOID', 'PAPR', 'GOLD', 'FOOD', }, + { 'PASS', 'COAL', 'MAIL', 'OIL_', 'LVST', 'GOOD', 'GRAI', 'WOOD', 'IORE', 'STEL', 'VALU', 33, }, + { 'PASS', 'COAL', 'MAIL', 'OIL_', 'LVST', 'GOOD', 'WHEA', 'WOOD', 34, 'PAPR', 'GOLD', 'FOOD', }, { 'PASS', 'RUBR', 'MAIL', 4, 'FRUT', 'GOOD', 'MAIZ', 11, 'CORE', 'WATR', 'DIAM', 'FOOD', }, { 'PASS', 'SUGR', 'MAIL', 'TOYS', 'BATT', 'SWET', 'TOFF', 'COLA', 'CTCD', 'BUBL', 'PLST', 'FZDR', }, }; |