From 96700d560560215ec24d283d774f7dbaa11c384c Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 8 Apr 2008 15:48:32 +0000 Subject: (svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing(). -Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders. --- src/vehicle_base.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/vehicle_base.h') 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 @@ -489,6 +489,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 -- cgit v1.2.3-54-g00ecf