diff --git a/src/script/api/game_changelog.hpp b/src/script/api/game_changelog.hpp index 889ff028a0..4f7565bc51 100644 --- a/src/script/api/game_changelog.hpp +++ b/src/script/api/game_changelog.hpp @@ -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. diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index 6ee7bcc5d3..9d1b452d7e 100644 --- a/src/script/api/script_company.cpp +++ b/src/script/api/script_company.cpp @@ -40,6 +40,7 @@ /* static */ bool ScriptCompany::IsMine(ScriptCompany::CompanyID company) { + EnforceCompanyModeValid(false); return ResolveCompanyID(company) == ResolveCompanyID(COMPANY_SELF); } diff --git a/src/script/api/script_company.hpp b/src/script/api/script_company.hpp index c96e7216ca..cfb6cabf94 100644 --- a/src/script/api/script_company.hpp +++ b/src/script/api/script_company.hpp @@ -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);