From 92156fbd45780f695f22840d8c3bb3cf4d755db5 Mon Sep 17 00:00:00 2001 From: CaYpeN1 Date: Thu, 21 Mar 2024 14:07:43 +0500 Subject: [PATCH] check if has drunk effect --- Content.Server/_White/Chemistry/NarcoticEffect.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Content.Server/_White/Chemistry/NarcoticEffect.cs b/Content.Server/_White/Chemistry/NarcoticEffect.cs index c87390ebfa..866c625046 100644 --- a/Content.Server/_White/Chemistry/NarcoticEffect.cs +++ b/Content.Server/_White/Chemistry/NarcoticEffect.cs @@ -53,6 +53,20 @@ public sealed class NarcoticEffect : EntitySystem switch (component.Effects[index]) { + case "TremorAndShake" when _statusEffectsSystem.HasStatusEffect(uid, "Drunk", statusEffectsComp): + Timer.SpawnRepeating(timer, () => _stamina.TakeStaminaDamage(uid, 20F), token); + _statusEffectsSystem.TryAddTime(uid, "Drunk", TimeSpan.FromSeconds(slur), statusEffectsComp); + break; + + case "Shake" when _statusEffectsSystem.HasStatusEffect(uid, "Drunk", statusEffectsComp): + _statusEffectsSystem.TryAddTime(uid, "Drunk", TimeSpan.FromSeconds(slur), statusEffectsComp); + break; + + case "StunAndShake" when _statusEffectsSystem.HasStatusEffect(uid, "Drunk", statusEffectsComp): + Timer.SpawnRepeating(timer, () => _stun.TryParalyze(uid, TimeSpan.FromSeconds(component.StunTime), true), token); + _statusEffectsSystem.TryAddTime(uid, "Drunk", TimeSpan.FromSeconds(slur), statusEffectsComp); + break; + case "Stun": Timer.SpawnRepeating(timer, () => _stun.TryParalyze(uid, TimeSpan.FromSeconds(component.StunTime), true), token); break;