Add: deity mode enforcement checks to functions with command or company access
Command functions are those that call ScriptObject::Command, and functions with company access are any that call ScriptObject::GetCompany. This is a bit over-protective, but having the check everywhere makes it easier to validate that no check is missing automatically instead of by review.
This commit is contained in:
@@ -62,6 +62,7 @@ public:
|
||||
* @pre text != null.
|
||||
* @pre company == COMPANY_INVALID || ResolveCompanyID(company) != COMPANY_INVALID.
|
||||
* @pre The \a reference condition must be fulfilled.
|
||||
* @pre ScriptCompanyMode::IsDeity().
|
||||
*/
|
||||
static bool Create(NewsType type, Text *text, ScriptCompany::CompanyID company, NewsReferenceType ref_type, SQInteger reference);
|
||||
};
|
||||
|
Reference in New Issue
Block a user