Class Generator
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
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
DeactivationTime
Gets or sets the generator's deactivation time.
public float DeactivationTime { get; set; }
Property Value
DeniedUnlockCooldown
Gets or sets the interaction cooldown to wait after failing the generator's unlock interaction.
public float DeniedUnlockCooldown { get; set; }
Property Value
DropdownSpeed
Gets the generator's dropdown speed.
public float DropdownSpeed { get; }
Property Value
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
IsActivating
Gets or sets a value indicating whether the generator is activating.
public bool IsActivating { get; set; }
Property Value
IsEngaged
Gets or sets a value indicating whether the generator is engaged.
public bool IsEngaged { get; set; }
Property Value
IsOpen
Gets or sets a value indicating whether the generator is open.
public bool IsOpen { get; set; }
Property Value
IsReady
Gets a value indicating whether the generator is ready to be activated.
public bool IsReady { get; }
Property Value
IsUnlocked
Gets or sets a value indicating whether the generator is unlocked.
public bool IsUnlocked { get; set; }
Property Value
KeycardPermissions
Gets or sets the required permissions to interact with the generator.
public KeycardPermissions KeycardPermissions { get; set; }
Property Value
LastActivator
Gets or sets the last activator for the generator.
public Player LastActivator { get; set; }
Property Value
LeverDelay
Gets or sets the generator's lever delay.
public float LeverDelay { get; set; }
Property Value
List
Gets a IEnumerable<T> of Generator which contains all the Generator instances.
public static IReadOnlyCollection<Generator> List { get; }
Property Value
Position
Gets the generator position.
public Vector3 Position { get; }
Property Value
- Vector3
Room
Gets the generator's Room.
public Room Room { get; }
Property Value
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
TogglePanelCooldown
Gets or sets the cooldown to wait before toggling the generator's panel.
public float TogglePanelCooldown { get; set; }
Property Value
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
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
GeneratorStateThe 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
Scp079GeneratorThe MapGeneration.Distributors.Scp079Generator instance.
Returns
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
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
KeycardPermissionsThe flag to set.
isEnabled
boolA 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
GeneratorStateThe 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
Scp079GeneratorThe MapGeneration.Distributors.Scp079Generator instance.
generator
Generator
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.