mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 20:54:08 +01:00
Codechange: Use EnumBitSet for GroupFlags.
This commit is contained in:
committed by
Peter Nelson
parent
4b573b2703
commit
5ef495da78
@@ -98,14 +98,14 @@
|
||||
EnforceCompanyModeValid(false);
|
||||
EnforcePrecondition(false, IsValidGroup(group_id));
|
||||
|
||||
return ScriptObject::Command<CMD_SET_GROUP_FLAG>::Do(group_id, GroupFlags::ReplaceProtection, enable, false);
|
||||
return ScriptObject::Command<CMD_SET_GROUP_FLAG>::Do(group_id, GroupFlag::ReplaceProtection, enable, false);
|
||||
}
|
||||
|
||||
/* static */ bool ScriptGroup::GetAutoReplaceProtection(GroupID group_id)
|
||||
{
|
||||
if (!IsValidGroup(group_id)) return false;
|
||||
|
||||
return HasFlag(::Group::Get(group_id)->flags, GroupFlags::ReplaceProtection);
|
||||
return ::Group::Get(group_id)->flags.Test(GroupFlag::ReplaceProtection);
|
||||
}
|
||||
|
||||
/* static */ SQInteger ScriptGroup::GetNumEngines(GroupID group_id, EngineID engine_id)
|
||||
|
||||
Reference in New Issue
Block a user