Skip to content

Game.Net.ConnectionLaneFlags

Assembly:
Namespace: Game.Net

Type: enum

Base: System.Enum

Summary:
ConnectionLaneFlags is a bitmask (marked with [Flags]) used to describe characteristics and permissions of a lane connection in the network system. Each flag represents a single boolean attribute (e.g., lane type, positional role, allowed operations) so multiple flags can be combined to fully describe how a lane connection should behave or be treated by routing, traffic, and network-creation logic.


Fields

  • Start
    Indicates the lane connection is at the primary/start side of a segment/connection. Often used to differentiate direction or ordering of the connection.

  • Distance
    Used when the connection should be considered for distance-based calculations or weighting. Typically affects routing/selection based on proximity.

  • Outside
    Marks the connection as an outside-facing connection (for example, connecting to external networks or connections that lead outside an area).

  • SecondaryStart
    Marks a connection as a secondary start point. Used for auxiliary or additional start connections beyond the primary Start.

  • SecondaryEnd
    Marks a connection as a secondary end point. Used similarly to SecondaryStart but at the end side.

  • Road
    Indicates the lane serves road vehicle traffic.

  • Track
    Indicates the lane is a track (rail) type lane.

  • Pedestrian
    Indicates the lane is for pedestrian traffic (walkways, sidewalks, etc.).

  • Parking
    Marks the lane as a parking-type lane (used for parking maneuvers or parking slots).

  • AllowMiddle
    Allows connections from or to the middle of a lane/segment, e.g., mid-segment entry/exit points.

  • AllowCargo
    Permits cargo vehicles to use the connection; used to mark freight-allowed links.

  • Airway
    Indicates the lane is an airway (air traffic lane).

  • Inside
    Marks the connection as inside-facing (opposite of Outside), e.g., internal to an area or network.

  • Area
    Marks the connection as area-related (used for area-based connectivity rather than linear lane-to-lane).

  • Disabled
    Indicates the connection is disabled and should not be used by routing or traffic logic.

  • AllowEnter
    Specifies that entering through this connection is allowed.

  • AllowExit
    Specifies that exiting through this connection is allowed.

Properties

  • None.
    This type is a plain enum used as a bitmask; it does not declare properties.

Constructors

  • public ConnectionLaneFlags()
    Enums do not normally expose constructors in usage. This entry represents the default enum construction (zero value) and is present for completeness.

Methods

  • None.
    No instance methods are defined on this enum. Use bitwise operations and Enum utilities (e.g., HasFlag) to work with values.

Usage Example

// Combine flags to describe a road lane that is a start connection and allows exit
ConnectionLaneFlags flags = ConnectionLaneFlags.Start | ConnectionLaneFlags.Road | ConnectionLaneFlags.AllowExit;

// Check for specific flag
bool isRoad = (flags & ConnectionLaneFlags.Road) == ConnectionLaneFlags.Road;
// or using HasFlag (slower)
bool allowsExit = flags.HasFlag(ConnectionLaneFlags.AllowExit);

// Remove a flag
flags &= ~ConnectionLaneFlags.Start;

// Test presence of multiple flags
bool isExitRoad = (flags & (ConnectionLaneFlags.Road | ConnectionLaneFlags.AllowExit)) 
                  == (ConnectionLaneFlags.Road | ConnectionLaneFlags.AllowExit);