Update trivial components to use auto comp states (#20539)

This commit is contained in:
DrSmugleaf
2023-09-28 16:20:29 -07:00
committed by GitHub
parent 14cfe44ece
commit a44fa86b68
158 changed files with 806 additions and 2866 deletions

View File

@@ -5,7 +5,6 @@ using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
using Content.Shared.Tabletop.Components;
using Content.Shared.Tabletop.Events;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Network;
using Robust.Shared.Serialization;
@@ -22,7 +21,6 @@ namespace Content.Shared.Tabletop
public override void Initialize()
{
SubscribeLocalEvent<TabletopDraggableComponent, ComponentGetState>(GetDraggableState);
SubscribeAllEvent<TabletopDraggingPlayerChangedEvent>(OnDraggingPlayerChanged);
SubscribeAllEvent<TabletopMoveEvent>(OnTabletopMove);
}
@@ -47,11 +45,6 @@ namespace Content.Shared.Tabletop
_transforms.SetLocalPositionNoLerp(transform, msg.Coordinates.Position);
}
private void GetDraggableState(EntityUid uid, TabletopDraggableComponent component, ref ComponentGetState args)
{
args.State = new TabletopDraggableComponentState(component.DraggingPlayer);
}
private void OnDraggingPlayerChanged(TabletopDraggingPlayerChangedEvent msg, EntitySessionEventArgs args)
{
var dragged = GetEntity(msg.DraggedEntityUid);