Moves spike to ECS (#5706)

This commit is contained in:
FoLoKe
2021-12-26 05:32:01 +03:00
committed by GitHub
parent fdf7aae744
commit 83114de0e4
13 changed files with 338 additions and 152 deletions

View File

@@ -112,6 +112,10 @@ namespace Content.Server.Interaction
// trigger dragdrops on the dropped entity
RaiseLocalEvent(msg.Dropped, interactionArgs);
if (interactionArgs.Handled)
return;
foreach (var dragDrop in AllComps<IDraggable>(msg.Dropped))
{
if (dragDrop.CanDrop(interactionArgs) &&
@@ -123,6 +127,10 @@ namespace Content.Server.Interaction
// trigger dragdropons on the targeted entity
RaiseLocalEvent(msg.Target, interactionArgs, false);
if (interactionArgs.Handled)
return;
foreach (var dragDropOn in AllComps<IDragDropOn>(msg.Target))
{
if (dragDropOn.CanDragDropOn(interactionArgs) &&