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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user