summaryrefslogtreecommitdiff
path: root/src/vehicle_base.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-04-08 15:48:32 +0000
committerfrosch <frosch@openttd.org>2008-04-08 15:48:32 +0000
commit96700d560560215ec24d283d774f7dbaa11c384c (patch)
treeaa0aa02603f911329fcc1e70972dd58ae153c69a /src/vehicle_base.h
parent71a2dd21fd7cb180022ce10793bbbf144d499bdd (diff)
downloadopenttd-96700d560560215ec24d283d774f7dbaa11c384c.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.h15
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.