Game.Prefabs.BuildingFlags
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: public enum BuildingFlags : uint
Base: System.Enum (underlying type: System.UInt32)
Summary:
An enumeration of bit flags that describe placement, access, service node presence, and other behavioural characteristics of building prefabs. Marked with [Flags], values can be combined using bitwise operators to express multiple properties for a single building prefab.
Fields
-
RequireRoad = 1u
Indicates the building requires a road to be present (placement/validation depends on an adjacent road). -
NoRoadConnection = 2u
The building does not form a road connection (it won't connect to the road network despite proximity). -
LeftAccess = 4u
The building has an access point on the left side. -
RightAccess = 8u
The building has an access point on the right side. -
BackAccess = 0x10u
The building has a rear access point. -
RestrictedPedestrian = 0x20u
Pedestrian access is restricted (the building limits pedestrian entry/exit or routing). -
RestrictedCar = 0x40u
Vehicle/car access is restricted for this building. -
ColorizeLot = 0x80u
The lot or area for the building can be colorized/modified visually (used by rendering or lot coloring systems). -
HasLowVoltageNode = 0x100u
The building has or requires a low-voltage electricity node. -
HasWaterNode = 0x200u
The building has or requires a water connection node. -
HasSewageNode = 0x400u
The building has or requires a sewage connection node. -
HasInsideRoom = 0x800u
The building has interior room(s) or internal space that may affect simulation or rendering. -
RestrictedParking = 0x1000u
Parking access or availability is restricted for this building. -
RestrictedTrack = 0x2000u
Track (rail/other guided transport) access is restricted. -
CanBeOnRoad = 0x4000u
The building is allowed to be placed directly on a road (on-road placement).
Properties
- (None — this is a simple flags enum; use bitwise operations or Enum.HasFlag to query values.)
{{ You can test flags with bitwise operators or Enum.HasFlag. }}
Constructors
- (None — enums do not define instance constructors. The default underlying numeric value 0 represents no flags set.)
{{ Use literal enum values or bitwise combinations to construct flag sets. }}
Methods
- (None declared on the enum itself.)
{{ Use System.Enum methods (e.g., HasFlag, ToString) or bitwise operators in code. }}
Usage Example
// Combine flags
BuildingFlags flags = BuildingFlags.RequireRoad | BuildingFlags.LeftAccess | BuildingFlags.HasWaterNode;
// Check with bitwise operator
if ((flags & BuildingFlags.RequireRoad) != 0)
{
// handle road-required building
}
// Check with HasFlag
if (flags.HasFlag(BuildingFlags.HasWaterNode))
{
// handle water connection logic
}
// Remove a flag
flags &= ~BuildingFlags.LeftAccess;
// Test if no flags set
if (flags == 0)
{
// default/no special properties
}