diff options
author | rubidium <rubidium@openttd.org> | 2007-08-29 21:27:16 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-29 21:27:16 +0000 |
commit | dc8019575404425b52abc121c6bd9159596fee87 (patch) | |
tree | c750fba2dc3e7efcc74cbccf329c29e874b3102e /src/aircraft.h | |
parent | fff12fd22e6e526c7a8259606bb9235f1ed97e06 (diff) | |
download | openttd-dc8019575404425b52abc121c6bd9159596fee87.tar.xz |
(svn r10999) -Codechange: unify the way the running cost of a vehicle is determined. Patch by nycom.
Diffstat (limited to 'src/aircraft.h')
-rw-r--r-- | src/aircraft.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/aircraft.h b/src/aircraft.h index 0a32703e2..15a5530e0 100644 --- a/src/aircraft.h +++ b/src/aircraft.h @@ -7,6 +7,8 @@ #include "station_map.h" #include "vehicle.h" +#include "engine.h" +#include "variables.h" /** An aircraft can be one ot those types */ enum AircraftSubType { @@ -130,6 +132,7 @@ struct Aircraft : public Vehicle { int GetImage(Direction direction) const; int GetDisplaySpeed() const { return this->cur_speed * 10 / 16; } int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 16; } + Money GetRunningCost() const { return AircraftVehInfo(this->engine_type)->running_cost * _price.aircraft_running; } void Tick(); }; |