(svn r8978) -Feature: Rewrite of transfer system.

This major feature-fix keeps track of the value of transfers offloaded at a station, and hands on to a loading vehicle a credit note proportionate to the cargo loaded. The transferring vehicle is paid only for the distance it has travelled. eg. B-C in a transfer chain A-B-C-D.
When the final cargo is delivered, these credit notes are cashed, and the final vehicle is paid for A-D minus any credit notes it is carrying. The company bank balance increases by the value of the A-D route.
You still need to set up a profitable route; it is still easy to make a loss on transfers by bad planning. :)
This commit is contained in:
richk
2007-03-02 18:49:11 +00:00
parent 0961e1bc56
commit d11e36e477
11 changed files with 110 additions and 46 deletions

View File

@@ -3053,6 +3053,8 @@ extern const SaveLoad _common_veh_desc[] = {
SLE_VAR(Vehicle, profit_this_year, SLE_INT32),
SLE_VAR(Vehicle, profit_last_year, SLE_INT32),
SLE_CONDVAR(Vehicle, cargo_feeder_share, SLE_INT32, 51, SL_MAX_VERSION),
SLE_CONDVAR(Vehicle, cargo_loaded_at_xy, SLE_UINT32, 51, SL_MAX_VERSION),
SLE_VAR(Vehicle, value, SLE_UINT32),
SLE_VAR(Vehicle, random_bits, SLE_UINT8),