Game.Net.GeometryFlags
Assembly:
Namespace: Game.Net
Type: enum
Base: System.Enum
Summary:
GeometryFlags is a bitmask enum used to describe metadata and behavior for network (net) assets and segments in Cities: Skylines 2. Each flag toggles a specific geometry or placement behavior (snapping, elevation semantics, symmetry, terrain interaction, handedness/traffic conventions, etc.). Flags are intended to be combined using bitwise operations to convey multiple properties at once.
Fields
-
StraightEdges = 1
Controls whether the net uses straight edges instead of curved geometry (snap to straight segments). -
StrictNodes = 2
Indicates nodes should be placed/handled strictly (e.g., stricter connection rules or fewer automatic adjustments). -
SnapCellSize = 4
Enable snapping of geometry to the grid cell size, useful for aligning to the city grid. -
SupportRoundabout = 8
Marks the net as supporting roundabout-style intersections or specialized roundabout behavior. -
LoweredIsTunnel = 0x10
Treats lowered segments as tunnels (affects rendering, collisions and possibly connection rules). -
RaisedIsElevated = 0x20
Treats raised segments as elevated (affects rendering, collisions and elevation logic). -
NoEdgeConnection = 0x40
Prevents automatic edge connections between this net and others. -
SnapToNetAreas = 0x80
Enables snapping of the net to defined net areas (for alignment with other nets/areas). -
StraightEnds = 0x100
Forces ends of segments to be straight rather than tapered/curved. -
RequireElevated = 0x200
Specifies that this net requires elevated placement (cannot be ground-level). -
SymmetricalEdges = 0x400
Indicates edges should be mirrored/symmetrical across the centerline. -
BlockZone = 0x800
Blocks zoning in the area covered by the net (prevents building placement or zoning). -
Directional = 0x1000
Net has directionality (directional lanes, one-way behavior, or ordered edge flow). -
SmoothSlopes = 0x2000
Enable smoothing of slopes for this net to produce gentler transitions. -
SmoothElevation = 0x4000
Smooth elevation changes across the net to avoid abrupt height differences. -
FlipTrafficHandedness = 0x8000
Flip traffic handedness for this net (useful for switching between left-/right-hand traffic). -
Asymmetric = 0x10000
Enable asymmetric geometry or behavior (left and right sides are allowed to differ). -
FlattenTerrain = 0x20000
Flatten terrain under the net when building/placing it. -
ClipTerrain = 0x40000
Clip or cut terrain to fit the net geometry (e.g., carve trenches or cut slopes). -
Marker = 0x80000
Marks the net as a marker type (non-standard geometry used for special purposes). -
MiddlePillars = 0x100000
Indicates presence of middle pillars (e.g., supports placed along the center of the structure). -
StandingNodes = 0x200000
Nodes remain standing (may affect animation or node behavior when adjusting geometry). -
ExclusiveGround = 0x400000
Restrict the net to ground usage only (disallow elevated/tunnel variants). -
NoCurveSplit = 0x800000
Prevent the automatic splitting of curved segments (keep curves intact). -
SubOwner = 0x1000000
Designates sub-owner behavior for segments (used internally to manage ownership/composition). -
OnWater = 0x2000000
Net is intended to be placed on water (bridge/piers or water-based structures). -
IsLefthanded = 0x4000000
Specifies left-handed layout conventions (lanes, signage, composition). -
InvertCompositionHandedness = 0x8000000
Invert the handedness of composed parts (flip ordering of components when composing assets). -
FlipCompositionHandedness = 0x10000000
Flip composition handedness for the asset (alternate flipping behavior for composed parts). -
ElevatedIsRaised = 0x20000000
Treat elevated segments as raised (slightly different semantics than RaisedIsElevated; used where elevated geometry should be considered as raised for placement/connection logic).
Properties
- None. (This is a plain bitmask enum; use bitwise operations to query or set flags.)
Constructors
- None exposed. (Enums have an implicit default value of 0. Use assignment or casting to set flags.)
Methods
- None declared. (Use standard bitwise operators and Enum utility methods if needed, e.g., Enum.HasFlag or bitwise &/|.)
Usage Example
// Combine flags
GeometryFlags flags = GeometryFlags.StraightEdges | GeometryFlags.SnapCellSize | GeometryFlags.SmoothElevation;
// Check for a flag
bool supportsRoundabout = (flags & GeometryFlags.SupportRoundabout) != 0;
// or
bool isSmooth = flags.HasFlag(GeometryFlags.SmoothElevation);
// Add a flag
flags |= GeometryFlags.RequireElevated;
// Remove a flag
flags &= ~GeometryFlags.SnapCellSize;