OpenTTD AI API
20241117-master-ga6c526cfa0
|
Class that handles all subsidy related functions. More...
Public Types | |
enum | SubsidyParticipantType { out , SPT_INDUSTRY , SPT_TOWN , SPT_INVALID } |
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. More... | |
static bool | IsAwarded (SubsidyID subsidy_id) |
Checks whether this subsidy is already awarded to some company. More... | |
static AICompany::CompanyID | GetAwardedTo (SubsidyID subsidy_id) |
Get the company index of the company this subsidy is awarded to. More... | |
static AIDate::Date | GetExpireDate (SubsidyID subsidy_id) |
Get the economy-date this subsidy expires. More... | |
static CargoID | GetCargoType (SubsidyID subsidy_id) |
Get the cargo type that has to be transported in order to be awarded this subsidy. More... | |
static SubsidyParticipantType | GetSourceType (SubsidyID subsidy_id) |
Returns the type of source of subsidy. More... | |
static int | GetSourceIndex (SubsidyID subsidy_id) |
Return the source IndustryID/TownID the subsidy is for. More... | |
static SubsidyParticipantType | GetDestinationType (SubsidyID subsidy_id) |
Returns the type of destination of subsidy. More... | |
static int | GetDestinationIndex (SubsidyID subsidy_id) |
Return the destination IndustryID/TownID the subsidy is for. More... | |
Class that handles all subsidy related functions.
|
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 |
Return the destination IndustryID/TownID the subsidy is for.
subsidy_id | the SubsidyID to check. |
|
static |
Returns the type of destination of subsidy.
subsidy_id | The SubsidyID to check. |
|
static |
Get the economy-date this subsidy expires.
In case the subsidy is already awarded, return the economy-date the subsidy expires, else, return the economy-date the offer expires.
subsidy_id | The SubsidyID to check. |
|
static |
Return the source IndustryID/TownID the subsidy is for.
subsidy_id | The SubsidyID to check. |
|
static |
Returns the type of source of subsidy.
subsidy_id | The SubsidyID to check. |
|
static |
Checks whether this subsidy is already awarded to some company.
subsidy_id | The SubsidyID to check. |
|
static |
Check whether this is a valid SubsidyID.
subsidy_id | The SubsidyID to check. |