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

@@ -27,7 +27,7 @@ public sealed partial class BuckleSystem
SubscribeLocalEvent<StrapComponent, DestructionEventArgs>((_,c,_) => StrapRemoveAll(c));
SubscribeLocalEvent<StrapComponent, BreakageEventArgs>((_, c, _) => StrapRemoveAll(c));
SubscribeLocalEvent<StrapComponent, ConstructionBeforeDeleteEvent>((_, c, _) => StrapRemoveAll(c));
SubscribeLocalEvent<StrapComponent, DragDropEvent>(OnStrapDragDrop);
SubscribeLocalEvent<StrapComponent, DragDropTargetEvent>(OnStrapDragDrop);
}
private void OnStrapGetState(EntityUid uid, StrapComponent component, ref ComponentGetState args)
@@ -185,9 +185,9 @@ public sealed partial class BuckleSystem
Dirty(strap);
}
private void OnStrapDragDrop(EntityUid uid, StrapComponent component, DragDropEvent args)
private void OnStrapDragDrop(EntityUid uid, StrapComponent component, ref DragDropTargetEvent args)
{
if (!StrapCanDragDropOn(uid, args.User, args.Target, args.Dragged, component))
if (!StrapCanDragDropOn(uid, args.User, uid, args.Dragged, component))
return;
args.Handled = TryBuckle(args.Dragged, args.User, uid);