Game.Vehicles.WatercraftLaneFlags
Assembly: Assembly-CSharp.dll
Namespace: Game.Vehicles
Type: public enum WatercraftLaneFlags : uint
Base: System.Enum (underlying type: System.UInt32)
Summary:
Bitwise flags used by the watercraft lane/vehicle systems to represent various per-lane or per-vehicle states and behavior modifiers for watercraft (boats/ships). These flags are combined and checked by pathing, movement and queuing logic to control lane alignment, blocking/queue behavior, lane selection, and other lane-related state.
Fields
-
EndOfPath = 1u
Marks the lane/vehicle as at the end of the path or that the current lane is the final lane for the path. -
EndReached = 2u
Indicates that the target end position has been reached. (Similar to EndOfPath but typically used to indicate destination arrival.) -
UpdateOptimalLane = 4u
Request/flag to trigger recalculation or update of the optimal lane for the watercraft. -
TransformTarget = 8u
Indicates that the lane target is provided by a transform (position/rotation) rather than a regular lane target. -
ResetSpeed = 0x10u
(16)
Request or marker to reset the vehicle's speed (for example when changing lane behavior or entering certain areas). -
FixedStart = 0x20u
(32)
Marks that the start lane/position is fixed and should not be changed dynamically. -
Obsolete = 0x40u
(64)
A flag kept for legacy/compatibility reasons — marked as obsolete. -
Reserved = 0x80u
(128)
Reserved for future use. -
FixedLane = 0x100u
(256)
Indicates the vehicle is fixed to a specific lane and should not switch lanes. -
GroupTarget = 0x800u
(2048)
Used when the target is a group (convoy/formation) or when vehicles are following a group target. -
Queue = 0x1000u
(4096)
Indicates the vehicle is in a queue (e.g., waiting to enter a harbor or docking area). -
IgnoreBlocker = 0x2000u
(8192)
When set, the vehicle should ignore blocking objects/vehicles for the purpose of lane logic (force-through behavior). -
IsBlocked = 0x4000u
(16384)
Indicates the lane/vehicle is currently blocked by an obstruction. -
QueueReached = 0x8000u
(32768)
Marks that the queued position has been reached (vehicle is at its queue spot). -
Connection = 0x10000u
(65536)
Related to connection state (e.g., entering or leaving a connection segment). Used by connection-handling logic. -
Area = 0x20000u
(131072)
Area-related flag — may mark special area handling for the lane or vehicle. -
AlignLeft = 0x80000u
(524288)
Indicates the vehicle/lane should align to the left side of the lane. -
AlignRight = 0x100000u
(1048576)
Indicates the vehicle/lane should align to the right side of the lane.
Properties
- (None specific)
This enum does not define properties. Use standard System.Enum functionality to inspect values.
Constructors
- (None)
Enums in C# do not define custom constructors in typical usage. Values are set via assignment/bitwise operations.
Methods
- (None specific)
No custom methods are defined on this enum. Use bitwise operators or Enum helpers (e.g., Enum.HasFlag) to work with these flags.
Usage Example
// Example: checking and setting flags for a watercraft lane state (uint-based storage)
uint flags = 0;
// set flags
flags |= (uint)WatercraftLaneFlags.Queue | (uint)WatercraftLaneFlags.IsBlocked;
// check flag (recommended: bitwise for performance)
bool isQueued = (flags & (uint)WatercraftLaneFlags.Queue) != 0;
bool blocked = (flags & (uint)WatercraftLaneFlags.IsBlocked) != 0;
// clear a flag
flags &= ~(uint)WatercraftLaneFlags.IsBlocked;
// toggle a flag
flags ^= (uint)WatercraftLaneFlags.UpdateOptimalLane;
// using Enum.HasFlag (works but slightly slower)
WatercraftLaneFlags wf = (WatercraftLaneFlags)flags;
if (wf.HasFlag(WatercraftLaneFlags.QueueReached)) {
// handle queue reached
}
Notes for modders: - The enum is marked with [Flags], so multiple values are commonly combined into a single uint state field. - Prefer bitwise &/|/~ operations when performance matters (HasFlag allocates/behaves slower). - Some flags are reserved or obsolete; avoid depending on their behavior unless verified by inspecting game code that uses them.