Class Generator
Wrapper class for MapGeneration.Distributors.Scp079Generator.
Inheritance
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public class Generator : IWrapper<Scp079Generator>, IWorldSpace, IPosition, IRotation
Properties
| Improve this Doc View SourceActivationTime
Gets or sets the generator's activation time.
Declaration
public float ActivationTime { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Base
Gets the base MapGeneration.Distributors.Scp079Generator.
Declaration
public Scp079Generator Base { get; }
Property Value
Type | Description |
---|---|
MapGeneration.Distributors.Scp079Generator |
CurrentTime
Gets or sets the generator's current time.
Declaration
public short CurrentTime { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
DeactivationTime
Gets or sets the generator's deactivation time.
Declaration
public float DeactivationTime { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
DeniedUnlockCooldown
Gets or sets the interaction cooldown to wait after failing the generator's unlock interaction.
Declaration
public float DeniedUnlockCooldown { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
DropdownSpeed
Gets the generator's dropdown speed.
Declaration
public float DropdownSpeed { get; }
Property Value
Type | Description |
---|---|
System.Single |
GameObject
Gets the UnityEngine.GameObject of the generator.
Declaration
public GameObject GameObject { get; }
Property Value
Type | Description |
---|---|
UnityEngine.GameObject |
InteractionCooldown
Gets or sets current interaction cooldown.
Declaration
public float InteractionCooldown { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
IsActivating
Gets or sets a value indicating whether the generator is activating.
Declaration
public bool IsActivating { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsEngaged
Gets or sets a value indicating whether the generator is engaged.
Declaration
public bool IsEngaged { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsOpen
Gets or sets a value indicating whether the generator is open.
Declaration
public bool IsOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsReady
Gets a value indicating whether the generator is ready to be activated.
Declaration
public bool IsReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUnlocked
Gets or sets a value indicating whether the generator is unlocked.
Declaration
public bool IsUnlocked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
KeycardPermissions
Gets or sets the required permissions to interact with the generator.
Declaration
public KeycardPermissions KeycardPermissions { get; set; }
Property Value
Type | Description |
---|---|
KeycardPermissions |
LastActivator
Gets or sets the last activator for the generator.
Declaration
public Player LastActivator { get; set; }
Property Value
Type | Description |
---|---|
Player |
LeverDelay
Gets or sets the generator's lever delay.
Declaration
public float LeverDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
List
Gets a System.Collections.Generic.IEnumerable<T> of Generator which contains all the Generator instances.
Declaration
public static IReadOnlyCollection<Generator> List { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<Generator> |
Position
Gets the generator position.
Declaration
public Vector3 Position { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
Room
Gets the generator's Room.
Declaration
public Room Room { get; }
Property Value
Type | Description |
---|---|
Room |
Rotation
Gets the generator rotation.
Declaration
public Quaternion Rotation { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Quaternion |
State
Gets or sets the generator' state.
Declaration
public GeneratorState State { get; set; }
Property Value
Type | Description |
---|---|
GeneratorState |
TogglePanelCooldown
Gets or sets the cooldown to wait before toggling the generator's panel.
Declaration
public float TogglePanelCooldown { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Transform
Gets the UnityEngine.Transform of the generator.
Declaration
public Transform Transform { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
UnlockCooldown
Gets or sets the interaction cooldown to wait after unlocking the generator.
Declaration
public float UnlockCooldown { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
| Improve this Doc View SourceDenyUnlock()
Denies the unlock.
Declaration
public void DenyUnlock()
DenyUnlockAndResetCooldown()
Denies the unlock and resets the interaction cooldown.
Declaration
public void DenyUnlockAndResetCooldown()
Get(GeneratorState)
Gets a System.Collections.Generic.IEnumerable<T> of Generator given the specified GeneratorState.
Declaration
public static IEnumerable<Generator> Get(GeneratorState state)
Parameters
Type | Name | Description |
---|---|---|
GeneratorState | state | The GeneratorState to search for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.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.
Declaration
public static Generator Get(Scp079Generator scp079Generator)
Parameters
Type | Name | Description |
---|---|---|
MapGeneration.Distributors.Scp079Generator | scp079Generator | The MapGeneration.Distributors.Scp079Generator instance. |
Returns
Type | Description |
---|---|
Generator | A Generator or null if not found. |
Get(Func<Generator, Boolean>)
Gets a System.Collections.Generic.IEnumerable<T> of Generator filtered based on a predicate.
Declaration
public static IEnumerable<Generator> Get(Func<Generator, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Generator, System.Boolean> | predicate | The condition to satify. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Generator> | A System.Collections.Generic.IEnumerable<T> of Generator which contains elements that satify the condition. |
SetPermissionFlag(KeycardPermissions, Boolean)
Sets the specified KeycardPermissions flag.
Declaration
public void SetPermissionFlag(KeycardPermissions flag, bool isEnabled)
Parameters
Type | Name | Description |
---|---|---|
KeycardPermissions | flag | The flag to set. |
System.Boolean | isEnabled | A value indicating whether the flag is enabled. |
ToString()
Returns the Generator in a human-readable format.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string containing Generator-related data. |
Overrides
TryGet(GeneratorState, out IEnumerable<Generator>)
Try-get a System.Collections.Generic.IEnumerable<T> of Generator given the specified GeneratorState.
Declaration
public static bool TryGet(GeneratorState state, out IEnumerable<Generator> generators)
Parameters
Type | Name | Description |
---|---|---|
GeneratorState | state | The GeneratorState to search for. |
System.Collections.Generic.IEnumerable<Generator> | generators | A System.Collections.Generic.IEnumerable<T> of Generator matching the GeneratorState. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not at least one generator was found. |
TryGet(Scp079Generator, out Generator)
Try-get a Generator belonging to the MapGeneration.Distributors.Scp079Generator, if any.
Declaration
public static bool TryGet(Scp079Generator scp079Generator, out Generator generator)
Parameters
Type | Name | Description |
---|---|---|
MapGeneration.Distributors.Scp079Generator | scp079Generator | The MapGeneration.Distributors.Scp079Generator instance. |
Generator | generator | A Generator or null if not found. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not a generator was found. |
TryGet(Func<Generator, Boolean>, out IEnumerable<Generator>)
Try-get a System.Collections.Generic.IEnumerable<T> of Generator filtered based on a predicate.
Declaration
public static bool TryGet(Func<Generator, bool> predicate, out IEnumerable<Generator> generators)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Generator, System.Boolean> | predicate | The condition to satify. |
System.Collections.Generic.IEnumerable<Generator> | generators | A System.Collections.Generic.IEnumerable<T> of Generator which contains elements that satify the condition. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not at least one generator was found. |