Remove ignore-inside-blocker (#6692)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Server.AI.Utility;
|
||||
using Content.Server.AI.Utility;
|
||||
using Content.Server.AI.WorldState.States.Inventory;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Interaction;
|
||||
@@ -54,7 +54,7 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
|
||||
public override Outcome Execute(float frameTime)
|
||||
{
|
||||
if (_target == default || !_owner.InRangeUnobstructed(_target, popup: true))
|
||||
if (_target == default || !EntitySystem.Get<SharedInteractionSystem>().InRangeUnobstructed(_owner, _target, popup: true))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Server.CombatMode;
|
||||
using Content.Server.Interaction;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Helpers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -34,7 +35,9 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
if (!_owner.InRangeUnobstructed(_useTarget, popup: true))
|
||||
var interactionSystem = EntitySystem.Get<InteractionSystem>();
|
||||
|
||||
if (!interactionSystem.InRangeUnobstructed(_owner, _useTarget, popup: true))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
@@ -45,7 +48,6 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
}
|
||||
|
||||
// Click on da thing
|
||||
var interactionSystem = EntitySystem.Get<InteractionSystem>();
|
||||
interactionSystem.AiUseInteraction(_owner, targetTransform.Coordinates, _useTarget);
|
||||
|
||||
return Outcome.Success;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Server.AI.Utility;
|
||||
using Content.Server.AI.Utility;
|
||||
using Content.Server.AI.WorldState.States.Inventory;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Interaction;
|
||||
@@ -30,7 +30,7 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
return Outcome.Success;
|
||||
}
|
||||
|
||||
if (!_owner.InRangeUnobstructed(container, popup: true))
|
||||
if (!EntitySystem.Get<SharedInteractionSystem>().InRangeUnobstructed(_owner, container.Owner, popup: true))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Server.Interaction;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Helpers;
|
||||
using Content.Shared.Item;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -27,7 +28,7 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
if (entMan.Deleted(_target)
|
||||
|| !entMan.HasComponent<SharedItemComponent>(_target)
|
||||
|| _target.IsInContainer()
|
||||
|| !_owner.InRangeUnobstructed(_target, popup: true))
|
||||
|| !EntitySystem.Get<SharedInteractionSystem>().InRangeUnobstructed(_owner, _target, popup: true))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using Content.Server.AI.Pathfinding.Pathfinders;
|
||||
using Content.Server.CPUJob.JobQueues;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Helpers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -28,6 +29,7 @@ namespace Content.Server.AI.Steering
|
||||
[Dependency] private readonly IPauseManager _pauseManager = default!;
|
||||
[Dependency] private readonly PathfindingSystem _pathfindingSystem = default!;
|
||||
[Dependency] private readonly AccessReaderSystem _accessReader = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Whether we try to avoid non-blocking physics objects
|
||||
@@ -283,7 +285,7 @@ namespace Content.Server.AI.Steering
|
||||
if (targetDistance <= steeringRequest.ArrivalDistance && steeringRequest.TimeUntilInteractionCheck <= 0.0f)
|
||||
{
|
||||
if (!steeringRequest.RequiresInRangeUnobstructed ||
|
||||
entity.InRangeUnobstructed(steeringRequest.TargetMap, steeringRequest.ArrivalDistance, popup: true))
|
||||
_interactionSystem.InRangeUnobstructed(entity, steeringRequest.TargetMap, steeringRequest.ArrivalDistance, popup: true))
|
||||
{
|
||||
// TODO: Need cruder LOS checks for ranged weaps
|
||||
controller.VelocityDir = Vector2.Zero;
|
||||
|
||||
Reference in New Issue
Block a user