Table of Contents

Class TeslaGate

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

The in-game tesla gate.

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

Properties

ActivationTime

Gets or sets the tesla gate's windup time to wait before generating the shock.

public float ActivationTime { get; set; }

Property Value

float

Base

Gets the base TeslaGate.

public TeslaGate Base { get; }

Property Value

TeslaGate

CooldownTime

Gets or sets the tesla gate's cooldown to wait before the next shock.

public float CooldownTime { get; set; }

Property Value

float

GameObject

Gets the tesla gate's UnityEngine.GameObject.

public GameObject GameObject { get; }

Property Value

GameObject

HurtRange

Gets or sets the tesla gate's radius from which players can be hurted.

public Vector3 HurtRange { get; set; }

Property Value

Vector3

IdleRange

Gets or sets the tesla gate's distance from which players must stand for it to enter idle mode.

public float IdleRange { get; set; }

Property Value

float

IgnoredPlayers

Gets or sets a HashSet<T> of Player which contains all the players ignored by tesla gates.

public static HashSet<Player> IgnoredPlayers { get; set; }

Property Value

HashSet<Player>

IgnoredRoles

Gets or sets a HashSet<T> of PlayerRoles.RoleTypeId which contains all the roles ignored by tesla gates.

public static List<RoleTypeId> IgnoredRoles { get; set; }

Property Value

List<RoleTypeId>

IgnoredTeams

Gets or sets a HashSet<T> of PlayerRoles.Team which contains all the teams ignored by tesla gates.

public static List<Team> IgnoredTeams { get; set; }

Property Value

List<Team>

InactiveTime

Gets or sets the tesla gate's inactive time.

public float InactiveTime { get; set; }

Property Value

float

IsIdling

Gets or sets a value indicating whether the tesla gate is idling.

public bool IsIdling { get; set; }

Property Value

bool

IsShocking

Gets a value indicating whether the tesla gate's shock burst is in progess.

public bool IsShocking { get; }

Property Value

bool

List

Gets a IEnumerable<T> of TeslaGate which contains all the TeslaGate instances.

public static IReadOnlyCollection<TeslaGate> List { get; }

Property Value

IReadOnlyCollection<TeslaGate>

PlayersInHurtRange

Gets a IEnumerable<T> of Player which contains all the players inside the hurt range.

public IEnumerable<Player> PlayersInHurtRange { get; }

Property Value

IEnumerable<Player>

PlayersInIdleRange

Gets a IEnumerable<T> of Player which contains all the players inside the idle range.

public IEnumerable<Player> PlayersInIdleRange { get; }

Property Value

IEnumerable<Player>

PlayersInTriggerRange

Gets a IEnumerable<T> of Player which contains all the players inside the trigger range.

public IEnumerable<Player> PlayersInTriggerRange { get; }

Property Value

IEnumerable<Player>

Position

Gets the tesla gate's position.

public Vector3 Position { get; }

Property Value

Vector3

Room

Gets the tesla gate's Room which is located in.

public Room Room { get; }

Property Value

Room

Rotation

Gets the tesla gate's rotation.

public Quaternion Rotation { get; }

Property Value

Quaternion

TantrumsToDestroy

Gets a List<T> of TantrumHazard which contains all the tantrums to destroy.

public IEnumerable<TantrumHazard> TantrumsToDestroy { get; }

Property Value

IEnumerable<TantrumHazard>

Transform

Gets the tesla gate's UnityEngine.Transform.

public Transform Transform { get; }

Property Value

Transform

TriggerRange

Gets or sets the tesla gate's distance from which can be triggered.

public float TriggerRange { get; set; }

Property Value

float

UseInstantBurst

Gets or sets a value indicating whether the tesla gate's next burst should be treated as instant burst.

The instant burst ignores the standard cooldown time, reducing it to the cooldown time used for bursts triggered by SCP-079.

public bool UseInstantBurst { get; set; }

Property Value

bool

Methods

CanBeIdle(Player)

Gets a value indicating whether the tesla gate can be idle by a specific Player.

public bool CanBeIdle(Player player)

Parameters

player Player

The Player to check.

Returns

bool

true if the given Player can idle the tesla gate; otherwise, false.

CanBeTriggered(Player)

Gets a value indicating whether the tesla gate can be triggered by a specific Player.

public bool CanBeTriggered(Player player)

Parameters

player Player

The Player to check.

Returns

bool

true if the given Player can trigger the tesla gate; otherwise, false.

ForceTrigger()

Force triggers the tesla gate ignoring the delay between each burst.

public void ForceTrigger()

Get(Func<TeslaGate, bool>)

Gets a IEnumerable<T> of TeslaGate filtered based on a predicate.

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

Parameters

predicate Func<TeslaGate, bool>

The condition to satify.

Returns

IEnumerable<TeslaGate>

A IEnumerable<T> of TeslaGate which contains elements that satify the condition.

Get(TeslaGate)

Gets the TeslaGate belonging to the TeslaGate.

public static TeslaGate Get(TeslaGate baseTeslaGate)

Parameters

baseTeslaGate TeslaGate

The TeslaGate instance.

Returns

TeslaGate

The corresponding TeslaGate instance.

IsPlayerInHurtRange(Player)

Gets a value indicating whether the Player is in the hurt range of a specific tesla gate.

public bool IsPlayerInHurtRange(Player player)

Parameters

player Player

The Player to check.

Returns

bool

true if the given Player is in the hurt range of the tesla gate; otherwise, false.

IsPlayerInIdleRange(Player)

Gets a value indicating whether the Player is in the idle range of a specific tesla gate.

public bool IsPlayerInIdleRange(Player player)

Parameters

player Player

The Player to check.

Returns

bool

true if the given Player is in the idle range of the tesla gate; otherwise, false.

IsPlayerInTriggerRange(Player)

Gets a value indicating whether the Player is in the trigger range of a specific tesla gate.

public bool IsPlayerInTriggerRange(Player player)

Parameters

player Player

The Player to check.

Returns

bool

true if the given Player is in the trigger range of the tesla gate; otherwise, false.

Trigger(bool)

Triggers the tesla gate.

public void Trigger(bool isInstantBurst = false)

Parameters

isInstantBurst bool

A value indicating whether the shock should be treated as instant burst.

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

Try-get a IEnumerable<T> of TeslaGate filtered based on a predicate.

public static bool TryGet(Func<TeslaGate, bool> predicate, out IEnumerable<TeslaGate> gates)

Parameters

predicate Func<TeslaGate, bool>

The condition to satify.

gates IEnumerable<TeslaGate>

A IEnumerable<T> of TeslaGate which contains elements that satify the condition.

Returns

bool

Whether at least one tesla gate was found.

TryGet(TeslaGate, out TeslaGate)

Try-get a TeslaGate belonging to the TeslaGate, if any.

public static bool TryGet(TeslaGate baseTeslaGate, out TeslaGate gate)

Parameters

baseTeslaGate TeslaGate

The TeslaGate instance.

gate TeslaGate

A TeslaGate or null if not found.

Returns

bool

Whether the tesla gate was found.