DrinkComponent.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Content.Shared.Nutrition.EntitySystems;
  2. using Content.Shared.FixedPoint;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.GameStates;
  5. namespace Content.Shared.Nutrition.Components;
  6. [NetworkedComponent, AutoGenerateComponentState]
  7. [RegisterComponent, Access(typeof(SharedDrinkSystem))]
  8. public sealed partial class DrinkComponent : Component
  9. {
  10. [DataField]
  11. public string Solution = "drink";
  12. [DataField, AutoNetworkedField]
  13. public SoundSpecifier UseSound = new SoundPathSpecifier("/Audio/Items/drink.ogg");
  14. [DataField, AutoNetworkedField]
  15. public FixedPoint2 TransferAmount = FixedPoint2.New(5);
  16. /// <summary>
  17. /// How long it takes to drink this yourself.
  18. /// </summary>
  19. [DataField, AutoNetworkedField]
  20. public float Delay = 1;
  21. [DataField, AutoNetworkedField]
  22. public bool Examinable = true;
  23. /// <summary>
  24. /// If true, trying to drink when empty will not handle the event.
  25. /// This means other systems such as equipping on use can run.
  26. /// Example usecase is the bucket.
  27. /// </summary>
  28. [DataField]
  29. public bool IgnoreEmpty;
  30. /// <summary>
  31. /// This is how many seconds it takes to force feed someone this drink.
  32. /// </summary>
  33. [DataField, AutoNetworkedField]
  34. public float ForceFeedDelay = 3;
  35. }