Skip to content

Game.Vehicles.HearseFlags

Assembly:
Game (assembly inferred from source path — exact assembly name not specified in the file)

Namespace: Game.Vehicles

Type:
public enum (with [Flags] attribute)

Base:
System.UInt32

Summary:
HearseFlags is a bit-flag enumeration used to represent the state(s) of a hearse vehicle. The [Flags] attribute indicates that multiple values can be combined with bitwise operations to represent composite states (for example, Dispatched | Transporting). Each enum member maps to a single bit in an unsigned 32-bit integer.


Fields

  • Returning = 1u
    Represents a hearse that is returning (typically to the depot or cemetery). Value: 1 (0x1).

  • Dispatched = 2u
    Indicates the hearse has been dispatched to perform a task. Value: 2 (0x2).

  • Transporting = 4u
    The hearse is actively transporting (e.g., corpses). Value: 4 (0x4).

  • AtTarget = 8u
    The hearse has reached its target location. Value: 8 (0x8).

  • Disembarking = 0x10u
    The hearse is disembarking (unloading). Value: 16 (0x10).

  • Disabled = 0x20u
    The hearse is disabled (out of service). Value: 32 (0x20).

Properties

  • This enum type does not define properties. Use standard enum casting and bitwise operations to inspect or modify flags.

Constructors

  • enum types do not expose instance constructors. Values are constant compile-time integers. You can create a variable of this enum type by assigning one or a combination of defined members, e.g.: HearseFlags flags = HearseFlags.Dispatched | HearseFlags.Transporting;

Methods

  • The enum itself does not declare methods. Typical operations you will use in code are the standard C# bitwise and conversion operations:
  • Check a flag: (flags & HearseFlags.Returning) != 0
  • Set a flag: flags |= HearseFlags.AtTarget
  • Clear a flag: flags &= ~HearseFlags.Transporting
  • Toggle a flag: flags ^= HearseFlags.Disabled
  • Convert to underlying value: uint raw = (uint)flags

Usage Example

// Combine flags when dispatching a hearse that is transporting
HearseFlags flags = HearseFlags.Dispatched | HearseFlags.Transporting;

// Check whether the hearse is returning
bool isReturning = (flags & HearseFlags.Returning) != 0;

// Mark the hearse as at its target and stop transporting
flags |= HearseFlags.AtTarget;
flags &= ~HearseFlags.Transporting;

// Disable the hearse (e.g., broken down)
flags |= HearseFlags.Disabled;

// Store or inspect raw underlying value
uint rawValue = (uint)flags;