diff options
Diffstat (limited to 'src/script/api/script_engine.hpp')
-rw-r--r-- | src/script/api/script_engine.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/script/api/script_engine.hpp b/src/script/api/script_engine.hpp index 4a570fb9c..f6bdbedbf 100644 --- a/src/script/api/script_engine.hpp +++ b/src/script/api/script_engine.hpp @@ -287,6 +287,29 @@ public: * @see ScriptOrder::GetOrderDistance */ static uint GetMaximumOrderDistance(EngineID engine_id); + + /** + * Allows a company to use an engine before its intro date or after retirement. + * @param engine_id The engine to enable. + * @param company_id The company to allow using the engine. + * @pre IsValidEngine(engine_id). + * @pre ScriptCompany.ResolveCompanyID(company_id) != ScriptCompany::COMPANY_INVALID. + * @return True if the action succeeded. + * @api -ai + */ + static bool EnableForCompany(EngineID engine_id, ScriptCompany::CompanyID company_id); + + /** + * Forbids a company to use an engine before its natural retirement. + * @param engine_id The engine to disable. + * @param company_id The company to forbid using the engine. + * @pre IsValidEngine(engine_id). + * @pre ScriptCompany.ResolveCompanyID(company_id) != ScriptCompany::COMPANY_INVALID. + * @return True if the action succeeded. + * @api -ai + */ + static bool DisableForCompany(EngineID engine_id, ScriptCompany::CompanyID company_id); + }; #endif /* SCRIPT_ENGINE_HPP */ |