(svn r12596) -Feature: show what cargos a station could be supplied with. Patch by Roujin.

This commit is contained in:
rubidium
2008-04-06 22:32:20 +00:00
parent 949762fc65
commit bd432258cb
9 changed files with 68 additions and 20 deletions

View File

@@ -465,12 +465,13 @@ void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile,
for (int yc = y1; yc != y2; yc++) {
for (int xc = x1; xc != x2; xc++) {
if (!(IsInsideBS(xc, x, w) && IsInsideBS(yc, y, h))) {
TileIndex tile = TileXY(xc, yc);
TileIndex tile = TileXY(xc, yc);
if (!IsTileType(tile, MP_STATION)) {
GetProducedCargoProc *gpc = _tile_type_procs[GetTileType(tile)]->get_produced_cargo_proc;
if (gpc != NULL) {
CargoID cargos[2] = { CT_INVALID, CT_INVALID };
CargoID cargos[256]; // Required for CBID_HOUSE_PRODUCE_CARGO.
memset(cargos, CT_INVALID, 256);
gpc(tile, cargos);
for (uint i = 0; i < lengthof(cargos); ++i) {