From 25360fbdd00a1e9f82ac6b66e3933877433f79e6 Mon Sep 17 00:00:00 2001 From: Nathan Winters <100448493+CinnamonSnowball@users.noreply.github.com> Date: Mon, 26 Jun 2023 17:21:18 +0200 Subject: [PATCH] Tweaks the `vomit()` proc (#21466) * Remove muzzles/facehuggers blocking vomiting * Readability --- code/modules/mob/living/carbon/carbon.dm | 64 +++++++++++------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 52adb5079a7..347b82a816c 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -88,48 +88,44 @@ /mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1) - if(stat == DEAD) - return FALSE - if(ismachineperson(src)) //IPCs do not vomit particulates - return FALSE - if(is_muzzled()) - if(message) - to_chat(src, "The muzzle prevents you from vomiting!") - return FALSE - if(is_facehugged()) - if(message) - to_chat(src, "You try to throw up, but the alien's proboscis obstructs your throat!") //Sorry + . = TRUE + + if(stat == DEAD || ismachineperson(src)) // Dead people and IPCs do not vomit particulates return FALSE + if(stun) Stun(8 SECONDS) - if(nutrition < 100 && !blood) + + 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 your stomach!") if(stun) Weaken(20 SECONDS) - else - if(message) - visible_message("[src] throws up!", \ - "You throw up!") - playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1) - var/turf/T = get_turf(src) - for(var/i=0 to distance) - if(blood) - if(T) - add_splatter_floor(T) - if(stun) - adjustBruteLoss(3) - else - if(T) - T.add_vomit_floor() - adjust_nutrition(-lost_nutrition) - if(stun) - adjustToxLoss(-3) - T = get_step(T, dir) - if(is_blocked_turf(T)) - break - return TRUE + return + + if(message) + visible_message("[src] throws up!", \ + "You throw up!") + + playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1) + var/turf/T = get_turf(src) + for(var/i = 0 to distance) + if(blood) + if(T) + add_splatter_floor(T) + if(stun) + adjustBruteLoss(3) + else + if(T) + T.add_vomit_floor() + adjust_nutrition(-lost_nutrition) + if(stun) + adjustToxLoss(-3) + + T = get_step(T, dir) + if(is_blocked_turf(T)) + break /mob/living/carbon/gib() . = death(1)