1
0

TabletopMoveEvent.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Content.Shared.Tabletop.Components;
  2. using Robust.Shared.Map;
  3. using Robust.Shared.Serialization;
  4. namespace Content.Shared.Tabletop.Events
  5. {
  6. /// <summary>
  7. /// An event that is sent to the server every so often by the client to tell where an entity with a
  8. /// <see cref="TabletopDraggableComponent"/> has been moved.
  9. /// </summary>
  10. [Serializable, NetSerializable]
  11. public sealed class TabletopMoveEvent : EntityEventArgs
  12. {
  13. /// <summary>
  14. /// The UID of the entity being moved.
  15. /// </summary>
  16. public NetEntity MovedEntityUid { get; }
  17. /// <summary>
  18. /// The new coordinates of the entity being moved.
  19. /// </summary>
  20. public MapCoordinates Coordinates { get; }
  21. /// <summary>
  22. /// The UID of the table the entity is being moved on.
  23. /// </summary>
  24. public NetEntity TableUid { get; }
  25. public TabletopMoveEvent(NetEntity movedEntityUid, MapCoordinates coordinates, NetEntity tableUid)
  26. {
  27. MovedEntityUid = movedEntityUid;
  28. Coordinates = coordinates;
  29. TableUid = tableUid;
  30. }
  31. }
  32. }