Skip to content

Game.Net.CarLaneFlags

Assembly: Game (assembly not explicitly specified; typically part of the game's core/net assembly)
Namespace: Game.Net

Type: public enum (Flags)

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

Summary:
Bitmask flags describing characteristics, permissions and special behaviors for a car lane in the game's net system. These flags are used to control routing, allowed vehicle types, lane directions, turn permissions, traffic rules (yield/stop/traffic lights), parking, and other lane-specific behaviors. The [Flags] attribute allows multiple flags to be combined using bitwise operations.


Fields

  • Unsafe = 1u
    Indicates the lane is considered unsafe (e.g., temporary hazard or otherwise undesirable for routing). Often used to discourage or prevent normal vehicle routing on this lane.

  • UTurnLeft = 2u
    Permits a U-turn maneuver to the left from this lane.

  • Invert = 4u
    Inverts lane direction or swaps left/right semantics for this lane (commonly used when flipping assets or mirroring lanes).

  • SideConnection = 8u
    Marks the lane as a side connection (e.g., a slip lane, service connection or a lane that connects to a side road rather than the main flow).

  • TurnLeft = 0x10u
    Allows left turns from this lane.

  • TurnRight = 0x20u
    Allows right turns from this lane.

  • LevelCrossing = 0x40u
    Indicates a level crossing (rail crossing) interaction for the lane or special behavior when intersecting with rails.

  • Twoway = 0x80u
    This lane supports traffic in both directions.

  • IsSecured = 0x100u
    Marks the lane as secured/protected (for example, a physically separated lane such as a protected bike lane or barrier-protected lane).

  • Runway = 0x200u
    Designates the lane as a runway-type lane (used by specific vehicle types/assets, e.g., aircraft or specialized vehicles in certain contexts).

  • Yield = 0x400u
    Indicates yield (give-way) rule applies for vehicles using this lane at intersections.

  • Stop = 0x800u
    Indicates a stop rule applies for vehicles using this lane at intersections.

  • ForbidCombustionEngines = 0x1000u
    Prohibits vehicles with combustion engines (e.g., internal combustion engine cars) from using this lane — often used for electric-only lanes.

  • ForbidTransitTraffic = 0x2000u
    Prohibits transit vehicles (buses, trams) from using this lane.

  • ForbidHeavyTraffic = 0x4000u
    Prohibits heavy vehicles (trucks) from using this lane.

  • PublicOnly = 0x8000u
    Restricts the lane to public transport vehicles only.

  • Highway = 0x10000u
    Marks the lane as a highway lane (affects routing, speed, and allowed behaviors).

  • UTurnRight = 0x20000u
    Permits a U-turn maneuver to the right from this lane.

  • GentleTurnLeft = 0x40000u
    Indicates a gentle/soft left turn (used for steering behavior or animation/visual rules).

  • GentleTurnRight = 0x80000u
    Indicates a gentle/soft right turn.

  • Forward = 0x100000u
    Forward-only movement for the lane (no turns permitted).

  • Approach = 0x200000u
    Marks the lane as an approach lane (leading into an intersection or special junction handling).

  • Roundabout = 0x400000u
    Marks the lane as part of a roundabout, which affects priority and routing behavior.

  • RightLimit = 0x800000u
    Indicates the lane is at the right limit (positioning info relative to the road cross-section).

  • LeftLimit = 0x1000000u
    Indicates the lane is at the left limit.

  • ForbidPassing = 0x2000000u
    No passing/overtaking allowed on this lane.

  • RightOfWay = 0x4000000u
    This lane has right of way at intersections (affects priority vs. other lanes).

  • TrafficLights = 0x8000000u
    Traffic lights control this lane at intersections.

  • ParkingLeft = 0x10000000u
    Parking is allowed on the left side of this lane.

  • ParkingRight = 0x20000000u
    Parking is allowed on the right side of this lane.

  • Forbidden = 0x40000000u
    The lane is forbidden (generally disallowed for use by vehicles unless overridden).

  • AllowEnter = 0x80000000u
    Allows entering the lane even if it would otherwise be restricted/forbidden (an overriding permission bit).

Properties

  • None
    This enum type does not define instance properties. Use bitwise operations to inspect or modify flag values.

Constructors

  • None (implicit)
    Enums do not expose public constructors in typical usage. Values are the named constants declared above with an underlying UInt32 representation.

Methods

  • None (aside from standard System.Enum methods)
    There are no custom methods defined on this enum. Use standard Enum helpers (Enum.HasFlag, bitwise operators, or comparisons) to work with values.

Usage Example

// Combine flags
CarLaneFlags flags = CarLaneFlags.ForbidHeavyTraffic | CarLaneFlags.TurnLeft | CarLaneFlags.Yield;

// Check for a specific flag
if ((flags & CarLaneFlags.TurnLeft) != 0)
{
    // This lane allows left turns
}

// Add/Remove flags
flags |= CarLaneFlags.ForbidTransitTraffic;  // add flag
flags &= ~CarLaneFlags.Yield;                // remove flag

// Test multiple flags with HasFlag (note: HasFlag is slower than bit operations)
bool isForbidden = flags.HasFlag(CarLaneFlags.Forbidden);

Notes: - Because the enum is annotated with [Flags], combine values via bitwise OR (|) and check via AND (&) or Enum.HasFlag. - The underlying type is uint; be careful when casting to signed types. - These flags are used by the game's net lane systems to influence vehicle routing and lane behavior. Refer to game-specific documentation or existing game code to see how and where these flags are read, written, and interpreted in pathfinding and traffic simulation.