diff options
author | smatz <smatz@openttd.org> | 2009-06-27 17:05:20 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-27 17:05:20 +0000 |
commit | 50b5678e267d371c9c69195966b60ce903bfbe46 (patch) | |
tree | 5f5b144a504cc9537b7073a88d66a38159b32393 /src/station_cmd.cpp | |
parent | 996e5eea471f740428f2878884363521200d6ca1 (diff) | |
download | openttd-50b5678e267d371c9c69195966b60ce903bfbe46.tar.xz |
(svn r16673) -Codechange: rename GetProducedCargo() to AddProducedCargo() and change its behaviour accordingly
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 080ded56b..033eb3f45 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -465,19 +465,7 @@ void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, for (int yc = y1; yc != y2; yc++) { for (int xc = x1; xc != x2; xc++) { 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[256]; // Required for CBID_HOUSE_PRODUCE_CARGO. - memset(cargos, CT_INVALID, sizeof(cargos)); - - gpc(tile, cargos); - for (uint i = 0; i < lengthof(cargos); ++i) { - if (cargos[i] != CT_INVALID) produced[cargos[i]]++; - } - } - } + AddProducedCargo(tile, produced); } } } @@ -3156,7 +3144,7 @@ extern const TileTypeProcs _tile_type_station_procs = { AnimateTile_Station, // animate_tile_proc TileLoop_Station, // tile_loop_clear ChangeTileOwner_Station, // change_tile_owner_clear - NULL, // get_produced_cargo_proc + NULL, // add_produced_cargo_proc VehicleEnter_Station, // vehicle_enter_tile_proc GetFoundation_Station, // get_foundation_proc TerraformTile_Station, // terraform_tile_proc |