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:
@@ -13,6 +13,7 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<ClimbingComponent, ComponentHandleState>(OnClimbingState);
|
||||
SubscribeLocalEvent<ClimbableComponent, CanDropTargetEvent>(OnCanDragDropOn);
|
||||
}
|
||||
|
||||
private static void OnClimbingState(EntityUid uid, ClimbingComponent component, ref ComponentHandleState args)
|
||||
@@ -24,15 +25,15 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
component.OwnerIsTransitioning = climbModeState.IsTransitioning;
|
||||
}
|
||||
|
||||
protected override void OnCanDragDropOn(EntityUid uid, ClimbableComponent component, CanDragDropOnEvent args)
|
||||
protected override void OnCanDragDropOn(EntityUid uid, ClimbableComponent component, ref CanDropTargetEvent args)
|
||||
{
|
||||
base.OnCanDragDropOn(uid, component, args);
|
||||
base.OnCanDragDropOn(uid, component, ref args);
|
||||
|
||||
if (!args.CanDrop)
|
||||
return;
|
||||
|
||||
var user = args.User;
|
||||
var target = args.Target;
|
||||
var target = uid;
|
||||
var dragged = args.Dragged;
|
||||
bool Ignored(EntityUid entity) => entity == target || entity == user || entity == dragged;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user