ctrl-rclick tweaks (#7170)
This commit is contained in:
@@ -4,11 +4,8 @@ using Content.Shared.Physics.Pull;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Pulling.Events;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Log;
|
||||
|
||||
namespace Content.Shared.Pulling
|
||||
{
|
||||
@@ -29,12 +26,12 @@ namespace Content.Shared.Pulling
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!EntityManager.TryGetComponent<IPhysBody?>(pulled, out var _physics))
|
||||
if (!EntityManager.TryGetComponent<IPhysBody?>(pulled, out var physics))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_physics.BodyType == BodyType.Static)
|
||||
if (physics.BodyType == BodyType.Static)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -181,7 +178,7 @@ namespace Content.Shared.Pulling
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryMoveTo(SharedPullableComponent pullable, EntityCoordinates to)
|
||||
public virtual bool TryMoveTo(SharedPullableComponent pullable, EntityCoordinates to)
|
||||
{
|
||||
if (pullable.Puller == null)
|
||||
{
|
||||
@@ -193,13 +190,8 @@ namespace Content.Shared.Pulling
|
||||
return false;
|
||||
}
|
||||
|
||||
_pullSm.ForceSetMovingTo(pullable, to);
|
||||
// Action handled under server
|
||||
return true;
|
||||
}
|
||||
|
||||
public void StopMoveTo(SharedPullableComponent pullable)
|
||||
{
|
||||
_pullSm.ForceSetMovingTo(pullable, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user