(svn r16673) -Codechange: rename GetProducedCargo() to AddProducedCargo() and change its behaviour accordingly
This commit is contained in:
@@ -868,12 +868,14 @@ static TrackStatus GetTileTrackStatus_Industry(TileIndex tile, TransportType mod
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void GetProducedCargo_Industry(TileIndex tile, CargoID *b)
|
||||
static void AddProducedCargo_Industry(TileIndex tile, AcceptedCargo ac)
|
||||
{
|
||||
const Industry *i = GetIndustryByTile(tile);
|
||||
|
||||
b[0] = i->produced_cargo[0];
|
||||
b[1] = i->produced_cargo[1];
|
||||
for (uint j = 0; j < lengthof(i->produced_cargo); j++) {
|
||||
CargoID cargo = i->produced_cargo[j];
|
||||
if (cargo != CT_INVALID) ac[cargo]++;
|
||||
}
|
||||
}
|
||||
|
||||
static void ChangeTileOwner_Industry(TileIndex tile, Owner old_owner, Owner new_owner)
|
||||
@@ -2417,7 +2419,7 @@ extern const TileTypeProcs _tile_type_industry_procs = {
|
||||
AnimateTile_Industry, // animate_tile_proc
|
||||
TileLoop_Industry, // tile_loop_proc
|
||||
ChangeTileOwner_Industry, // change_tile_owner_proc
|
||||
GetProducedCargo_Industry, // get_produced_cargo_proc
|
||||
AddProducedCargo_Industry, // add_produced_cargo_proc
|
||||
NULL, // vehicle_enter_tile_proc
|
||||
GetFoundation_Industry, // get_foundation_proc
|
||||
TerraformTile_Industry, // terraform_tile_proc
|
||||
|
Reference in New Issue
Block a user