Drunk Shader (#8910)
Co-authored-by: Kara D <lunarautomaton6@gmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
19
Content.Server/Chemistry/ReagentEffects/Drunk.cs
Normal file
19
Content.Server/Chemistry/ReagentEffects/Drunk.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user