Add priority sorting to InteractUsing

This commit is contained in:
juliangiebel
2020-08-12 23:01:30 +02:00
parent f0e9729508
commit ba058ccbdd
2 changed files with 8 additions and 1 deletions

View File

@@ -446,7 +446,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click
return;
}
var attackBys = attacked.GetAllComponents<IInteractUsing>().ToList();
var attackBys = attacked.GetAllComponents<IInteractUsing>().OrderByDescending(x => x.Priority);
var attackByEventArgs = new InteractUsingEventArgs
{
User = user, ClickLocation = clickLocation, Using = weapon, Target = attacked