Table of Contents

Class Generator

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

Wrapper class for MapGeneration.Distributors.Scp079Generator.

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

Properties

ActivationTime

Gets or sets the generator's activation time.

public float ActivationTime { get; set; }

Property Value

float

Base

Gets the base MapGeneration.Distributors.Scp079Generator.

public Scp079Generator Base { get; }

Property Value

Scp079Generator

CurrentTime

Gets or sets the generator's current time.

public short CurrentTime { get; set; }

Property Value

short

DeactivationTime

Gets or sets the generator's deactivation time.

public float DeactivationTime { get; set; }

Property Value

float

DeniedUnlockCooldown

Gets or sets the interaction cooldown to wait after failing the generator's unlock interaction.

public float DeniedUnlockCooldown { get; set; }

Property Value

float

DropdownSpeed

Gets the generator's dropdown speed.

public float DropdownSpeed { get; }

Property Value

float

GameObject

Gets the UnityEngine.GameObject of the generator.

public GameObject GameObject { get; }

Property Value

GameObject

InteractionCooldown

Gets or sets current interaction cooldown.

public float InteractionCooldown { get; set; }

Property Value

float

IsActivating

Gets or sets a value indicating whether the generator is activating.

public bool IsActivating { get; set; }

Property Value

bool

IsEngaged

Gets or sets a value indicating whether the generator is engaged.

public bool IsEngaged { get; set; }

Property Value

bool

IsOpen

Gets or sets a value indicating whether the generator is open.

public bool IsOpen { get; set; }

Property Value

bool

IsReady

Gets a value indicating whether the generator is ready to be activated.

public bool IsReady { get; }

Property Value

bool

IsUnlocked

Gets or sets a value indicating whether the generator is unlocked.

public bool IsUnlocked { get; set; }

Property Value

bool

KeycardPermissions

Gets or sets the required permissions to interact with the generator.

public KeycardPermissions KeycardPermissions { get; set; }

Property Value

KeycardPermissions

LastActivator

Gets or sets the last activator for the generator.

public Player LastActivator { get; set; }

Property Value

Player

LeverDelay

Gets or sets the generator's lever delay.

public float LeverDelay { get; set; }

Property Value

float

List

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

public static IReadOnlyCollection<Generator> List { get; }

Property Value

IReadOnlyCollection<Generator>

Position

Gets the generator position.

public Vector3 Position { get; }

Property Value

Vector3

Room

Gets the generator's Room.

public Room Room { get; }

Property Value

Room

Rotation

Gets the generator rotation.

public Quaternion Rotation { get; }

Property Value

Quaternion

State

Gets or sets the generator' state.

public GeneratorState State { get; set; }

Property Value

GeneratorState

TogglePanelCooldown

Gets or sets the cooldown to wait before toggling the generator's panel.

public float TogglePanelCooldown { get; set; }

Property Value

float

Transform

Gets the UnityEngine.Transform of the generator.

public Transform Transform { get; }

Property Value

Transform

UnlockCooldown

Gets or sets the interaction cooldown to wait after unlocking the generator.

public float UnlockCooldown { get; set; }

Property Value

float

Methods

DenyUnlock()

Denies the unlock.

public void DenyUnlock()

DenyUnlockAndResetCooldown()

Denies the unlock and resets the interaction cooldown.

public void DenyUnlockAndResetCooldown()

Get(GeneratorState)

Gets a IEnumerable<T> of Generator given the specified GeneratorState.

public static IEnumerable<Generator> Get(GeneratorState state)

Parameters

state GeneratorState

The GeneratorState to search for.

Returns

IEnumerable<Generator>

The Generator with the given GeneratorState or null if not found.

Get(Scp079Generator)

Gets the Generator belonging to the MapGeneration.Distributors.Scp079Generator, if any.

public static Generator Get(Scp079Generator scp079Generator)

Parameters

scp079Generator Scp079Generator

The MapGeneration.Distributors.Scp079Generator instance.

Returns

Generator

A Generator or null if not found.

Get(Func<Generator, bool>)

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

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

Parameters

predicate Func<Generator, bool>

The condition to satify.

Returns

IEnumerable<Generator>

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

SetPermissionFlag(KeycardPermissions, bool)

Sets the specified KeycardPermissions flag.

public void SetPermissionFlag(KeycardPermissions flag, bool isEnabled)

Parameters

flag KeycardPermissions

The flag to set.

isEnabled bool

A value indicating whether the flag is enabled.

ToString()

Returns the Generator in a human-readable format.

public override string ToString()

Returns

string

A string containing Generator-related data.

TryGet(GeneratorState, out IEnumerable<Generator>)

Try-get a IEnumerable<T> of Generator given the specified GeneratorState.

public static bool TryGet(GeneratorState state, out IEnumerable<Generator> generators)

Parameters

state GeneratorState

The GeneratorState to search for.

generators IEnumerable<Generator>

A IEnumerable<T> of Generator matching the GeneratorState.

Returns

bool

Whether at least one generator was found.

TryGet(Scp079Generator, out Generator)

Try-get a Generator belonging to the MapGeneration.Distributors.Scp079Generator, if any.

public static bool TryGet(Scp079Generator scp079Generator, out Generator generator)

Parameters

scp079Generator Scp079Generator

The MapGeneration.Distributors.Scp079Generator instance.

generator Generator

A Generator or null if not found.

Returns

bool

Whether a generator was found.

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

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

public static bool TryGet(Func<Generator, bool> predicate, out IEnumerable<Generator> generators)

Parameters

predicate Func<Generator, bool>

The condition to satify.

generators IEnumerable<Generator>

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

Returns

bool

Whether at least one generator was found.