Files
tbd-station-14/Content.Shared/Actions/ActionsComponent.cs
Leon Friedrich bd4597c5ca Fix action state handling bug (#25395)
* Rejig action state handling

* Fix entity arg

* Fix deserialization
2024-02-20 13:08:41 +11:00

49 lines
1.2 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Actions;
[NetworkedComponent]
[RegisterComponent]
[Access(typeof(SharedActionsSystem))]
public sealed partial class ActionsComponent : Component
{
/// <summary>
/// List of actions currently granted to this entity.
/// On the client, this may contain a mixture of client-side and networked entities.
/// </summary>
[DataField] public HashSet<EntityUid> Actions = new();
}
[Serializable, NetSerializable]
public sealed class ActionsComponentState : ComponentState
{
public readonly HashSet<NetEntity> Actions;
public ActionsComponentState(HashSet<NetEntity> actions)
{
Actions = actions;
}
}
/// <summary>
/// Determines how the action icon appears in the hotbar for item actions.
/// </summary>
public enum ItemActionIconStyle : byte
{
/// <summary>
/// The default - The item icon will be big with a small action icon in the corner
/// </summary>
BigItem,
/// <summary>
/// The action icon will be big with a small item icon in the corner
/// </summary>
BigAction,
/// <summary>
/// BigAction but no item icon will be shown in the corner.
/// </summary>
NoItem
}