From d11e36e477c9a3e7cf56cbc943b8310c2daa677d Mon Sep 17 00:00:00 2001 From: richk Date: Fri, 2 Mar 2007 18:49:11 +0000 Subject: (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. :) --- src/station.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/station.h') diff --git a/src/station.h b/src/station.h index d800c24ab..4cadcd89d 100644 --- a/src/station.h +++ b/src/station.h @@ -15,6 +15,7 @@ static const StationID INVALID_STATION = 0xFFFF; typedef struct GoodsEntry { GoodsEntry() : waiting_acceptance(0), + unload_pending(0), days_since_pickup(0), rating(175), enroute_from(INVALID_STATION), @@ -25,6 +26,7 @@ typedef struct GoodsEntry { {} uint16 waiting_acceptance; + uint16 unload_pending; ///< records how much cargo is awaiting transfer during gradual loading to allow correct fee calc byte days_since_pickup; byte rating; StationID enroute_from; -- cgit v1.2.3-54-g00ecf