ECS dragdrop (#12973)

* ECS dragdrop

No more excuses.

* AAAAAAAAAAAAAA

* kry

* events

* aaaaaaaaaa

* HUH

* Fix stripping

* aaaaaa

* spoike

* asease

* fix table vaulting

* ded

* rebiew

* aaaaaaaaaaaaa

* drag

* aeaeae

* weh
This commit is contained in:
metalgearsloth
2023-02-14 00:29:34 +11:00
committed by GitHub
parent 4183b5f449
commit c8f89eca60
53 changed files with 936 additions and 1079 deletions

View File

@@ -22,7 +22,7 @@ public sealed class BonkSystem : EntitySystem
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<BonkableComponent, DragDropEvent>(OnDragDrop);
SubscribeLocalEvent<BonkableComponent, DragDropTargetEvent>(OnDragDrop);
}
public bool TryBonk(EntityUid user, EntityUid bonkableUid, BonkableComponent? bonkableComponent = null)
@@ -56,8 +56,8 @@ public sealed class BonkSystem : EntitySystem
return false;
}
private void OnDragDrop(EntityUid user, BonkableComponent bonkableComponent, DragDropEvent args)
private void OnDragDrop(EntityUid uid, BonkableComponent bonkableComponent, ref DragDropTargetEvent args)
{
TryBonk(args.Dragged, args.Target);
TryBonk(args.Dragged, uid);
}
}