Files
tbd-station-14/Content.Shared/GameObjects/Components/Items/SharedHandsComponent.cs
Acruid 988b2b2bc5 EntityUid Type (#23)
* Wraps Entity Uids in their own type.

* Update submodule I think.
2018-01-20 23:46:31 +01:00

28 lines
850 B
C#

using SS14.Shared.GameObjects;
using System;
using System.Collections.Generic;
namespace Content.Shared.GameObjects
{
public abstract class SharedHandsComponent : Component
{
public sealed override string Name => "Hands";
public sealed override uint? NetID => ContentNetIDs.HANDS;
public sealed override Type StateType => typeof(HandsComponentState);
}
// The IDs of the items get synced over the network.
[Serializable]
public class HandsComponentState : ComponentState
{
public readonly Dictionary<string, EntityUid> Hands;
public readonly string ActiveIndex;
public HandsComponentState(Dictionary<string, EntityUid> hands, string activeIndex) : base(ContentNetIDs.HANDS)
{
Hands = hands;
ActiveIndex = activeIndex;
}
}
}