Add checks missing in the current half-implementation of lockable sto… (#8004)
This commit is contained in:
@@ -191,6 +191,9 @@ namespace Content.Server.Storage.EntitySystems
|
|||||||
if (!storageComp.ClickInsert)
|
if (!storageComp.ClickInsert)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (TryComp(uid, out LockComponent? lockComponent) && lockComponent.Locked)
|
||||||
|
return;
|
||||||
|
|
||||||
Logger.DebugS(storageComp.LoggerName, $"Storage (UID {uid}) attacked by user (UID {args.User}) with entity (UID {args.Used}).");
|
Logger.DebugS(storageComp.LoggerName, $"Storage (UID {uid}) attacked by user (UID {args.User}) with entity (UID {args.Used}).");
|
||||||
|
|
||||||
if (HasComp<PlaceableSurfaceComponent>(uid))
|
if (HasComp<PlaceableSurfaceComponent>(uid))
|
||||||
@@ -209,6 +212,9 @@ namespace Content.Server.Storage.EntitySystems
|
|||||||
if (!TryComp<ActorComponent>(args.User, out var actor))
|
if (!TryComp<ActorComponent>(args.User, out var actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (TryComp(uid, out LockComponent? lockComponent) && lockComponent.Locked)
|
||||||
|
return;
|
||||||
|
|
||||||
OpenStorageUI(uid, args.User, storageComp);
|
OpenStorageUI(uid, args.User, storageComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user