Two small bugfixes (#8285)
This commit is contained in:
@@ -34,7 +34,6 @@ namespace Content.Server.Hands.Systems
|
|||||||
if (TryComp(hand.HeldEntity, out HandVirtualItemComponent? virt) && virt.BlockingEntity == matching)
|
if (TryComp(hand.HeldEntity, out HandVirtualItemComponent? virt) && virt.BlockingEntity == matching)
|
||||||
{
|
{
|
||||||
Delete(virt, user);
|
Delete(virt, user);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Robust.Shared.Player;
|
|||||||
using Content.Shared.Storage;
|
using Content.Shared.Storage;
|
||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using Content.Shared.Hands.Components;
|
using Content.Shared.Hands.Components;
|
||||||
|
using Content.Shared.ActionBlocker;
|
||||||
|
|
||||||
namespace Content.Server.Resist;
|
namespace Content.Server.Resist;
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ public sealed class EscapeInventorySystem : EntitySystem
|
|||||||
[Dependency] private readonly DoAfterSystem _doAfterSystem = default!;
|
[Dependency] private readonly DoAfterSystem _doAfterSystem = default!;
|
||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
||||||
|
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -35,7 +37,8 @@ public sealed class EscapeInventorySystem : EntitySystem
|
|||||||
if (_containerSystem.TryGetContainingContainer(uid, out var container)
|
if (_containerSystem.TryGetContainingContainer(uid, out var container)
|
||||||
&& (HasComp<SharedStorageComponent>(container.Owner) || HasComp<InventoryComponent>(container.Owner) || HasComp<SharedHandsComponent>(container.Owner)))
|
&& (HasComp<SharedStorageComponent>(container.Owner) || HasComp<InventoryComponent>(container.Owner) || HasComp<SharedHandsComponent>(container.Owner)))
|
||||||
{
|
{
|
||||||
AttemptEscape(uid, container.Owner, component);
|
if (_actionBlockerSystem.CanInteract(uid, container.Owner))
|
||||||
|
AttemptEscape(uid, container.Owner, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user