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,13 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.GameObjects.Components.Body;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Medical
|
||||
{
|
||||
public class SharedMedicalScannerComponent : Component
|
||||
public abstract class SharedMedicalScannerComponent : Component, IDragDropOn
|
||||
{
|
||||
public override string Name => "MedicalScanner";
|
||||
|
||||
@@ -78,5 +80,11 @@ namespace Content.Shared.GameObjects.Components.Medical
|
||||
}
|
||||
|
||||
|
||||
public bool CanDragDropOn(DragDropEventArgs eventArgs)
|
||||
{
|
||||
return eventArgs.Dragged.HasComponent<IBody>();
|
||||
}
|
||||
|
||||
public abstract bool DragDropOn(DragDropEventArgs eventArgs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user