Game.Net.FlowResource
Assembly:
Assembly-CSharp (typical for Cities: Skylines 2 game code / mods)
Namespace:
Game.Net
Type: public enum
Base: System.Enum
Summary: FlowResource is a small enumeration used by the networking/flow systems to identify different kinds of flowable resources handled by the game's net/pipe systems. Currently it defines a sentinel "None" value and a single resource type "WaterPipes". Values are explicit integers (None = -1, WaterPipes = 1). This enum can be used in code that selects behavior based on the type of resource a net or conduit carries, and may be extended in future versions to include additional resource types.
Fields
-
None = -1
Represents no resource / an invalid or uninitialized value. Often used as a default or sentinel. -
WaterPipes = 1
Represents water pipe resource type. Used to indicate nets/conduits that carry water.
Properties
- (None)
This enum does not define properties. Use the enum values directly.
Constructors
- (None)
As an enum, FlowResource has no user-defined constructors. Values are the named constants declared above.
Methods
- (None)
FlowResource, being an enum, does not declare methods. You can use standard System.Enum methods (e.g., ToString(), HasFlag when used as flags) or cast to/from integer values.
Usage Example
// Determine resource type and branch logic
FlowResource resource = FlowResource.WaterPipes;
if (resource == FlowResource.WaterPipes)
{
// Handle water pipe-specific logic
Debug.Log("This net carries water.");
}
// Getting the raw integer value (-1 for None, 1 for WaterPipes)
int rawValue = (int)resource;
// Parse from integer safely
int incoming = 1;
FlowResource parsed = Enum.IsDefined(typeof(FlowResource), incoming)
? (FlowResource)incoming
: FlowResource.None;