diff options
author | smatz <smatz@openttd.org> | 2009-06-25 19:23:09 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-25 19:23:09 +0000 |
commit | c30a87758fca7b0203b36b886aaa360f383f9278 (patch) | |
tree | 335422881e40cf333948e202c7f474eda030ad43 /src/industry_cmd.cpp | |
parent | 103bff508bf4ddfc2018a1ee487742b5f6401568 (diff) | |
download | openttd-c30a87758fca7b0203b36b886aaa360f383f9278.tar.xz |
(svn r16659) -Codechange: rename GetAcceptedCargo() to AddAcceptedCargo() and change its behaviour accordingly
-Codechange: remove dummy GetAcceptedCargo_*() handlers
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 0d93e8c23..c97215259 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -354,7 +354,7 @@ static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh) return FlatteningFoundation(tileh); } -static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac) +static void AddAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac) { IndustryGfx gfx = GetIndustryGfx(tile); const IndustryTileSpec *itspec = GetIndustryTileSpec(gfx); @@ -385,8 +385,7 @@ static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac) for (byte i = 0; i < lengthof(itspec->accepts_cargo); i++) { CargoID a = accepts_cargo[i]; - /* Only set the value once. */ - if (a != CT_INVALID && ac[a] == 0) ac[a] = acceptance[i]; + if (a != CT_INVALID) ac[a] += acceptance[i]; } } @@ -2385,7 +2384,7 @@ extern const TileTypeProcs _tile_type_industry_procs = { DrawTile_Industry, // draw_tile_proc GetSlopeZ_Industry, // get_slope_z_proc ClearTile_Industry, // clear_tile_proc - GetAcceptedCargo_Industry, // get_accepted_cargo_proc + AddAcceptedCargo_Industry, // add_accepted_cargo_proc GetTileDesc_Industry, // get_tile_desc_proc GetTileTrackStatus_Industry, // get_tile_track_status_proc ClickTile_Industry, // click_tile_proc |