2021-11-02 11:40:55 +11:00
|
|
|
using Content.Server.Nutrition.EntitySystems;
|
2021-11-03 16:48:03 -07:00
|
|
|
using Content.Shared.FixedPoint;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2019-11-12 08:20:03 +11:00
|
|
|
|
2023-09-23 03:10:04 +01:00
|
|
|
namespace Content.Server.Nutrition.Components;
|
|
|
|
|
|
|
|
|
|
[RegisterComponent, Access(typeof(DrinkSystem))]
|
|
|
|
|
public sealed partial class DrinkComponent : Component
|
2019-11-12 08:20:03 +11:00
|
|
|
{
|
2023-09-23 03:10:04 +01:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public string Solution = "drink";
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier UseSound = new SoundPathSpecifier("/Audio/Items/drink.ogg");
|
|
|
|
|
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public FixedPoint2 TransferAmount = FixedPoint2.New(5);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long it takes to drink this yourself.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float Delay = 1;
|
|
|
|
|
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool Examinable = true;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If true, trying to drink when empty will not handle the event.
|
|
|
|
|
/// This means other systems such as equipping on use can run.
|
|
|
|
|
/// Example usecase is the bucket.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool IgnoreEmpty;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is how many seconds it takes to force feed someone this drink.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float ForceFeedDelay = 3;
|
2019-11-12 08:20:03 +11:00
|
|
|
}
|