Skip to content

Game.Buildings.FireStationFlags

Assembly: Assembly-CSharp.dll
Namespace: Game.Buildings

Type: public enum

Base: System.Enum (underlying type: System.Byte)

Summary: Flags enum used to represent the availability and status of fire-fighting resources for a fire station. Marked with [Flags] so values can be combined as bitflags to represent multiple states at once (engines, helicopters, and disaster response availability).


Fields

  • HasAvailableFireEngines = 1 Indicates the station has at least one fire engine that can be dispatched (engines exist and are not all destroyed/disabled).

  • HasFreeFireEngines = 2 Indicates the station has one or more fire engines that are free (not currently on a call).

  • HasAvailableFireHelicopters = 4 Indicates the station has at least one fire helicopter available for dispatch.

  • HasFreeFireHelicopters = 8 Indicates the station has one or more fire helicopters that are free (not currently on a call).

  • DisasterResponseAvailable = 0x10 Indicates the station is capable of responding to disasters (special disaster response readiness/assignment).

Properties

  • This enum does not declare any properties. Use the enum values directly or use System.Enum helper methods (e.g., HasFlag) at runtime.

Constructors

  • Enums do not declare constructors in source. The runtime provides the default behavior mapping to the underlying byte values.

Methods

  • This type does not declare methods. Standard System.Enum methods (ToString, HasFlag, GetValues, etc.) are available for use.

Usage Example

// Combine flags for a station that has available and free engines and disaster response ready
FireStationFlags flags = FireStationFlags.HasAvailableFireEngines | FireStationFlags.HasFreeFireEngines | FireStationFlags.DisasterResponseAvailable;

// Check for a single flag using bitwise operation
bool hasFreeEngine = (flags & FireStationFlags.HasFreeFireEngines) != 0;

// Or using Enum.HasFlag (slower but more readable)
bool hasHelicopter = flags.HasFlag(FireStationFlags.HasAvailableFireHelicopters);

// Add a flag
flags |= FireStationFlags.HasAvailableFireHelicopters;

// Remove a flag
flags &= ~FireStationFlags.HasFreeFireEngines;

// Example usage in logic:
if ((flags & FireStationFlags.DisasterResponseAvailable) != 0)
{
    // prioritize or enable disaster response behavior
}