diff options
author | alberth <alberth@openttd.org> | 2012-07-15 17:05:17 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2012-07-15 17:05:17 +0000 |
commit | 1d11291071d41712b61983f195f1ba21d9c7ebcb (patch) | |
tree | 90cad3481e2c441d9bd01d7b8e78787c0b11705a /src/economy.cpp | |
parent | 6821f5cd22bb312ff8b51c08ba67d5fc615c80fc (diff) | |
download | openttd-1d11291071d41712b61983f195f1ba21d9c7ebcb.tar.xz |
(svn r24404) -Add: Data structures for cargo transport monitoring.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 66972b862..1e140008a 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -44,6 +44,7 @@ #include "core/backup_type.hpp" #include "water.h" #include "game/game.hpp" +#include "cargomonitor.h" #include "table/strings.h" #include "table/pricebase.h" @@ -1027,6 +1028,9 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti /* Determine profit */ Money profit = GetTransportedGoodsIncome(accepted, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type); + /* Update the cargo monitor. */ + AddCargoDelivery(cargo_type, company->index, accepted, src_type, src, st); + /* Modify profit if a subsidy is in effect */ if (CheckSubsidised(cargo_type, company->index, src_type, src, st)) { switch (_settings_game.difficulty.subsidy_multiplier) { |