1
0

ActionsComponent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Actions;
  4. [NetworkedComponent]
  5. [RegisterComponent]
  6. [Access(typeof(SharedActionsSystem))]
  7. public sealed partial class ActionsComponent : Component
  8. {
  9. /// <summary>
  10. /// List of actions currently granted to this entity.
  11. /// On the client, this may contain a mixture of client-side and networked entities.
  12. /// </summary>
  13. [DataField] public HashSet<EntityUid> Actions = new();
  14. }
  15. [Serializable, NetSerializable]
  16. public sealed class ActionsComponentState : ComponentState
  17. {
  18. public readonly HashSet<NetEntity> Actions;
  19. public ActionsComponentState(HashSet<NetEntity> actions)
  20. {
  21. Actions = actions;
  22. }
  23. }
  24. /// <summary>
  25. /// Determines how the action icon appears in the hotbar for item actions.
  26. /// </summary>
  27. public enum ItemActionIconStyle : byte
  28. {
  29. /// <summary>
  30. /// The default - The item icon will be big with a small action icon in the corner
  31. /// </summary>
  32. BigItem,
  33. /// <summary>
  34. /// The action icon will be big with a small item icon in the corner
  35. /// </summary>
  36. BigAction,
  37. /// <summary>
  38. /// BigAction but no item icon will be shown in the corner.
  39. /// </summary>
  40. NoItem
  41. }