Remove IAfterInteract (#9715)

* remove gas analyzer iafterinteract

* solution transfer + obsolete

* cuffable

* remove
This commit is contained in:
Kara
2022-07-14 04:45:31 -07:00
committed by GitHub
parent a2d22837c6
commit fab331742a
11 changed files with 163 additions and 241 deletions

View File

@@ -5,43 +5,6 @@ using Robust.Shared.Map;
namespace Content.Shared.Interaction
{
/// <summary>
/// This interface gives components a behavior when their entity is in the active hand, when
/// clicking on another object and no interaction occurs, at any range. This includes
/// clicking on an object in the world as well as clicking on an object in inventory.
/// </summary>
[RequiresExplicitImplementation]
public interface IAfterInteract
{
/// <summary>
/// The interaction priority. Higher numbers get called first.
/// </summary>
/// <value>Priority defaults to 0</value>
int Priority => 0;
/// <summary>
/// Called when we interact with nothing, or when we interact with an entity out of range that has no behavior
/// </summary>
[Obsolete("Use AfterInteractMessage instead")]
Task<bool> AfterInteract(AfterInteractEventArgs eventArgs);
}
public sealed class AfterInteractEventArgs : EventArgs
{
public EntityUid User { get; }
public EntityCoordinates ClickLocation { get; }
public EntityUid? Target { get; }
public bool CanReach { get; }
public AfterInteractEventArgs(EntityUid user, EntityCoordinates clickLocation, EntityUid? target, bool canReach)
{
User = user;
ClickLocation = clickLocation;
Target = target;
CanReach = canReach;
}
}
[PublicAPI]
public abstract class InteractEvent : HandledEntityEventArgs
{

View File

@@ -343,37 +343,5 @@ namespace Content.Shared.Interaction.Helpers
ignoreInsideBlocker);
}
#endregion
#region EventArgs
public static bool InRangeUnOccluded(
this ITargetedInteractEventArgs args,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
{
return ExamineSystemShared.InRangeUnOccluded(args, range, predicate,
ignoreInsideBlocker);
}
public static bool InRangeUnOccluded(
this DragDropEvent args,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
{
return ExamineSystemShared.InRangeUnOccluded(args, range, predicate,
ignoreInsideBlocker);
}
public static bool InRangeUnOccluded(
this AfterInteractEventArgs args,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
{
return ExamineSystemShared.InRangeUnOccluded(args, range, predicate,
ignoreInsideBlocker);
}
#endregion
}
}