(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.

This commit is contained in:
rubidium
2007-06-22 11:58:59 +00:00
parent 6159f58948
commit e5c352818d
31 changed files with 947 additions and 319 deletions

View File

@@ -12,34 +12,26 @@
#include "tile.h"
#include "road.h"
#include "newgrf_station.h"
#include "cargopacket.h"
#include <list>
static const StationID INVALID_STATION = 0xFFFF;
static const byte INITIAL_STATION_RATING = 175;
struct GoodsEntry {
GoodsEntry() :
waiting_acceptance(0),
unload_pending(0),
acceptance(false),
days_since_pickup(0),
rating(INITIAL_STATION_RATING),
enroute_from(INVALID_STATION),
enroute_from_xy(INVALID_TILE),
last_speed(0),
last_age(255),
feeder_profit(0)
last_age(255)
{}
uint16 waiting_acceptance;
uint16 unload_pending; ///< records how much cargo is awaiting transfer during gradual loading to allow correct fee calc
bool acceptance;
byte days_since_pickup;
byte rating;
StationID enroute_from;
TileIndex enroute_from_xy;
byte enroute_time;
byte last_speed;
byte last_age;
Money feeder_profit;
CargoList cargo; ///< The cargo packets of cargo waiting in this station
};
/** A Stop for a Road Vehicle */