Codechange: use GSCompanyMode::IsValid, IsDeity, and the precondition helpers
Direct 1:1 replacements in the code, and comments now refer to either GSCompanyMode::IsValid or GSCompanyMode::IsDeity instead of several variations on "company mode active" or "no company mode active".
This commit is contained in:
@@ -250,7 +250,7 @@
|
||||
|
||||
/* static */ bool ScriptIndustry::SetControlFlags(IndustryID industry_id, SQInteger control_flags)
|
||||
{
|
||||
if (ScriptObject::GetCompany() != OWNER_DEITY) return false;
|
||||
EnforceDeityMode(false);
|
||||
if (!IsValidIndustry(industry_id)) return false;
|
||||
|
||||
return ScriptObject::Command<CMD_INDUSTRY_SET_FLAGS>::Do(industry_id, (::IndustryControlFlags)control_flags & ::INDCTL_MASK);
|
||||
|
Reference in New Issue
Block a user