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:
@@ -1,6 +1,4 @@
|
||||
#nullable enable
|
||||
using Content.Client.GameObjects.Components.Disposal;
|
||||
using Content.Client.GameObjects.Components.MedicalScanner;
|
||||
using Content.Shared.GameObjects.Components.Body;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -11,16 +9,14 @@ namespace Content.Client.GameObjects.Components.Body
|
||||
[ComponentReference(typeof(IBody))]
|
||||
public class BodyComponent : SharedBodyComponent, IDraggable
|
||||
{
|
||||
public bool CanDrop(CanDropEventArgs eventArgs)
|
||||
bool IDraggable.CanStartDrag(StartDragDropEventArgs args)
|
||||
{
|
||||
if (eventArgs.Target.HasComponent<DisposalUnitComponent>() ||
|
||||
eventArgs.Target.HasComponent<MedicalScannerComponent>() ||
|
||||
eventArgs.Target.HasComponent<DisposalMailingUnitComponent>())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
public bool CanDrop(CanDropEventArgs args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user