Skip to content

Game.Buildings.FirewatchTowerFlags

Assembly: Assembly-CSharp
Namespace: Game.Buildings

Type: public enum (flags)

Base: System.Enum (underlying type: byte)

Summary: A small flags enum used by the game's building systems to represent boolean state(s) for Firewatch Tower buildings. The enum is marked with the [Flags] attribute and uses a byte as its underlying storage type. Currently it contains a single flag indicating whether the tower provides coverage; the design allows adding more bitwise flags in the future (values 2, 4, 8, ...).


Fields

  • HasCoverage = 1
    Indicates that the firewatch tower currently provides coverage (e.g., it is active, staffed, or otherwise contributing to the coverage system). As a flag value this occupies the lowest bit (0x01).

(As a flags enum, additional values can be combined with bitwise operations. Example future values would be 2, 4, 8, etc.)

Properties

  • None declared on the enum type itself.
    (The enum members are simple constant values; use bitwise operations or Enum methods to query them.)

Constructors

  • None declared (enums have implicit constructors provided by the runtime).

Methods

  • None declared on this enum.
    (You can use standard System.Enum helpers such as Enum.HasFlag, Enum.ToString, or bitwise operations to manipulate/check values.)

Usage Example

using Game.Buildings;

// Example: storing flags for a tower
FirewatchTowerFlags flags = 0;

// Set the HasCoverage flag
flags |= FirewatchTowerFlags.HasCoverage;

// Check the flag (fast bitwise check)
bool hasCoverage = (flags & FirewatchTowerFlags.HasCoverage) != 0;

// Clear the flag
flags &= (FirewatchTowerFlags)~FirewatchTowerFlags.HasCoverage;

// Toggle the flag
flags ^= FirewatchTowerFlags.HasCoverage;

// Alternative: using HasFlag (slower but expressive)
bool hasCoverageAlt = flags.HasFlag(FirewatchTowerFlags.HasCoverage);

// If storing in a compact structure or serializing, cast to byte
byte storedValue = (byte)flags;
flags = (FirewatchTowerFlags)storedValue;

{{ This enum is intentionally minimal: it provides a compact, extendable bitmask for firewatch tower state. Use bitwise operations for performance-sensitive code paths (common in game loops), and prefer explicit casts when serializing to/from byte-backed storage. }}