#include <economy_base.h>
Public Member Functions | |
CargoPayment () | |
Constructor for pool saveload. | |
CargoPayment (Vehicle *front) | |
Makes us a new cargo payment helper. | |
void | PayTransfer (CargoPacket *cp, uint count) |
Handle payment for transfer of the given cargo packet. | |
void | PayFinalDelivery (CargoPacket *cp, uint count) |
Handle payment for final delivery of the given cargo packet. | |
void | SetCargo (CargoID ct) |
Sets the currently handled cargo type. | |
bool | IsValid () const |
Data Fields | |
Vehicle * | front |
The front vehicle to do the payment of. | |
Money | route_profit |
The amount of money to add/remove from the bank account. | |
Money | visual_profit |
The visual profit to show. | |
Company * | owner |
The owner of the vehicle. | |
StationID | current_station |
The current station. | |
CargoID | ct |
The currently handled cargo type. |
Definition at line 15 of file economy_base.h.
CargoPayment::CargoPayment | ( | Vehicle * | front | ) |
Makes us a new cargo payment helper.
front | The front of the train | |
destinations | List to add the destinations of 'our' cargo to |
Definition at line 1455 of file economy.cpp.
void CargoPayment::PayTransfer | ( | CargoPacket * | cp, | |
uint | count | |||
) |
Handle payment for transfer of the given cargo packet.
cp | The cargo packet to pay for. | |
count | The number of packets to pay for. |
Definition at line 1517 of file economy.cpp.
References current_station, CargoPacket::days_in_transit, DistanceManhattan(), CargoPacket::feeder_share, CargoPacket::loaded_at_xy, and visual_profit.
Referenced by CargoList::MoveTo().
void CargoPayment::PayFinalDelivery | ( | CargoPacket * | cp, | |
uint | count | |||
) |
Handle payment for final delivery of the given cargo packet.
cp | The cargo packet to pay for. | |
count | The number of packets to pay for. |
Definition at line 1498 of file economy.cpp.
References ct, CargoPacket::days_in_transit, DeliverGoods(), CargoPacket::feeder_share, front, route_profit, CargoPacket::source, CargoPacket::source_xy, and visual_profit.
Referenced by CargoList::MoveTo().
void CargoPayment::SetCargo | ( | CargoID | ct | ) | [inline] |
Sets the currently handled cargo type.
ct | the cargo type to handle from now on. |
Definition at line 37 of file economy_base.h.
Referenced by LoadUnloadVehicle().