diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-07-28 23:28:24 +0200 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-01-21 16:06:25 +0100 |
commit | 48b334cf97cabee375bd8c96670754c736fbd2f8 (patch) | |
tree | 0044d76cdf3016b7ba39cf00aa60b616f8f28d05 /src/town_cmd.cpp | |
parent | 9ce92521c1f2c6bec862a4e09926c6cca750d9d2 (diff) | |
download | openttd-48b334cf97cabee375bd8c96670754c736fbd2f8.tar.xz |
Add: Houses can accept up to 16 different cargo types via NewGRF.
New Action0 property 23 for feature 07, variable length, format B n*(B B). Initial byte is number of structures following. First byte in structure is cargo id, second is acceptance level in 1/8 units.
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 986c52c4e..dacf59ddc 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -611,7 +611,7 @@ static inline void AddAcceptedCargoSetMask(CargoID cargo, uint amount, CargoArra static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted) { const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile)); - CargoID accepts[3]; + CargoID accepts[lengthof(hs->accepts_cargo)]; /* Set the initial accepted cargo types */ for (uint8 i = 0; i < lengthof(accepts); i++) { |