Game.Prefabs.ZoneFlags
Assembly:
{{ Likely defined in the game's main assembly for prefabs (e.g., Game.dll). If you have your project's assembly name, replace this accordingly. }}
Namespace: Game.Prefabs
Type: enum (flags)
Base: System.Enum (underlying type: System.Byte)
Summary:
{{ ZoneFlags is a [Flags] enum used to describe supported zoning features for a prefab/zone shape. Each value is a single bit (underlying byte), so they can be combined using bitwise operations to represent multiple supported features at once. Typical uses include checking whether a prefab supports narrow zoning, corner shapes, or is marked as office zoning. }}
Fields
-
SupportNarrow = 1
{{ Indicates the prefab/zone supports a narrow variant (e.g., narrow road zoning or narrow lot layout). }} -
SupportLeftCorner = 2
{{ Indicates support for a left-corner shape/configuration. }} -
SupportRightCorner = 4
{{ Indicates support for a right-corner shape/configuration. }} -
Office = 8
{{ Marks the prefab/zone as an office type or indicates special handling for office zoning. }}
Properties
{{ None defined on this enum. Use bitwise operations or Enum.HasFlag to inspect values at runtime. }}
Constructors
{{ Enums do not define constructors in source; the compiler provides the underlying value semantics. The underlying storage here is a byte. }}
Methods
{{ No methods are declared on this enum. Use standard Enum and bitwise operations (|, &, ~) or Enum.HasFlag to work with values. }}
Usage Example
// Combine flags
ZoneFlags flags = ZoneFlags.SupportNarrow | ZoneFlags.SupportLeftCorner;
// Check a flag using HasFlag
bool supportsLeft = flags.HasFlag(ZoneFlags.SupportLeftCorner);
// Or check with bitwise AND (faster than HasFlag)
bool supportsRight = (flags & ZoneFlags.SupportRightCorner) != 0;
// Add a flag
flags |= ZoneFlags.Office;
// Remove a flag
flags &= (ZoneFlags)~ZoneFlags.SupportNarrow;
{{ YOUR_INFO }}