Make more network-events check EntitySessionEventArgs. (#6612)

This commit is contained in:
Leon Friedrich
2022-02-13 11:18:24 +13:00
committed by GitHub
parent 29ff523081
commit 0e6aec0e56
6 changed files with 18 additions and 25 deletions

View File

@@ -1,18 +1,14 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.Inventory.Events;
[NetSerializable, Serializable]
public class OpenSlotStorageNetworkMessage : EntityEventArgs
public sealed class OpenSlotStorageNetworkMessage : EntityEventArgs
{
public readonly EntityUid Uid;
public readonly string Slot;
public OpenSlotStorageNetworkMessage(EntityUid uid, string slot)
public OpenSlotStorageNetworkMessage(string slot)
{
Uid = uid;
Slot = slot;
}
}

View File

@@ -1,6 +1,3 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Network;
using Robust.Shared.Serialization;
namespace Content.Shared.Tabletop.Events
@@ -10,22 +7,19 @@ namespace Content.Shared.Tabletop.Events
/// trying to move a single item at the same time.
/// </summary>
[Serializable, NetSerializable]
public class TabletopDraggingPlayerChangedEvent : EntityEventArgs
public sealed class TabletopDraggingPlayerChangedEvent : EntityEventArgs
{
/// <summary>
/// The UID of the entity being dragged.
/// </summary>
public EntityUid DraggedEntityUid;
/// <summary>
/// The NetUserID of the player that is now dragging the item.
/// </summary>
public NetUserId? DraggingPlayer;
public bool IsDragging;
public TabletopDraggingPlayerChangedEvent(EntityUid draggedEntityUid, NetUserId? draggingPlayer)
public TabletopDraggingPlayerChangedEvent(EntityUid draggedEntityUid, bool isDragging)
{
DraggedEntityUid = draggedEntityUid;
DraggingPlayer = draggingPlayer;
IsDragging = isDragging;
}
}
}