diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 910bd136256..05915bc884c 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -240,6 +240,21 @@ var/global/list/pipeID2State = list( qdel(src) +/obj/item/pipe/suicide_act(mob/user) + if (pipe_type in list(PIPE_PUMP, PIPE_PASSIVE_GATE, PIPE_VOLUME_PUMP)) + user.visible_message("[user] shoved the [src] in \his mouth and turned it on! It looks like \he's trying to commit suicide.") + 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) + sleep(5) + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = C + H.vessel.remove_reagent("blood",560) + return(OXYLOSS|BRUTELOSS) + else + return ..() + /obj/item/pipe_meter name = "meter" desc = "A meter that can be laid on pipes" diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 3a64fc7a484..7dfdb4690d4 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -589,31 +589,44 @@ var/const/GALOSHES_DONT_HELP = 4 add_abilities_to_panel() -/mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood) +/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()) - src << "The muzzle prevents you from vomiting!" + if(message) + src << "The muzzle prevents you from vomiting!" return 0 - Stun(4) + if(stun) + Stun(4) if(nutrition < 100 && !blood) - visible_message("[src] dry heaves!", \ - "You try to throw up, but there's nothing your stomach!") - Weaken(10) + if(message) + visible_message("[src] dry heaves!", \ + "You try to throw up, but there's nothing your stomach!") + if(stun) + Weaken(10) else - visible_message("[src] throws up!", \ - "You throw up!") + 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) - if(blood) - if(T) - T.add_blood_floor(src) - adjustBruteLoss(3) - else - if(T) - T.add_vomit_floor(src) - nutrition -= lost_nutrition - adjustToxLoss(-3) + 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 return 1 + + /mob/living/carbon/fully_replace_character_name(oldname,newname) ..() if(dna)