DrinkSystem uses EntityUid instead of IEntity

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 11:28:27 +01:00
parent 0220551f72
commit 1a177f7479
12 changed files with 71 additions and 32 deletions

View File

@@ -8,6 +8,7 @@ using static Content.Shared.Interaction.SharedInteractionSystem;
namespace Content.Shared.Interaction.Helpers
{
// TODO: Kill these with fire.
public static class SharedUnobstructedExtensions
{
private static SharedInteractionSystem SharedInteractionSystem => EntitySystem.Get<SharedInteractionSystem>();
@@ -26,6 +27,22 @@ namespace Content.Shared.Interaction.Helpers
ignoreInsideBlocker, popup);
}
public static bool InRangeUnobstructed(
this EntityUid origin,
EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
bool ignoreInsideBlocker = false,
bool popup = false,
IEntityManager? entityManager = null)
{
entityManager ??= IoCManager.Resolve<IEntityManager>();
return InRangeUnobstructed(entityManager.GetEntity(origin), entityManager.GetEntity(other),
range, collisionMask, predicate, ignoreInsideBlocker, popup);
}
public static bool InRangeUnobstructed(
this IEntity origin,
IComponent other,