diff options
author | frosch <frosch@openttd.org> | 2008-04-08 15:48:32 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-04-08 15:48:32 +0000 |
commit | b91781b715272c0248b766d4e92da812a3c203ee (patch) | |
tree | aa0aa02603f911329fcc1e70972dd58ae153c69a /src/vehicle_base.h | |
parent | 4267797cc8f7ee669122c22efeb5a6014644689f (diff) | |
download | openttd-b91781b715272c0248b766d4e92da812a3c203ee.tar.xz |
(svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r-- | src/vehicle_base.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 2aaba064a..bd57e99c1 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -490,6 +490,21 @@ public: bool NeedsAutorenewing(const Player *p) const; /** + * Check if the vehicle needs to go to a depot in near future (if a opportunity presents itself) for service or replacement. + * + * @see NeedsAutomaticServicing() + * @return true if the vehicle should go to a depot if a opportunity presents itself. + */ + bool NeedsServicing() const; + + /** + * Checks if the current order should be interupted for a service-in-depot-order. + * @see NeedsServicing() + * @return true if the current order should be interupted. + */ + bool NeedsAutomaticServicing() const; + + /** * Determine the location for the station where the vehicle goes to next. * Things done for example are allocating slots in a road stop or exact * location of the platform is determined for ships. |