Update: Translations from eints
[openttd-github.git] / src / economy_base.h
blob2878d9fa89c8715c7fc90e2f82a487438d2d0161
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file economy_base.h Base classes related to the economy. */
10 #ifndef ECONOMY_BASE_H
11 #define ECONOMY_BASE_H
13 #include "cargopacket.h"
14 #include "company_type.h"
16 /** Type of pool to store cargo payments in; little over 1 million. */
17 typedef Pool<CargoPayment, CargoPaymentID, 512, 0xFF000> CargoPaymentPool;
18 /** The actual pool to store cargo payments in. */
19 extern CargoPaymentPool _cargo_payment_pool;
21 /**
22 * Helper class to perform the cargo payment.
24 struct CargoPayment : CargoPaymentPool::PoolItem<&_cargo_payment_pool> {
25 /* CargoPaymentID index member of CargoPaymentPool is 4 bytes. */
26 StationID current_station; ///< NOSAVE: The current station
27 Company *owner; ///< NOSAVE: The owner of the vehicle
29 Vehicle *front; ///< The front vehicle to do the payment of
30 Money route_profit; ///< The amount of money to add/remove from the bank account
31 Money visual_profit; ///< The visual profit to show
32 Money visual_transfer; ///< The transfer credits to be shown
34 /** Constructor for pool saveload */
35 CargoPayment() {}
36 CargoPayment(Vehicle *front);
37 ~CargoPayment();
39 Money PayTransfer(CargoID cargo, const CargoPacket *cp, uint count, TileIndex current_tile);
40 void PayFinalDelivery(CargoID cargo, const CargoPacket *cp, uint count, TileIndex current_tile);
43 #endif /* ECONOMY_BASE_H */