Table of Contents

Class Workstation

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

A wrapper class for InventorySystem.Items.Firearms.Attachments.WorkstationController.

public class Workstation : IWrapper<WorkstationController>, IWorldSpace, IPosition, IRotation
Inheritance
Workstation
Implements
IWrapper<WorkstationController>
Inherited Members
Extension Methods

Properties

Base

Gets the underlying InventorySystem.Items.Firearms.Attachments.WorkstationController instance.

public WorkstationController Base { get; }

Property Value

WorkstationController

GameObject

Gets the GameObject of the workstation.

public GameObject GameObject { get; }

Property Value

GameObject

KnownUser

Gets or sets the player known to be using the workstation.

public Player KnownUser { get; set; }

Property Value

Player

List

Gets a read-only collection of all Workstation instances.

public static IReadOnlyCollection<Workstation> List { get; }

Property Value

IReadOnlyCollection<Workstation>

Position

Gets or sets the position of the workstation.

public Vector3 Position { get; set; }

Property Value

Vector3

Room

Gets the Room the workstation is located in.

public Room Room { get; }

Property Value

Room

Rotation

Gets or sets the rotation of the workstation.

public Quaternion Rotation { get; set; }

Property Value

Quaternion

Status

Gets or sets the status of the workstation.

public WorkstationController.WorkstationStatus Status { get; set; }

Property Value

WorkstationController.WorkstationStatus

Stopwatch

Gets the Stopwatch used by the workstation.

public Stopwatch Stopwatch { get; }

Property Value

Stopwatch

Transform

Gets the Transform of the workstation.

public Transform Transform { get; }

Property Value

Transform

Zone

Gets the ZoneType of the workstation's room.

public ZoneType Zone { get; }

Property Value

ZoneType

Methods

Get(WorkstationController)

Gets a Workstation given a InventorySystem.Items.Firearms.Attachments.WorkstationController instance.

public static Workstation Get(WorkstationController workstationController)

Parameters

workstationController WorkstationController

The InventorySystem.Items.Firearms.Attachments.WorkstationController instance.

Returns

Workstation

The Workstation instance.

Get(Func<Workstation, bool>)

Gets all Workstation instances that match the specified predicate.

public static IEnumerable<Workstation> Get(Func<Workstation, bool> predicate)

Parameters

predicate Func<Workstation, bool>

The predicate to filter workstations.

Returns

IEnumerable<Workstation>

An IEnumerable<T> of matching workstations.

Interact(Player)

Interacts with the workstation as the specified player.

public void Interact(Player player)

Parameters

player Player

The player to interact as.

IsInRange(Player)

Determines whether the specified player is in range of the workstation.

public bool IsInRange(Player player)

Parameters

player Player

The player to check.

Returns

bool

true if the player is in range; otherwise, false.

ToString()

Returns the Room in a human-readable format.

public override string ToString()

Returns

string

A string containing Workstation-related data.

TryGet(Func<Workstation, bool>, out IEnumerable<Workstation>)

Tries to get all Workstation instances that match the specified predicate.

public static bool TryGet(Func<Workstation, bool> predicate, out IEnumerable<Workstation> workstations)

Parameters

predicate Func<Workstation, bool>

The predicate to filter workstations.

workstations IEnumerable<Workstation>

The matching workstations, if any.

Returns

bool

true if any workstations were found; otherwise, false.