Drag changes (#2487)
* Drag changes * Higlights only show near cursor * Don't highlight un-droppable entities * Fixes invalid highlights issue * Also the scanner * 2 months fix * Address reviews Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -207,9 +207,7 @@ namespace Content.Server.GameObjects.Components.Strap
|
||||
parent = parent.Parent;
|
||||
}
|
||||
|
||||
var range = SharedInteractionSystem.InteractionRange / 2;
|
||||
|
||||
if (!user.InRangeUnobstructed(component, range))
|
||||
if (!user.InRangeUnobstructed(component, buckle.Range))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -228,5 +226,11 @@ namespace Content.Server.GameObjects.Components.Strap
|
||||
buckle.ToggleBuckle(user, component.Owner);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool DragDropOn(DragDropEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.Dragged.TryGetComponent(out BuckleComponent? buckleComponent)) return false;
|
||||
return buckleComponent.TryBuckle(eventArgs.User, Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user