MaskComponent.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Content.Shared.Clothing.EntitySystems;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Shared.Clothing.Components;
  5. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  6. [Access(typeof(MaskSystem))]
  7. public sealed partial class MaskComponent : Component
  8. {
  9. /// <summary>
  10. /// Action for toggling a mask (e.g., pulling the mask down or putting it back up)
  11. /// </summary>
  12. [DataField, AutoNetworkedField]
  13. public EntProtoId ToggleAction = "ActionToggleMask";
  14. /// <summary>
  15. /// Action for toggling a mask (e.g., pulling the mask down or putting it back up)
  16. /// </summary>
  17. [DataField, AutoNetworkedField]
  18. public EntityUid? ToggleActionEntity;
  19. /// <summary>
  20. /// Whether the mask is currently toggled (e.g., pulled down).
  21. /// This generally disables some of the mask's functionality.
  22. /// </summary>
  23. [DataField, AutoNetworkedField]
  24. public bool IsToggled;
  25. /// <summary>
  26. /// Equipped prefix to use after the mask was pulled down.
  27. /// </summary>
  28. [DataField, AutoNetworkedField]
  29. public string EquippedPrefix = "up";
  30. /// <summary>
  31. /// When <see langword="false"/>, the mask will not be toggleable.
  32. /// </summary>
  33. [DataField("enabled"), AutoNetworkedField]
  34. public bool IsToggleable = true;
  35. /// <summary>
  36. /// When <see langword="true"/> will disable <see cref="IsToggleable"/> when folded
  37. /// </summary>
  38. [DataField, AutoNetworkedField]
  39. public bool DisableOnFolded;
  40. }