summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index bc0fb8a52..a9ad89db5 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -316,6 +316,16 @@ uint Engine::GetDisplayMaxTractiveEffort() const
}
/**
+ * Returns the vehicle's life length in days.
+ * @return the life length
+ */
+Date Engine::GetLifeLengthInDays() const
+{
+ /* Assume leap years; this gives the player a bit more than the given amount of years, but never less. */
+ return this->lifelength * DAYS_IN_LEAP_YEAR;
+}
+
+/**
* Initializes the EngineOverrideManager with the default engines.
*/
void EngineOverrideManager::ResetToDefaultMapping()