Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.DragDrop;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Eye.Blinding;
|
||||
using Content.Shared.Eye.Blinding.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Utility;
|
||||
using static Content.Shared.Interaction.SharedInteractionSystem;
|
||||
@@ -191,7 +188,7 @@ namespace Content.Shared.Examine
|
||||
}
|
||||
|
||||
var bBox = o.BoundingBox;
|
||||
bBox = bBox.Translated(entMan.GetComponent<TransformComponent>(o.Owner).WorldPosition);
|
||||
bBox = bBox.Translated(entMan.GetComponent<TransformComponent>(result.HitEntity).WorldPosition);
|
||||
|
||||
if (bBox.Contains(origin.Position) || bBox.Contains(other.Position))
|
||||
{
|
||||
@@ -213,15 +210,6 @@ namespace Content.Shared.Examine
|
||||
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
||||
}
|
||||
|
||||
public static bool InRangeUnOccluded(EntityUid origin, IComponent other, float range = ExamineRange, Ignored? predicate = null, bool ignoreInsideBlocker = true)
|
||||
{
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
var originPos = entMan.GetComponent<TransformComponent>(origin).MapPosition;
|
||||
var otherPos = entMan.GetComponent<TransformComponent>(other.Owner).MapPosition;
|
||||
|
||||
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
|
||||
}
|
||||
|
||||
public static bool InRangeUnOccluded(EntityUid origin, EntityCoordinates other, float range = ExamineRange, Ignored? predicate = null, bool ignoreInsideBlocker = true)
|
||||
{
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
Reference in New Issue
Block a user