mirror of https://github.com/OpenTTD/OpenTTD
Change: Allow GS access to more ScriptCompany functions
parent
8b1960a41c
commit
fd26a44c9e
|
@ -39,6 +39,11 @@
|
|||
* \li GSOrder::CopyOrders
|
||||
* \li GSOrder::ShareOrders
|
||||
* \li GSOrder::UnshareOrders
|
||||
* \li GSCompany::IsMine
|
||||
* \li GSCompany::SetPresidentGender
|
||||
* \li GSCompany::SetAutoRenewStatus
|
||||
* \li GSCompany::SetAutoRenewMonths
|
||||
* \li GSCompany::SetAutoRenewMoney
|
||||
*
|
||||
* API removals:
|
||||
* \li GSError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, that error is never returned anymore.
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
/* static */ bool ScriptCompany::IsMine(ScriptCompany::CompanyID company)
|
||||
{
|
||||
EnforceCompanyModeValid(false);
|
||||
return ResolveCompanyID(company) == ResolveCompanyID(COMPANY_SELF);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,8 +129,8 @@ public:
|
|||
/**
|
||||
* Check if a CompanyID is your CompanyID, to ease up checks.
|
||||
* @param company The company index to check.
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return True if and only if this company is your CompanyID.
|
||||
* @api -game
|
||||
*/
|
||||
static bool IsMine(CompanyID company);
|
||||
|
||||
|
@ -177,7 +177,6 @@ public:
|
|||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return True if the gender was changed.
|
||||
* @note When successful a random face will be created.
|
||||
* @api -game
|
||||
*/
|
||||
static bool SetPresidentGender(Gender gender);
|
||||
|
||||
|
@ -338,7 +337,6 @@ public:
|
|||
* @param autorenew The new autorenew status.
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return True if autorenew status has been modified.
|
||||
* @api -game
|
||||
*/
|
||||
static bool SetAutoRenewStatus(bool autorenew);
|
||||
|
||||
|
@ -356,7 +354,6 @@ public:
|
|||
* The value will be clamped to MIN(int16) .. MAX(int16).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return True if autorenew months has been modified.
|
||||
* @api -game
|
||||
*/
|
||||
static bool SetAutoRenewMonths(SQInteger months);
|
||||
|
||||
|
@ -375,7 +372,6 @@ public:
|
|||
* @return True if autorenew money has been modified.
|
||||
* @pre money >= 0
|
||||
* @pre money < 2**32
|
||||
* @api -game
|
||||
*/
|
||||
static bool SetAutoRenewMoney(Money money);
|
||||
|
||||
|
|
Loading…
Reference in New Issue