|
OpenTTD NoAI API
|
Class that handles all subsidy related functions. More...
Public Types | |
| enum | SubsidyParticipantType { SPT_INDUSTRY = 0, SPT_TOWN = 1, SPT_INVALID = 0xFF } |
| Enumeration for source and destination of a subsidy. More... | |
Static Public Member Functions | |
| static bool | IsValidSubsidy (SubsidyID subsidy_id) |
| Check whether this is a valid SubsidyID. | |
| static bool | IsAwarded (SubsidyID subsidy_id) |
| Checks whether this subsidy is already awarded to some company. | |
| static AICompany::CompanyID | GetAwardedTo (SubsidyID subsidy_id) |
| Get the company index of the company this subsidy is awarded to. | |
| static int32 | GetExpireDate (SubsidyID subsidy_id) |
| Get the date this subsidy expires. | |
| static CargoID | GetCargoType (SubsidyID subsidy_id) |
| Get the cargo type that has to be transported in order to be awarded this subsidy. | |
| static SubsidyParticipantType | GetSourceType (SubsidyID subsidy_id) |
| Returns the type of source of subsidy. | |
| static int32 | GetSourceIndex (SubsidyID subsidy_id) |
| Return the source IndustryID/TownID the subsidy is for. | |
| static SubsidyParticipantType | GetDestinationType (SubsidyID subsidy_id) |
| Returns the type of destination of subsidy. | |
| static int32 | GetDestinationIndex (SubsidyID subsidy_id) |
| Return the destination IndustryID/TownID the subsidy is for. | |
Class that handles all subsidy related functions.
| static AICompany::CompanyID AISubsidy::GetAwardedTo | ( | SubsidyID | subsidy_id | ) | [static] |
Get the company index of the company this subsidy is awarded to.
| subsidy_id | The SubsidyID to check. |
Get the cargo type that has to be transported in order to be awarded this subsidy.
| subsidy_id | The SubsidyID to check. |
| static int32 AISubsidy::GetDestinationIndex | ( | SubsidyID | subsidy_id | ) | [static] |
Return the destination IndustryID/TownID the subsidy is for.
| subsidy_id | the SubsidyID to check. |
| static SubsidyParticipantType AISubsidy::GetDestinationType | ( | SubsidyID | subsidy_id | ) | [static] |
Returns the type of destination of subsidy.
| subsidy_id | The SubsidyID to check. |
| static int32 AISubsidy::GetExpireDate | ( | SubsidyID | subsidy_id | ) | [static] |
Get the date this subsidy expires.
In case the subsidy is already awarded, return the date the subsidy expires, else, return the date the offer expires.
| subsidy_id | The SubsidyID to check. |
| static int32 AISubsidy::GetSourceIndex | ( | SubsidyID | subsidy_id | ) | [static] |
Return the source IndustryID/TownID the subsidy is for.
| subsidy_id | The SubsidyID to check. |
| static SubsidyParticipantType AISubsidy::GetSourceType | ( | SubsidyID | subsidy_id | ) | [static] |
Returns the type of source of subsidy.
| subsidy_id | The SubsidyID to check. |
| static bool AISubsidy::IsAwarded | ( | SubsidyID | subsidy_id | ) | [static] |
Checks whether this subsidy is already awarded to some company.
| subsidy_id | The SubsidyID to check. |
| static bool AISubsidy::IsValidSubsidy | ( | SubsidyID | subsidy_id | ) | [static] |
Check whether this is a valid SubsidyID.
| subsidy_id | The SubsidyID to check. |
1.7.5