1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 17:49:10 +00:00

(svn r16581) -Codechange: unify the access to Engine::lifelength.

This commit is contained in:
rubidium
2009-06-16 13:52:18 +00:00
parent 4b05617c42
commit 512b021e26
8 changed files with 17 additions and 6 deletions

View File

@@ -315,6 +315,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.
*/