Skip to content

Game.Simulation.WaterPipeEdgeFlags

Assembly:
Assembly-CSharp (likely)

Namespace: Game.Simulation

Type:
public enum (with [Flags], underlying type: byte)

Base:
System.Enum (System.Byte)

Summary:
Bit flags describing the state of a water pipe edge in the simulation. Use the flags to represent one or more conditions that can apply to a pipe edge (e.g., shortage, backup, or disconnection). The enum is marked with [Flags], so values are intended to be combined with bitwise operators.


Fields

  • None = 0
    Represents no special condition on the pipe edge.

  • WaterShortage = 1
    Indicates the pipe edge is experiencing a water shortage (insufficient supply).

  • SewageBackup = 2
    Indicates sewage is backing up on the pipe edge.

  • WaterDisconnected = 4
    Indicates the water supply has been disconnected on this edge.

  • SewageDisconnected = 8
    Indicates the sewage connection has been disconnected on this edge.

Properties

  • This enum defines no properties.
    Enums are compile-time named constants; there are no instance properties.

Constructors

  • Enums do not have public constructors.
    Members are constant values; you create combined values using bitwise operators rather than constructing instances.

Methods

  • This enum defines no methods.
    Operations are typically performed using standard bitwise/operators and helper methods.

Usage Example

// Combine flags
WaterPipeEdgeFlags flags = WaterPipeEdgeFlags.WaterShortage | WaterPipeEdgeFlags.SewageDisconnected;

// Test a flag
bool hasShortage = (flags & WaterPipeEdgeFlags.WaterShortage) != 0;

// Add a flag
flags |= WaterPipeEdgeFlags.SewageBackup;

// Remove a flag
flags &= ~WaterPipeEdgeFlags.SewageDisconnected;

// Check for no flags
bool none = flags == WaterPipeEdgeFlags.None;

// Converting to underlying byte (for storage or interop)
byte raw = (byte)flags;

{{ Notes: - The [Flags] attribute indicates these values are intended to be combined; treat them as bitfields. - Because the underlying type is byte, values must stay within 0..255. - When persisting or transmitting flag values, cast to/from byte to preserve the compact representation. }}