Game.Vehicles.FireEngineFlags
Assembly: Assembly-CSharp (game assembly)
Namespace: Game.Vehicles
Type: enum (flags)
Base: System.Enum (underlying type: System.UInt32)
Summary:
FireEngineFlags is a bitmask enum (decorated with [Flags]) used to represent the current state and behavior flags for fire engine vehicles in the game. Each value is a distinct bit (uint) so multiple flags can be combined to describe composite states (e.g., returning while disabled). Note: the enum member name "Rescueing" is spelled as in the code (not "Rescuing").
Fields
-
Returning = 1u
Indicates the fire engine is returning to its base or station (commonly after finishing a call). -
Extinguishing = 2u
Indicates the vehicle is actively extinguishing a fire or performing firefighting actions. -
Empty = 4u
Marks the vehicle as empty — no crew or no usable resources. Used to indicate an empty/unused vehicle state. -
DisasterResponse = 8u
Indicates the vehicle is responding as part of a disaster response (special dispatch mode). -
Rescueing = 0x10u
Indicates the vehicle is performing rescue operations (note spelling: "Rescueing" as declared). -
EstimatedEmpty = 0x20u
An estimated-empty state (e.g., estimated to be out of resources such as water or crew). Often used for prediction/estimation logic. -
Disabled = 0x40u
Marks the vehicle as disabled (damaged, out of service, or otherwise unable to operate).
Properties
- None — this type is an enum and exposes no properties.
Constructors
public FireEngineFlags()
Enums do not define instance constructors; the default value (0) represents no flags set. This enum does not declare an explicit zero-valued member, so a default-initialized FireEngineFlags will have no flags enabled.
Methods
- None — this enum defines only named bit flags and provides no methods.
Usage Example
// Combine flags
Game.Vehicles.FireEngineFlags flags = Game.Vehicles.FireEngineFlags.Extinguishing | Game.Vehicles.FireEngineFlags.Rescueing;
// Check a flag
bool isExtinguishing = (flags & Game.Vehicles.FireEngineFlags.Extinguishing) != 0;
// or using Enum.HasFlag (boxed, slower)
bool isRescuing = flags.HasFlag(Game.Vehicles.FireEngineFlags.Rescueing);
// Add a flag
flags |= Game.Vehicles.FireEngineFlags.Returning;
// Remove a flag
flags &= ~Game.Vehicles.FireEngineFlags.Extinguishing;
// Test for no flags
bool noFlags = flags == 0;
Notes: - Because [Flags] is applied, values are intended to be combined via bitwise operations. - Be careful with HasFlag on performance-critical paths (it boxes the enum); prefer bitwise checks where performance matters.