diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index 478f0123d2..fd73d86a3a 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -446,7 +446,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click return; } - var attackBys = attacked.GetAllComponents().ToList(); + var attackBys = attacked.GetAllComponents().OrderByDescending(x => x.Priority); var attackByEventArgs = new InteractUsingEventArgs { User = user, ClickLocation = clickLocation, Using = weapon, Target = attacked diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs index 79890756a0..1589b00493 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -12,6 +13,12 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// public interface IInteractUsing { + /// + /// The interaction Priority. Higher numbers get called first. + /// + /// Prority defaults to 0 + int Priority { get => 0; } + /// /// Called when using one object on another when user is in range of the target entity. ///