diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 0bd68380f194..75ae791a0010 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -535,40 +535,43 @@ add_abilities_to_panel() -/mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1) - if(src.is_muzzled()) - if(message) - src << "The muzzle prevents you from vomiting!" - return 0 - if(stun) - Stun(4) +/mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1, var/toxic = 0) if(nutrition < 100 && !blood) if(message) visible_message("[src] dry heaves!", \ "You try to throw up, but there's nothing your stomach!") if(stun) Weaken(10) + return 1 + + if(is_mouth_covered()) //make this add a blood/vomit overlay later it'll be hilarious + if(message) + visible_message("[src] throws up all over themself!", \ + "You throw up all over yourself!") + distance = 0 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) - T.add_blood_floor(src) - if(stun) - adjustBruteLoss(3) - else - if(T) - T.add_vomit_floor(src) - nutrition -= lost_nutrition - if(stun) - adjustToxLoss(-3) - T = get_step(T, dir) - if (is_blocked_turf(T)) - break + visible_message("[src] throws up!", "You throw up!") + + if(stun) + Stun(4) + + 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) + T.add_blood_floor(src) + if(stun) + adjustBruteLoss(3) + else + if(T) + T.add_vomit_floor(src, 0)//toxic barf looks different + nutrition -= lost_nutrition + adjustToxLoss(-3) + T = get_step(T, dir) + if (is_blocked_turf(T)) + break return 1 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index ad5a44c60b14..3d1635fe0db4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -253,28 +253,17 @@ reagents.metabolize(src, can_overdose=1) dna.species.handle_chemicals_in_body(src) + /mob/living/carbon/human/handle_random_events() - // Puke if toxloss is too high + //Puke if toxloss is too high if(!stat) - if (getToxLoss() >= 45 && nutrition > 20) + if(getToxLoss() >= 45 && nutrition > 20) lastpuke ++ if(lastpuke >= 25) // about 25 second delay I guess - Stun(5) - - visible_message("[src] throws up!", \ - "[src] throws up!") - playsound(loc, 'sound/effects/splat.ogg', 50, 1) - - var/turf/location = loc - if (istype(location, /turf)) - location.add_vomit_floor(src, 1) - - nutrition -= 20 - adjustToxLoss(-3) - - // make it so you can only puke so fast + vomit(20, 0, 1, 0, 1, 1) lastpuke = 0 + /mob/living/carbon/human/has_smoke_protection() if(wear_mask) if(wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT) @@ -288,6 +277,8 @@ if(NOBREATH in dna.species.specflags) . = 1 return . + + /mob/living/carbon/human/proc/handle_embedded_objects() for(var/X in bodyparts) var/obj/item/bodypart/BP = X @@ -304,6 +295,7 @@ if(!has_embedded_objects()) clear_alert("embeddedobject") + /mob/living/carbon/human/proc/handle_heart() CHECK_DNA_AND_SPECIES(src) var/needs_heart = (!(NOBLOOD in dna.species.specflags)) diff --git a/code/modules/mob/living/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm index e0672de9ceea..eb87e5eae71c 100644 --- a/code/modules/mob/living/carbon/human/species_types.dm +++ b/code/modules/mob/living/carbon/human/species_types.dm @@ -397,9 +397,9 @@ /datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) if(istype(chem,/datum/reagent/consumable)) var/datum/reagent/consumable/nutri_check = chem - if(nutri_check.nutriment_factor >0) + if(nutri_check.nutriment_factor > 0) var/turf/pos = get_turf(H) - H.vomit() + H.vomit(0, 0, 0, 1, 1) playsound(pos, 'sound/effects/splat.ogg', 50, 1) H.visible_message("[H] vomits on the floor!", \ "You throw up on the floor!")