Show / Hide Table of Contents

Class LockSystem

Handles (un)locking and examining of Lock components

Inheritance
System.Object
LockSystem
Namespace: Content.Shared.Lock
Assembly: Content.Shared.dll
Syntax
public sealed class LockSystem : EntitySystem

Methods

| Improve this Doc View Source

CanToggleLock(EntityUid, EntityUid, Boolean)

Raises an event for other components to check whether or not the entity can be locked in its current state.

Declaration
public bool CanToggleLock(EntityUid uid, EntityUid user, bool quiet = true)
Parameters
Type Name Description
EntityUid uid
EntityUid user
System.Boolean quiet
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Initialize()

Declaration
public override void Initialize()
| Improve this Doc View Source

TryLock(EntityUid, EntityUid, LockComponent)

Attmempts to lock a given entity

Declaration
public bool TryLock(EntityUid uid, EntityUid user, LockComponent lockComp = null)
Parameters
Type Name Description
EntityUid uid

The entity with the lock

EntityUid user

The person trying to lock it

LockComponent lockComp
Returns
Type Description
System.Boolean

If locking was successful

| Improve this Doc View Source

TryUnlock(EntityUid, EntityUid, LockComponent)

Attmempts to unlock a given entity

Declaration
public bool TryUnlock(EntityUid uid, EntityUid user, LockComponent lockComp = null)
Parameters
Type Name Description
EntityUid uid

The entity with the lock

EntityUid user

The person trying to unlock it

LockComponent lockComp
Returns
Type Description
System.Boolean

If locking was successful

| Improve this Doc View Source

Unlock(EntityUid, Nullable<EntityUid>, LockComponent)

Forces a given entity to be unlocked

Declaration
public void Unlock(EntityUid uid, EntityUid? user, LockComponent lockComp = null)
Parameters
Type Name Description
EntityUid uid

The entity with the lock

System.Nullable<EntityUid> user

The person unlocking it. Can be null

LockComponent lockComp
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾