C# Class TrafficManager.Traffic.VehicleRestrictionsManager

显示文件 Open project: Katalyst6/CSL.TransitAddonMod

Public Methods

Method Description
AddAllowedType ( ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo, ExtVehicleType vehicleType ) : void

Adds the given vehicle type to the set of allowed vehicles at the specified lane

IsAllowed ( ExtVehicleType allowedTypes, ExtVehicleType vehicleType ) : bool
IsBicycleAllowed ( ExtVehicleType allowedTypes ) : bool
IsBusAllowed ( ExtVehicleType allowedTypes ) : bool
IsCargoTrainAllowed ( ExtVehicleType allowedTypes ) : bool
IsCargoTruckAllowed ( ExtVehicleType allowedTypes ) : bool
IsEmergencyAllowed ( ExtVehicleType allowedTypes ) : bool
IsPassengerCarAllowed ( ExtVehicleType allowedTypes ) : bool
IsPassengerTrainAllowed ( ExtVehicleType allowedTypes ) : bool
IsRailLane ( NetInfo laneInfo ) : bool
IsRailVehicleAllowed ( ExtVehicleType allowedTypes ) : bool
IsRoadLane ( NetInfo laneInfo ) : bool
IsRoadVehicleAllowed ( ExtVehicleType allowedTypes ) : bool
IsServiceAllowed ( ExtVehicleType allowedTypes ) : bool
IsTaxiAllowed ( ExtVehicleType allowedTypes ) : bool
IsTramAllowed ( ExtVehicleType allowedTypes ) : bool
RemoveAllowedType ( ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo, ExtVehicleType vehicleType ) : void

Removes the given vehicle type from the set of allowed vehicles at the specified lane

ToggleAllowedType ( ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo, ExtVehicleType vehicleType, bool add ) : void

Private Methods

Method Description
GetAllowedVehicleTypes ( ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo ) : ExtVehicleType

Determines the allowed vehicle types for the given segment and lane.

GetAllowedVehicleTypes ( ushort segmentId, ushort nodeId ) : ExtVehicleType

Determines the allowed vehicle types that may approach the given node from the given segment.

GetAllowedVehicleTypesAsSet ( ushort segmentId, ushort nodeId ) : HashSet

Determines the allowed vehicle types that may approach the given node from the given segment.

SetAllowedVehicleTypes ( ushort segmentId, uint laneIndex, uint laneId, ExtVehicleType allowedTypes ) : bool

Sets the allowed vehicle types for the given segment and lane.

VehicleRestrictionsManager ( ) : ColossalFramework

Method Details

AddAllowedType() public static method

Adds the given vehicle type to the set of allowed vehicles at the specified lane
public static AddAllowedType ( ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo, ExtVehicleType vehicleType ) : void
segmentId ushort
laneIndex uint
laneId uint
laneInfo NetInfo
vehicleType ExtVehicleType
return void

IsAllowed() public static method

public static IsAllowed ( ExtVehicleType allowedTypes, ExtVehicleType vehicleType ) : bool
allowedTypes ExtVehicleType
vehicleType ExtVehicleType
return bool

IsBicycleAllowed() public static method

public static IsBicycleAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsBusAllowed() public static method

public static IsBusAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsCargoTrainAllowed() public static method

public static IsCargoTrainAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsCargoTruckAllowed() public static method

public static IsCargoTruckAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsEmergencyAllowed() public static method

public static IsEmergencyAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsPassengerCarAllowed() public static method

public static IsPassengerCarAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsPassengerTrainAllowed() public static method

public static IsPassengerTrainAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsRailLane() public static method

public static IsRailLane ( NetInfo laneInfo ) : bool
laneInfo NetInfo
return bool

IsRailVehicleAllowed() public static method

public static IsRailVehicleAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsRoadLane() public static method

public static IsRoadLane ( NetInfo laneInfo ) : bool
laneInfo NetInfo
return bool

IsRoadVehicleAllowed() public static method

public static IsRoadVehicleAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsServiceAllowed() public static method

public static IsServiceAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsTaxiAllowed() public static method

public static IsTaxiAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

IsTramAllowed() public static method

public static IsTramAllowed ( ExtVehicleType allowedTypes ) : bool
allowedTypes ExtVehicleType
return bool

RemoveAllowedType() public static method

Removes the given vehicle type from the set of allowed vehicles at the specified lane
public static RemoveAllowedType ( ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo, ExtVehicleType vehicleType ) : void
segmentId ushort
laneIndex uint
laneId uint
laneInfo NetInfo
vehicleType ExtVehicleType
return void

ToggleAllowedType() public static method

public static ToggleAllowedType ( ushort segmentId, uint laneIndex, uint laneId, NetInfo laneInfo, ExtVehicleType vehicleType, bool add ) : void
segmentId ushort
laneIndex uint
laneId uint
laneInfo NetInfo
vehicleType ExtVehicleType
add bool
return void