Game.Prefabs.PublicTransportPurpose
Assembly: Assembly-CSharp (game assembly; may vary for mods)
Namespace: Game.Prefabs
Type: enum (with [Flags] attribute)
Base: System.Enum
Summary:
{{ Represents the intended purpose(s) of a public transport instance. This is a bitmask/flags enum allowing combination of purposes (e.g., a transport can be both a regular transport line and used for evacuation). The defined purposes are TransportLine, Evacuation, PrisonerTransport, and Other. }}
Fields
-
TransportLine = 1
{{ Represents a normal public transport line/purpose (e.g., passenger transit service). }} -
Evacuation = 2
{{ Indicates the transport is used for evacuation purposes (emergency routing). }} -
PrisonerTransport = 4
{{ Indicates the transport is used to move prisoners. }} -
Other = 8
{{ A catch-all flag for any other or custom purposes not covered by the specific flags above. }}
Properties
- (none)
{{ This enum has no specific properties. Use standard enum operations and System.Enum helpers (e.g., HasFlag) to work with values. }}
Constructors
- (implicit)
public PublicTransportPurpose()
{{ As with all enums, there is an implicit default constructor. Values are represented as the underlying integral type (int). The [Flags] attribute allows bitwise combination of the defined values. }}
Methods
- (none declared)
{{ The enum itself does not declare methods. Use built-in enum functionality (e.g., Enum.HasFlag, bitwise operators &, |, ~) or conversions (ToString, Parse) as needed. }}
Usage Example
// Combine flags when creating a purpose:
Game.Prefabs.PublicTransportPurpose purpose =
Game.Prefabs.PublicTransportPurpose.TransportLine |
Game.Prefabs.PublicTransportPurpose.Evacuation;
// Check for a specific flag:
bool isEvacuation = purpose.HasFlag(Game.Prefabs.PublicTransportPurpose.Evacuation);
// Remove a flag:
purpose &= ~Game.Prefabs.PublicTransportPurpose.Evacuation;
// Set to a single purpose:
purpose = Game.Prefabs.PublicTransportPurpose.PrisonerTransport;