diff --git a/src/zoning_cmd.cpp b/src/zoning_cmd.cpp index 895956b7ce..1879e5a582 100644 --- a/src/zoning_cmd.cpp +++ b/src/zoning_cmd.cpp @@ -231,8 +231,21 @@ SpriteID TileZoneCheckUnservedIndustriesEvaluation(TileIndex tile, Owner owner) if (ind->neutral_station != nullptr) return ZONING_INVALID_SPRITE_ID; for (const Station *st : ind->stations_near) { - if (st->owner == owner && st->facilities & (~FACIL_BUS_STOP)) { - return ZONING_INVALID_SPRITE_ID; + if (st->owner == owner) { + if (st->facilities & (~(FACIL_BUS_STOP | FACIL_TRUCK_STOP)) || st->facilities == (FACIL_BUS_STOP | FACIL_TRUCK_STOP)) { + return ZONING_INVALID_SPRITE_ID; + } else if (st->facilities & (FACIL_BUS_STOP | FACIL_TRUCK_STOP)) { + for (uint i = 0; i < lengthof(ind->produced_cargo); i++) { + if (ind->produced_cargo[i] != CT_INVALID && st->facilities & (IsCargoInClass(ind->produced_cargo[i], CC_PASSENGERS) ? FACIL_BUS_STOP : FACIL_TRUCK_STOP)) { + return ZONING_INVALID_SPRITE_ID; + } + } + for (uint i = 0; i < lengthof(ind->accepts_cargo); i++) { + if (ind->accepts_cargo[i] != CT_INVALID && st->facilities & (IsCargoInClass(ind->accepts_cargo[i], CC_PASSENGERS) ? FACIL_BUS_STOP : FACIL_TRUCK_STOP)) { + return ZONING_INVALID_SPRITE_ID; + } + } + } } }