IngestionBlockerComponent.cs 828 B

123456789101112131415161718192021
  1. using Content.Server.Nutrition.EntitySystems;
  2. namespace Content.Server.Nutrition.Components;
  3. /// <summary>
  4. /// Component that denotes a piece of clothing that blocks the mouth or otherwise prevents eating & drinking.
  5. /// </summary>
  6. /// <remarks>
  7. /// In the event that more head-wear & mask functionality is added (like identity systems, or raising/lowering of
  8. /// masks), then this component might become redundant.
  9. /// </remarks>
  10. [RegisterComponent, Access(typeof(FoodSystem), typeof(DrinkSystem), typeof(IngestionBlockerSystem))]
  11. public sealed partial class IngestionBlockerComponent : Component
  12. {
  13. /// <summary>
  14. /// Is this component currently blocking consumption.
  15. /// </summary>
  16. [ViewVariables(VVAccess.ReadWrite)]
  17. [DataField("enabled")]
  18. public bool Enabled { get; set; } = true;
  19. }