Got rid of some IEntities
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Content.Shared.Interaction
|
||||
public const float InteractionRange = 2;
|
||||
public const float InteractionRangeSquared = InteractionRange * InteractionRange;
|
||||
|
||||
public delegate bool Ignored(IEntity entity);
|
||||
public delegate bool Ignored(EntityUid entity);
|
||||
|
||||
/// <summary>
|
||||
/// Traces a ray from coords to otherCoords and returns the length
|
||||
@@ -94,7 +94,7 @@ namespace Content.Shared.Interaction
|
||||
{
|
||||
var predicate = ignoredEnt == null
|
||||
? null
|
||||
: (Ignored) (e => e == ignoredEnt);
|
||||
: (Ignored) (e => e == ignoredEnt?.Uid);
|
||||
|
||||
return UnobstructedDistance(origin, other, collisionMask, predicate);
|
||||
}
|
||||
@@ -212,7 +212,7 @@ namespace Content.Shared.Interaction
|
||||
bool ignoreInsideBlocker = false,
|
||||
bool popup = false)
|
||||
{
|
||||
predicate ??= e => e == origin || e == other;
|
||||
predicate ??= e => e == origin.Uid || e == other.Uid;
|
||||
return InRangeUnobstructed(origin, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(other).MapPosition, range, collisionMask, predicate, ignoreInsideBlocker, popup);
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ namespace Content.Shared.Interaction
|
||||
bool popup = false)
|
||||
{
|
||||
var originPosition = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(origin).MapPosition;
|
||||
predicate ??= e => e == origin;
|
||||
predicate ??= e => e == origin.Uid;
|
||||
|
||||
var inRange = InRangeUnobstructed(originPosition, other, range, collisionMask, predicate, ignoreInsideBlocker);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user