Click Drag Functionality + Refactor Interaction Interfaces (#1125)

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
chairbender
2020-07-06 14:27:03 -07:00
committed by GitHub
parent c019d428a7
commit b35333d366
184 changed files with 1792 additions and 895 deletions

View File

@@ -0,0 +1,24 @@
using System;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map;
namespace Content.Server.Interfaces.GameObjects.Components.Interaction
{
/// <summary>
/// This interface allows the component's entity to be dragged and dropped onto by another entity and gives it
/// behavior when that occurs.
/// </summary>
public interface IDragDropOn
{
/// <summary>
/// Invoked server-side when another entity is being dragged and dropped onto this one
///
/// There is no other server-side drag and drop check other than a range check, so make sure to validate
/// if this object can be dropped on the dropped object!
/// </summary>
/// <returns>true iff an interaction occurred and no further interaction should
/// be processed for this drop.</returns>
bool DragDropOn(DragDropEventArgs eventArgs);
}
}