(svn r16877) -Codechange: use Subsidy::IsAwarded() instead of testing subsidy's age
This commit is contained in:
@@ -17,6 +17,15 @@ struct Subsidy {
|
||||
uint16 from; ///< Index of source. Either TownID, IndustryID or StationID, when awarded
|
||||
uint16 to; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded
|
||||
|
||||
/**
|
||||
* Tests whether this subsidy has been awarded to someone
|
||||
* @return is this subsidy awarded?
|
||||
*/
|
||||
FORCEINLINE bool IsAwarded() const
|
||||
{
|
||||
return this->age >= 12;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines index of this subsidy
|
||||
* @return index (in the Subsidy::array array)
|
||||
|
||||
Reference in New Issue
Block a user