Game.Policies.PolicyFlags
Assembly: Assembly-CSharp
Namespace: Game.Policies
Type: enum (with [Flags] attribute)
Base: System.Enum (underlying type: byte)
Summary:
PolicyFlags is a small bitmask enum used to represent state flags for game policies. It is decorated with [Flags] and uses a byte as the underlying storage type for compactness. Currently it defines a single flag, Active, which indicates that a policy is enabled/active. The [Flags] attribute allows additional flags to be added later and enables standard bitwise operations.
Fields
Active = 1
Indicates the policy is active/enabled. As a bit flag, it can be combined with other flags (if added) using bitwise operators.
Properties
None
This enum type exposes no properties.
Constructors
None
Enums do not declare explicit constructors in C#. Instances are created by assigning one of the defined enum values or by casting from the underlying byte.
Methods
None
No methods are defined on this enum type. Use standard enum/bitwise operations (|, &, ^, ~) or Enum helper methods (Enum.HasFlag, casting) as needed.
Usage Example
// Mark a policy as active
PolicyFlags flags = PolicyFlags.Active;
// Check if active (recommended: bitwise check for performance)
bool isActive = (flags & PolicyFlags.Active) != 0;
// Alternatively (less performant for simple bit checks)
bool isActiveViaHasFlag = flags.HasFlag(PolicyFlags.Active);
// Store/retrieve raw byte value
byte raw = (byte)flags;
PolicyFlags fromRaw = (PolicyFlags)raw;