Skip to content

Game.Net.ParkingLaneFlags

Assembly:
Assembly-CSharp (game runtime assembly; the enum is defined in the game's code)

Namespace: Game.Net

Type: enum (with [Flags])

Base: System.Enum (backed by System.Int32)

Summary: ParkingLaneFlags is a flags-style enumeration used by the game's networking/road system to describe properties and runtime state of parking lanes. Each enum value represents a single bit (or a combination of bits when combined) that the parking system, AI and lane-management code use to determine behavior such as which side parking is available on, whether a lane is virtual, taxi availability, entrance/exit permissions, and runtime state markers (e.g., availability changed). Because it is marked with [Flags], values are intended to be combined using bitwise operations.


Fields

  • Invert = 1 Indicates an inverted lane orientation/ordering relevant for parking placement or direction interpretation (0x1, decimal 1).

  • StartingLane = 2 Marks the lane as the starting lane for parking-related processing or searches (0x2, decimal 2).

  • EndingLane = 4 Marks the lane as an ending lane for parking-related processing (0x4, decimal 4).

  • SecondaryStart = 8 Marks a secondary start position for parking searches or processing (0x8, decimal 8).

  • ParkingInverted = 0x10 Specifies that parking alignment/slot placement is inverted for this lane compared to normal (0x10, decimal 16).

  • LeftSide = 0x20 Parking or parking access applies to the left side of the lane/road (0x20, decimal 32).

  • RightSide = 0x40 Parking or parking access applies to the right side of the lane/road (0x40, decimal 64).

  • TaxiAvailabilityUpdated = 0x80 A runtime flag indicating the taxi availability status was updated for this lane (0x80, decimal 128).

  • TaxiAvailabilityChanged = 0x100 Indicates that taxi availability for this lane has changed and may need additional processing (0x100, decimal 256).

  • VirtualLane = 0x200 Marks the lane as virtual (no physical lane present; used for AI routing or special behaviors) (0x200, decimal 512).

  • FindConnections = 0x400 Used to indicate that connection-finding (linking lanes/nodes) is required or in progress for this lane (0x400, decimal 1024).

  • ParkingLeft = 0x800 Specifically denotes parking slots on the left side (distinct from LeftSide if the code separates general side vs parking slots) (0x800, decimal 2048).

  • ParkingRight = 0x1000 Specifically denotes parking slots on the right side (0x1000, decimal 4096).

  • ParkingDisabled = 0x2000 Parking is disabled for this lane (no parking should occur) (0x2000, decimal 8192).

  • AllowEnter = 0x4000 Vehicles are allowed to enter this parking lane (0x4000, decimal 16384).

  • AllowExit = 0x8000 Vehicles are allowed to exit this parking lane (0x8000, decimal 32768).

  • SpecialVehicles = 0x10000 Indicates special-vehicle access/considerations for the lane (e.g., service vehicles, emergency, taxis) (0x10000, decimal 65536).

Properties

  • (none) This is an enum type and does not declare properties. Use the enum values directly and combine them with bitwise operators.

Constructors

  • (none - enum) Enums do not declare instance constructors. Values are compiled as named constants with an underlying integral type (System.Int32 by default).

Methods

  • System.Enum members (inherited)
  • ToString(), HasFlag(Enum), CompareTo, GetHashCode(), etc. These are the standard methods available for enums via System.Enum / System.ValueType.

  • Bitwise usage (operators)

  • Use bitwise operators (|, &, ^, ~) to combine, test, toggle, and clear individual flags. For performance-critical code, prefer integer bitwise ops over Enum.HasFlag (HasFlag boxes the enum).

Usage patterns: - Combine flags: var f = ParkingLaneFlags.LeftSide | ParkingLaneFlags.AllowEnter; - Test flags: if ((f & ParkingLaneFlags.AllowEnter) != 0) { ... } - Toggle a flag: f ^= ParkingLaneFlags.Invert; - Clear a flag: f &= ~ParkingLaneFlags.ParkingDisabled;

Notes: - Since flag values may represent both configuration and transient state, be careful when persisting or copying lane data. - When reading/writing flags from shared structures (e.g., lane data in unsafe or multithreaded contexts), ensure proper synchronization to avoid races.

Usage Example

// Compose flags for a parking lane that allows entry, has parking on the right, and is a starting lane.
ParkingLaneFlags flags = ParkingLaneFlags.AllowEnter | ParkingLaneFlags.ParkingRight | ParkingLaneFlags.StartingLane;

// Check whether vehicles are allowed to enter this lane:
bool canEnter = (flags & ParkingLaneFlags.AllowEnter) != 0;
// or (less performant due to boxing)
bool canEnter2 = flags.HasFlag(ParkingLaneFlags.AllowEnter);

// Disable parking on this lane:
flags |= ParkingLaneFlags.ParkingDisabled;

// Clear the ParkingDisabled flag (enable parking again):
flags &= ~ParkingLaneFlags.ParkingDisabled;

// Toggle invert orientation:
flags ^= ParkingLaneFlags.Invert;

// Persisting or sending the flags as an integer (e.g., writing into a lane struct):
int raw = (int)flags;
// Reconstruct:
ParkingLaneFlags readFlags = (ParkingLaneFlags)raw;

If you need, I can produce a short summary mapping each flag to typical game systems (AI parking search, taxi system, parking lot/slot generation, network linking) or show how these flags are used when reading/writing lane data structures in the game's code.