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.
This commit is contained in:
Niels Martin Hansen
2018-07-28 23:28:24 +02:00
parent 9ce92521c1
commit 48b334cf97
4 changed files with 56 additions and 25 deletions

View File

@@ -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++) {