From 3b4bf8a6e543c5012b21e43fa2e6a390be371811 Mon Sep 17 00:00:00 2001 From: Cydia Date: Sun, 24 Sep 2023 21:22:31 +0300 Subject: [PATCH 1/4] fix --- code/modules/pool/components/swimming.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/pool/components/swimming.dm b/code/modules/pool/components/swimming.dm index e2c77c299da72..e7422bcc0bd6b 100644 --- a/code/modules/pool/components/swimming.dm +++ b/code/modules/pool/components/swimming.dm @@ -130,7 +130,7 @@ victim.emote("cough") else if(prob(25)) victim.emote("gasp") - if(ticks_drowned > 20) + if(ticks_drowned > 20 && victim.stat < DEAD) if(prob(10)) victim.visible_message("[victim] falls unconscious for a moment!") victim.Unconscious(10) From 6836770ad33325853d82a4452ecfc06cf18c5a4c Mon Sep 17 00:00:00 2001 From: Cydia Date: Mon, 25 Sep 2023 12:01:06 +0300 Subject: [PATCH 2/4] better-logic --- code/modules/pool/components/swimming.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/pool/components/swimming.dm b/code/modules/pool/components/swimming.dm index e7422bcc0bd6b..692f063f04b31 100644 --- a/code/modules/pool/components/swimming.dm +++ b/code/modules/pool/components/swimming.dm @@ -126,11 +126,13 @@ if(victim.losebreath < 1) victim.losebreath += 1 ticks_drowned ++ + if(victim.stat > CONSCIOUS) + return //Unconscious/dead people shouldn't emote if(prob(20)) victim.emote("cough") else if(prob(25)) victim.emote("gasp") - if(ticks_drowned > 20 && victim.stat < DEAD) + if(ticks_drowned > 20) if(prob(10)) victim.visible_message("[victim] falls unconscious for a moment!") victim.Unconscious(10) From 3b074b09721f154544f782f1a02afdb4b082b84c Mon Sep 17 00:00:00 2001 From: Cydia Date: Mon, 25 Sep 2023 12:02:05 +0300 Subject: [PATCH 3/4] move-this-here --- code/modules/pool/components/swimming.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/pool/components/swimming.dm b/code/modules/pool/components/swimming.dm index 692f063f04b31..6bc404437bc5f 100644 --- a/code/modules/pool/components/swimming.dm +++ b/code/modules/pool/components/swimming.dm @@ -125,9 +125,9 @@ /datum/component/swimming/proc/drown(mob/living/victim) if(victim.losebreath < 1) victim.losebreath += 1 - ticks_drowned ++ if(victim.stat > CONSCIOUS) return //Unconscious/dead people shouldn't emote + ticks_drowned ++ if(prob(20)) victim.emote("cough") else if(prob(25)) From 20e26b7c6e4962354e3a5be1bcd2776f6bd7be9f Mon Sep 17 00:00:00 2001 From: Cydia Date: Mon, 2 Oct 2023 09:59:34 +0300 Subject: [PATCH 4/4] emote-logic --- code/modules/pool/components/swimming.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/modules/pool/components/swimming.dm b/code/modules/pool/components/swimming.dm index 6bc404437bc5f..9404eb45ee9fd 100644 --- a/code/modules/pool/components/swimming.dm +++ b/code/modules/pool/components/swimming.dm @@ -125,16 +125,19 @@ /datum/component/swimming/proc/drown(mob/living/victim) if(victim.losebreath < 1) victim.losebreath += 1 + var/shouldemote = TRUE if(victim.stat > CONSCIOUS) - return //Unconscious/dead people shouldn't emote + shouldemote = FALSE //Unconscious/dead people shouldn't emote ticks_drowned ++ - if(prob(20)) - victim.emote("cough") - else if(prob(25)) - victim.emote("gasp") + if(shouldemote) + if(prob(20)) + victim.emote("cough") + else if(prob(25)) + victim.emote("gasp") if(ticks_drowned > 20) if(prob(10)) - victim.visible_message("[victim] falls unconscious for a moment!") + if(shouldemote) + victim.visible_message("[victim] falls unconscious for a moment!") victim.Unconscious(10) /datum/component/swimming/proc/start_drowning(mob/living/victim)