Removed open and unlock for mobs with no hands (#9984)

* removed verbs open and unlock for mobs with no hands

* fix the file where check the hands

* fix now using HasComp looking for SharedHandsComponent

* remove blank line

* remove blank line

Co-authored-by: zero <ribeirolucasdev@gmail.com>
This commit is contained in:
Lucas
2022-07-25 22:31:25 -03:00
committed by GitHub
parent 5449e7875e
commit 78c784c5ae
2 changed files with 8 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ using Content.Server.Storage.Components;
using Content.Server.Tools.Systems;
using Content.Shared.Body.Components;
using Content.Shared.Destructible;
using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Content.Shared.Placeable;
@@ -148,7 +149,6 @@ public sealed class EntityStorageSystem : EntitySystem
var ev = new StorageBeforeCloseEvent(uid, entities);
RaiseLocalEvent(uid, ev, true);
var count = 0;
foreach (var entity in ev.Contents)
{
@@ -233,6 +233,9 @@ public sealed class EntityStorageSystem : EntitySystem
if (!Resolve(target, ref component))
return false;
if (!HasComp<SharedHandsComponent>(user))
return false;
if (component.IsWeldedShut)
{
if (!silent && !component.Contents.Contains(user))
@@ -361,6 +364,5 @@ public sealed class EntityStorageSystem : EntitySystem
appearance.SetData(StorageVisuals.Open, component.Open);
appearance.SetData(StorageVisuals.HasContents, component.Contents.ContainedEntities.Count() > 0);
}
}
}