Add the ability for mappers to drag grids around. (#7769)

* Add the ability for mappers to drag grids around.

* Less message spam

* Also flinging
This commit is contained in:
metalgearsloth
2022-05-10 12:27:37 +10:00
committed by GitHub
parent 1be085cee5
commit 9561323592
5 changed files with 204 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using Robust.Shared.Serialization;
namespace Content.Shared.Maps;
/// <summary>
/// Helper system to allow you to move grids with a mouse.
/// </summary>
public abstract class SharedGridDraggingSystem : EntitySystem
{
public const string CommandName = "griddrag";
}
/// <summary>
/// Raised on the client to request a grid move to a specific position.
/// </summary>
[Serializable, NetSerializable]
public sealed class GridDragRequestPosition : EntityEventArgs
{
public EntityUid Grid;
public Vector2 WorldPosition;
}
[Serializable, NetSerializable]
public sealed class GridDragVelocityRequest : EntityEventArgs
{
public EntityUid Grid;
public Vector2 LinearVelocity;
}