Skip to content

Game.Simulation.ServiceRequestFlags

Assembly:
Assembly-CSharp (game's main assembly)

Namespace: Game.Simulation

Type:
public enum ServiceRequestFlags : byte

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

Summary:
ServiceRequestFlags is a small bitmask-style enum used to annotate or modify the behavior of service requests within the simulation. The enum is decorated with [Flags], which allows multiple values to be combined with bitwise operations. Because the underlying type is byte, the flag set is compact and intended for low-overhead storage/transport in simulation data structures.


Fields

  • Reversed = 1
    Indicates the request is reversed (semantic depends on the system using the flag — commonly used to mark direction/inversion of a request or to signal that processing should be handled in reverse order).

  • SkipCooldown = 2
    Indicates the request should bypass any usual cooldown or throttling logic (used when an immediate or non-throttled response is required).

Properties

  • None

Constructors

  • None (enum type — values are defined statically)

Methods

  • None (standard enum behavior — bitwise operations, ToString, etc., apply)

Usage Example

// Combine flags
ServiceRequestFlags flags = ServiceRequestFlags.Reversed | ServiceRequestFlags.SkipCooldown;

// Check for a specific flag
if ((flags & ServiceRequestFlags.SkipCooldown) != 0)
{
    // handle skip-cooldown behavior
}

// Remove a flag
flags &= ~ServiceRequestFlags.Reversed;

// Toggle a flag
flags ^= ServiceRequestFlags.Reversed;

// Cast to underlying byte for compact storage or network/IPC
byte raw = (byte)flags;

// Reconstruct from raw value (be careful to validate if necessary)
ServiceRequestFlags fromRaw = (ServiceRequestFlags)raw;

Notes: - The [Flags] attribute makes enum.ToString() return combined names (e.g., "Reversed, SkipCooldown") when multiple flags are set. - Because the enum uses byte as the underlying type, it is well-suited for packed simulation data structures where memory layout matters.