Do not allow starting pulling while cuffed (#5457)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Buckle.Components;
|
||||
using Content.Shared.GameTicking;
|
||||
@@ -14,6 +15,7 @@ using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Input.Binding;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Players;
|
||||
@@ -23,6 +25,8 @@ namespace Content.Shared.Pulling
|
||||
{
|
||||
public abstract partial class SharedPullingSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
|
||||
|
||||
public bool CanPull(IEntity puller, IEntity pulled)
|
||||
{
|
||||
if (!puller.HasComponent<SharedPullerComponent>())
|
||||
@@ -30,6 +34,11 @@ namespace Content.Shared.Pulling
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_blocker.CanInteract(puller.Uid))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!pulled.TryGetComponent<IPhysBody>(out var _physics))
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user