More error fixes.

This commit is contained in:
Vera Aguilera Puerto
2021-12-04 12:47:09 +01:00
parent 424c83e39c
commit 151778a1b9
30 changed files with 97 additions and 123 deletions

View File

@@ -15,8 +15,8 @@ namespace Content.Shared.Interaction.Helpers
#region Entities
public static bool InRangeUnobstructed(
this IEntity origin,
IEntity other,
this EntityUid origin,
EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -44,7 +44,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
this IEntity origin,
this EntityUid origin,
IComponent other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -57,7 +57,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
this IEntity origin,
this EntityUid origin,
IContainer other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -72,7 +72,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
this IEntity origin,
this EntityUid origin,
EntityCoordinates other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -85,7 +85,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
this IEntity origin,
this EntityUid origin,
MapCoordinates other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -101,7 +101,7 @@ namespace Content.Shared.Interaction.Helpers
#region Components
public static bool InRangeUnobstructed(
this IComponent origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -179,7 +179,7 @@ namespace Content.Shared.Interaction.Helpers
#region Containers
public static bool InRangeUnobstructed(
this IContainer origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -256,7 +256,7 @@ namespace Content.Shared.Interaction.Helpers
#region EntityCoordinates
public static bool InRangeUnobstructed(
this EntityCoordinates origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -338,7 +338,7 @@ namespace Content.Shared.Interaction.Helpers
#region MapCoordinates
public static bool InRangeUnobstructed(
this MapCoordinates origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -434,7 +434,7 @@ namespace Content.Shared.Interaction.Helpers
if (target == null)
return SharedInteractionSystem.InRangeUnobstructed(user, args.ClickLocation, range, collisionMask, predicate, ignoreInsideBlocker, popup);
else
return SharedInteractionSystem.InRangeUnobstructed(user, target, range, collisionMask, predicate, ignoreInsideBlocker, popup);
return SharedInteractionSystem.InRangeUnobstructed(user, target.Value, range, collisionMask, predicate, ignoreInsideBlocker, popup);
}
#endregion
@@ -475,7 +475,7 @@ namespace Content.Shared.Interaction.Helpers
if (target == null)
return SharedInteractionSystem.InRangeUnobstructed(user, args.ClickLocation, range, collisionMask, predicate, ignoreInsideBlocker, popup);
else
return SharedInteractionSystem.InRangeUnobstructed(user, target, range, collisionMask, predicate, ignoreInsideBlocker, popup);
return SharedInteractionSystem.InRangeUnobstructed(user, target.Value, range, collisionMask, predicate, ignoreInsideBlocker, popup);
}
#endregion
}

View File

@@ -13,8 +13,8 @@ namespace Content.Shared.Interaction.Helpers
{
#region Entities
public static bool InRangeUnOccluded(
this IEntity origin,
IEntity other,
this EntityUid origin,
EntityUid other,
float range = ExamineRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -23,7 +23,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
this IEntity origin,
this EntityUid origin,
IComponent other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -33,7 +33,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
this IEntity origin,
this EntityUid origin,
IContainer other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -45,7 +45,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
this IEntity origin,
this EntityUid origin,
EntityCoordinates other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -55,7 +55,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
this IEntity origin,
this EntityUid origin,
MapCoordinates other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -68,7 +68,7 @@ namespace Content.Shared.Interaction.Helpers
#region Components
public static bool InRangeUnOccluded(
this IComponent origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -133,7 +133,7 @@ namespace Content.Shared.Interaction.Helpers
#region Containers
public static bool InRangeUnOccluded(
this IContainer origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -198,7 +198,7 @@ namespace Content.Shared.Interaction.Helpers
#region EntityCoordinates
public static bool InRangeUnOccluded(
this EntityCoordinates origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -275,7 +275,7 @@ namespace Content.Shared.Interaction.Helpers
#region MapCoordinates
public static bool InRangeUnOccluded(
this MapCoordinates origin,
IEntity other,
EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)

View File

@@ -21,14 +21,14 @@ namespace Content.Shared.Interaction
public class InteractHandEventArgs : EventArgs, ITargetedInteractEventArgs
{
public InteractHandEventArgs(IEntity user, IEntity target)
public InteractHandEventArgs(EntityUid user, EntityUid target)
{
User = user;
Target = target;
}
public IEntity User { get; }
public IEntity Target { get; }
public EntityUid User { get; }
public EntityUid Target { get; }
}
/// <summary>
@@ -40,24 +40,14 @@ namespace Content.Shared.Interaction
/// <summary>
/// Entity that triggered the interaction.
/// </summary>
public IEntity User { get; }
/// <summary>
/// Entity that triggered the interaction.
/// </summary>
public EntityUid UserUid => User;
public EntityUid User { get; }
/// <summary>
/// Entity that was interacted on.
/// </summary>
public IEntity Target { get; }
public EntityUid Target { get; }
/// <summary>
/// Entity that was interacted on.
/// </summary>
public EntityUid TargetUid => Target;
public InteractHandEvent(IEntity user, IEntity target)
public InteractHandEvent(EntityUid user, EntityUid target)
{
User = user;
Target = target;