using Content.Shared.Medical;
using Robust.Shared.Prototypes;
namespace Content.Shared.EntityEffects.Effects.Body;
///
/// Makes an entity vomit and reduces hunger and thirst by a given amount, modified by scale.
///
///
public sealed partial class VomitEntityEffectSystem : EntityEffectSystem
{
[Dependency] private readonly VomitSystem _vomit = default!;
protected override void Effect(Entity entity, ref EntityEffectEvent args)
{
_vomit.Vomit(entity.Owner, args.Effect.ThirstAmount * args.Scale, args.Effect.HungerAmount * args.Scale);
}
}
///
public sealed partial class Vomit : EntityEffectBase
{
///
/// How much we adjust our thirst after vomiting.
///
[DataField]
public float ThirstAmount = -8f;
///
/// How much we adjust our hunger after vomiting.
///
[DataField]
public float HungerAmount = -8f;
public override string EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
=> Loc.GetString("entity-effect-guidebook-vomit", ("chance", Probability));
}