From 3ddef57ecfe565ff55cf55c386fdae65759e63a9 Mon Sep 17 00:00:00 2001 From: Mike Long Date: Fri, 16 Jun 2017 16:18:19 -0400 Subject: [PATCH] Vomit fix (#28492) --- code/datums/diseases/advance/symptoms/vomit.dm | 4 ++-- code/game/gamemodes/changeling/powers/panacea.dm | 4 ++-- .../gamemodes/clock_cult/clock_items/clockwork_armor.dm | 8 ++++---- code/game/machinery/computer/arcade.dm | 2 +- code/game/machinery/pipe/construction.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 7 ++++--- code/modules/mob/living/carbon/human/life.dm | 6 +++--- .../mob/living/carbon/human/species_types/flypeople.dm | 2 +- .../modules/reagents/chemistry/reagents/toxin_reagents.dm | 4 ++-- code/modules/surgery/organs/vocal_cords.dm | 2 +- 10 files changed, 21 insertions(+), 20 deletions(-) diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm index 9407c95d5ba..b1e8100c35e 100644 --- a/code/datums/diseases/advance/symptoms/vomit.dm +++ b/code/datums/diseases/advance/symptoms/vomit.dm @@ -75,7 +75,7 @@ Bonus severity = 5 /datum/symptom/vomit/blood/Vomit(mob/living/carbon/M) - M.vomit(0, 1) + M.vomit(0,TRUE) /* @@ -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, distance = 5) diff --git a/code/game/gamemodes/changeling/powers/panacea.dm b/code/game/gamemodes/changeling/powers/panacea.dm index afc7655bc18..7023e30010d 100644 --- a/code/game/gamemodes/changeling/powers/panacea.dm +++ b/code/game/gamemodes/changeling/powers/panacea.dm @@ -17,7 +17,7 @@ B.leave_victim() if(iscarbon(user)) var/mob/living/carbon/C = user - C.vomit(0) + C.vomit(0, toxic = TRUE) to_chat(user, "A parasite exits our form.") var/list/bad_organs = list( user.getorgan(/obj/item/organ/body_egg), @@ -31,7 +31,7 @@ O.Remove(user) if(iscarbon(user)) var/mob/living/carbon/C = user - C.vomit(0) + C.vomit(0, toxic = TRUE) O.forceMove(get_turf(user)) user.reagents.add_reagent("mutadone", 10) diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_armor.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_armor.dm index 3b0c220b87e..13cb65f0816 100644 --- a/code/game/gamemodes/clock_cult/clock_items/clockwork_armor.dm +++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_armor.dm @@ -37,7 +37,7 @@ user.visible_message("As [user] puts [src] on, it flickers off their head!", "The helmet flickers off your head, leaving only nausea!") if(iscarbon(user)) var/mob/living/carbon/C = user - C.vomit(20, 1, 1, 0, 1) + C.vomit(20) else to_chat(user, "\"Do you have a hole in your head? You're about to.\"") to_chat(user, "The helmet tries to drive a spike through your head as you scramble to remove it!") @@ -98,7 +98,7 @@ user.visible_message("As [user] puts [src] on, it flickers off their body!", "The curiass flickers off your body, leaving only nausea!") if(iscarbon(user)) var/mob/living/carbon/C = user - C.vomit(20, 1, 1, 0, 1) + C.vomit(20) else to_chat(user, "\"I think this armor is too hot for you to handle.\"") to_chat(user, "The curiass emits a burst of flame as you scramble to get it off!") @@ -159,7 +159,7 @@ user.visible_message("As [user] puts [src] on, it flickers off their arms!", "The gauntlets flicker off your arms, leaving only nausea!") if(iscarbon(user)) var/mob/living/carbon/C = user - C.vomit(10, 1, 1, 0, 1) + C.vomit() else to_chat(user, "\"Did you like having arms?\"") to_chat(user, "The gauntlets suddenly squeeze tight, crushing your arms before you manage to get them off!") @@ -209,7 +209,7 @@ user.visible_message("As [user] puts [src] on, it flickers off their feet!", "The treads flicker off your feet, leaving only nausea!") if(iscarbon(user)) var/mob/living/carbon/C = user - C.vomit(10, 1, 1, 0, 1) + C.vomit() else to_chat(user, "\"Let's see if you can dance with these.\"") to_chat(user, "The treads turn searing hot as you scramble to get them off!") diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 1f15ab25773..00a01fcf334 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -523,7 +523,7 @@ to_chat(M, "An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit.") M.Stun(5) sleep(30) - M.vomit(50) + M.vomit(10, distance = 5) if(ORION_TRAIL_FLUX) if(prob(75)) M.Weaken(3) diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index bb5d37073d0..9bceee5bdb2 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -250,7 +250,7 @@ GLOBAL_LIST_INIT(pipeID2State, list( if(istype(user, /mob/living/carbon)) var/mob/living/carbon/C = user for(var/i=1 to 20) - C.vomit(0,1,0,4,0) + C.vomit(0, TRUE, FALSE, 4, FALSE) if(prob(20)) C.spew_organ() sleep(5) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 6f213171c4b..05cb7f9a994 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -450,7 +450,7 @@ return 0 return ..() -/mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1, var/toxic = 0) +/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, toxic = FALSE) if(dna && dna.species && NOHUNGER in dna.species.species_traits) return 1 @@ -476,6 +476,9 @@ playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1) var/turf/T = get_turf(src) + if(!blood) + nutrition -= lost_nutrition + adjustToxLoss(-3) for(var/i=0 to distance) if(blood) if(T) @@ -485,8 +488,6 @@ else if(T) T.add_vomit_floor(src, toxic)//toxic barf looks different - nutrition -= lost_nutrition - adjustToxLoss(-3) T = get_step(T, dir) if (is_blocked_turf(T)) break diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8a3360911ed..c0fc9ac92ff 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -278,9 +278,9 @@ //Puke if toxloss is too high if(!stat) if(getToxLoss() >= 45 && nutrition > 20) - lastpuke ++ - if(lastpuke >= 25) // about 25 second delay I guess - vomit(20, 0, 1, 0, 1, 1) + lastpuke += prob(50) + if(lastpuke >= 50) // about 25 second delay I guess + vomit(20, toxic = TRUE) lastpuke = 0 diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm index e77e424d405..e1b9f0b86c3 100644 --- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm @@ -17,7 +17,7 @@ var/datum/reagent/consumable/nutri_check = chem if(nutri_check.nutriment_factor > 0) var/turf/pos = get_turf(H) - H.vomit(0, 0, 0, 1, 1) + H.vomit(0, FALSE, FALSE, 2, TRUE) playsound(pos, 'sound/effects/splat.ogg', 50, 1) H.visible_message("[H] vomits on the floor!", \ "You throw up on the floor!") diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 11db7e8d685..4ac608e6800 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -662,7 +662,7 @@ .=..() if(current_cycle >=11 && prob(min(50,current_cycle)) && ishuman(M)) var/mob/living/carbon/human/H = M - H.vomit(lost_nutrition = 10, blood = prob(10), stun = prob(50), distance = rand(0,4), message = TRUE, toxic = prob(30)) + H.vomit(10, prob(10), prob(50), rand(0,4), TRUE, prob(30)) for(var/datum/reagent/toxin/R in M.reagents.reagent_list) if(R != src) H.reagents.remove_reagent(R.id,1) @@ -672,7 +672,7 @@ if(current_cycle >=33 && prob(15) && ishuman(M)) var/mob/living/carbon/human/H = M H.spew_organ() - H.vomit(lost_nutrition = 0, blood = 1, stun = 1, distance = 4) + H.vomit(0, TRUE, TRUE, 4) to_chat(H, "You feel something lumpy come up as you vomit.") /datum/reagent/toxin/curare diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index a166be04a47..37d4a72276a 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -277,7 +277,7 @@ else if((findtext(message, vomit_words))) cooldown = COOLDOWN_STUN for(var/mob/living/carbon/C in listeners) - C.vomit(10 * power_multiplier) + C.vomit(10 * power_multiplier, distance = power_multiplier) //SILENCE else if((findtext(message, silence_words)))