Disable the lock/unlock verb if we can't do that (#39605)

* Fix

* Update
This commit is contained in:
Winkarst-cpu
2025-08-13 13:52:08 +03:00
committed by GitHub
parent 2743dcf67f
commit 99ad34ed06

View File

@@ -309,6 +309,7 @@ public sealed class LockSystem : EntitySystem
AlternativeVerb verb = new() AlternativeVerb verb = new()
{ {
Disabled = !CanToggleLock(uid, args.User),
Act = component.Locked Act = component.Locked
? () => TryUnlock(uid, args.User, component) ? () => TryUnlock(uid, args.User, component)
: () => TryLock(uid, args.User, component), : () => TryLock(uid, args.User, component),