From ab04ec8744107e6159f0755a4f5192195221ce85 Mon Sep 17 00:00:00 2001
From: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com>
Date: Mon, 28 Aug 2023 14:53:26 +0200
Subject: [PATCH] Vomit no longer stuns (#21952)
* vomit no longer stun
* KnockOut on blood vomit
* review tweaks
* TRUE FALSE
* oops
* stun into should_confuse, 0 into FALSE, 1 into TRUE
* god damnit
---
code/datums/diseases/advance/symptoms/vomit.dm | 2 +-
code/datums/status_effects/debuffs.dm | 4 ++--
code/modules/mob/living/carbon/carbon.dm | 18 +++++++++++-------
.../mob/living/carbon/human/human_life.dm | 2 +-
.../reagents/chemistry/reagents/drugs.dm | 4 ++--
.../reagents/chemistry/reagents/medicine.dm | 4 ++--
6 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm
index f214c0755a18..6ebc4f5bc45a 100644
--- a/code/datums/diseases/advance/symptoms/vomit.dm
+++ b/code/datums/diseases/advance/symptoms/vomit.dm
@@ -103,4 +103,4 @@ Bonus
level = 4
/datum/symptom/vomit/projectile/Vomit(mob/living/carbon/M)
- M.vomit(6,0,1,5,1)
+ M.vomit(6,0,FALSE,5,1)
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index ffc7b4a3e3e4..870cfdfc5fec 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -203,12 +203,12 @@
return
if(teleports < 6)
to_chat(M, "You feel a bit sick!")
- M.vomit(lost_nutrition = 15, blood = 0, stun = 0, distance = 0, message = 1)
+ M.vomit(lost_nutrition = 15, blood = 0, should_confuse = FALSE, distance = 0, message = 1)
M.Weaken(2 SECONDS)
else
to_chat(M, "You feel really sick!")
M.adjustBruteLoss(rand(0, teleports * 2))
- M.vomit(lost_nutrition = 30, blood = 0, stun = 0, distance = 0, message = 1)
+ M.vomit(lost_nutrition = 30, blood = 0, should_confuse = FALSE, distance = 0, message = 1)
M.Weaken(6 SECONDS)
/datum/status_effect/pacifism
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index c0c5b076e54a..7a0df3621049 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -95,21 +95,25 @@
return FALSE
-/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1)
+/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, should_confuse = TRUE, distance = 0, message = 1)
. = TRUE
if(stat == DEAD || ismachineperson(src)) // Dead people and IPCs do not vomit particulates
return FALSE
- if(stun)
- Stun(8 SECONDS)
+ if(should_confuse)
+ if(blood)
+ KnockDown(10 SECONDS)
+ AdjustConfused(8 SECONDS)
+ Slowed(8 SECONDS, 1)
if(!blood && nutrition < 100) // Nutrition vomiting while already starving
if(message)
visible_message("[src] dry heaves!", \
"You try to throw up, but there's nothing in your stomach!")
- if(stun)
- Weaken(20 SECONDS)
+ if(should_confuse)
+ KnockDown(20 SECONDS)
+ AdjustConfused(20 SECONDS)
return
if(message)
@@ -122,13 +126,13 @@
if(blood)
if(T)
add_splatter_floor(T)
- if(stun)
+ if(should_confuse)
adjustBruteLoss(3)
else
if(T)
T.add_vomit_floor()
adjust_nutrition(-lost_nutrition)
- if(stun)
+ if(should_confuse)
adjustToxLoss(-3)
T = get_step(T, dir)
diff --git a/code/modules/mob/living/carbon/human/human_life.dm b/code/modules/mob/living/carbon/human/human_life.dm
index 6ccdbb7ab2f7..1b22a82c8dab 100644
--- a/code/modules/mob/living/carbon/human/human_life.dm
+++ b/code/modules/mob/living/carbon/human/human_life.dm
@@ -739,7 +739,7 @@
if(getToxLoss() >= 45 && nutrition > 20)
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
- vomit(20, 0, 1, 0, 1)
+ vomit(20, 0, TRUE, 0, 1)
adjustToxLoss(-3)
lastpuke = 0
diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm
index 116d0fa347fe..53450294b479 100644
--- a/code/modules/reagents/chemistry/reagents/drugs.dm
+++ b/code/modules/reagents/chemistry/reagents/drugs.dm
@@ -262,7 +262,7 @@
if(prob(20))
if(ishuman(M))
var/mob/living/carbon/human/H = M
- H.vomit(lost_nutrition = 0, blood = TRUE, stun = FALSE)
+ H.vomit(lost_nutrition = 0, blood = TRUE, should_confuse = FALSE)
M.KnockDown(1 SECONDS)
else
update_flags |= M.adjustStaminaLoss(10, FALSE)
@@ -586,7 +586,7 @@
var/mob/living/carbon/human/H = M
H.physiology.stun_mod /= tenacity
H.physiology.stamina_mod /= tenacity
- H.vomit(blood = TRUE, stun = FALSE) // just a visual, very gritty. don't do drugs kids
+ H.vomit(blood = TRUE, should_confuse = FALSE) // just a visual, very gritty. don't do drugs kids
H.LoseBreath(10 SECONDS) // procs 5 times, mostly a visual thing. damage could stack to cause a slowdown.
H.Confused(10 SECONDS)
diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm
index 9e83b3a283cf..a5898b8042a9 100644
--- a/code/modules/reagents/chemistry/reagents/medicine.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine.dm
@@ -856,7 +856,7 @@
if(volume < 20)
if(prob(10))
to_chat(H, "[overdose_message]")
@@ -864,7 +864,7 @@
if(prob(10))
to_chat(H, "You choke on congealed blood!")
H.AdjustLoseBreath(2 SECONDS)
- H.vomit(blood = TRUE, stun = FALSE)
+ H.vomit(blood = TRUE, should_confuse = FALSE)
else if(prob(10))
var/overdose_message = pick("You're seeing red!", "Your heartbeat thunders in your ears!", "Your veins writhe under your skin!")
to_chat(H, "[overdose_message]")