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:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user