Delta-v/Content.Server/Chemistry/ReagentEffects/Drunk.cs

20 lines
599 B
C#

using Content.Shared.Chemistry.Reagent;
using Content.Shared.Drunk;
namespace Content.Server.Chemistry.ReagentEffects;
public sealed class Drunk : ReagentEffect
{
/// <summary>
/// BoozePower is how long each metabolism cycle will make the drunk effect last for.
/// </summary>
[DataField("boozePower")]
public float BoozePower = 2f;
public override void Effect(ReagentEffectArgs args)
{
var drunkSys = args.EntityManager.EntitySysManager.GetEntitySystem<SharedDrunkSystem>();
drunkSys.TryApplyDrunkenness(args.SolutionEntity, BoozePower);
}
}