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:
@@ -35,7 +35,7 @@ namespace Content.Server.GameObjects.Components.Medical
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IActivate))]
|
||||
[ComponentReference(typeof(SharedMedicalScannerComponent))]
|
||||
public class MedicalScannerComponent : SharedMedicalScannerComponent, IActivate, IDragDropOn, IDestroyAct
|
||||
public class MedicalScannerComponent : SharedMedicalScannerComponent, IActivate, IDestroyAct
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
|
||||
@@ -292,12 +292,7 @@ namespace Content.Server.GameObjects.Components.Medical
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanDragDropOn(DragDropEventArgs eventArgs)
|
||||
{
|
||||
return eventArgs.Dragged.HasComponent<IBody>();
|
||||
}
|
||||
|
||||
public bool DragDropOn(DragDropEventArgs eventArgs)
|
||||
public override bool DragDropOn(DragDropEventArgs eventArgs)
|
||||
{
|
||||
_bodyContainer.Insert(eventArgs.Dragged);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user