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

This commit is contained in:
rubidium
2009-06-16 13:52:18 +00:00
parent ee96d737b2
commit 8ca2ccc456
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.
*/