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:
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user