From 75d28e7255a758a7dc8909bfb7e02cbdfe0c5ac5 Mon Sep 17 00:00:00 2001 From: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Date: Wed, 13 Nov 2019 18:47:52 -0600 Subject: [PATCH] Adds immersion and realism to internals tank suicides (#47714) * Adds immersion and realism to air tank suicides * makes the suicider unrevivable * new inflate_gib proc, adds it mint toxin * want --- code/game/objects/items/tanks/tanks.dm | 20 ++++++------------- code/modules/mob/living/carbon/death.dm | 15 ++++++++++++-- .../chemistry/reagents/toxin_reagents.dm | 2 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 7ebc2d245e1..12b57b84ace 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -125,21 +125,13 @@ var/mob/living/carbon/human/H = user user.visible_message("[user] is putting [src]'s valve to [user.p_their()] lips! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/effects/spray.ogg', 10, TRUE, -3) - if (!QDELETED(H) && air_contents && air_contents.return_pressure() >= 1000) - for(var/obj/item/W in H) - H.dropItemToGround(W) - if(prob(50)) - step(W, pick(GLOB.alldirs)) + if(!QDELETED(H) && air_contents && air_contents.return_pressure() >= 1000) ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC) - H.bleed_rate = 5 - H.gib_animation() - sleep(3) - H.adjustBruteLoss(1000) //to make the body super-bloody - H.spawn_gibs() - H.spill_organs() - H.spread_bodyparts() - - return (BRUTELOSS) + H.inflate_gib() + return MANUAL_SUICIDE + else + to_chat(user, "There isn't enough pressure in [src] to commit suicide with...") + return SHAME /obj/item/tank/attackby(obj/item/W, mob/user, params) add_fingerprint(user) diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index 88cc5efe31d..79c3459f12b 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -17,12 +17,23 @@ if(SSticker.mode) SSticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now -/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts) +/mob/living/carbon/proc/inflate_gib() // Plays an animation that makes mobs appear to inflate before finally gibbing + addtimer(CALLBACK(src, .proc/gib, null, null, TRUE, TRUE), 25) + var/matrix/M = matrix() + M.Scale(1.8, 1.2) + animate(src, time = 40, transform = M, easing = SINE_EASING) + +/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts, safe_gib = FALSE) + if(safe_gib) // If you want to keep all the mob's items and not have them deleted + for(var/obj/item/W in src) + dropItemToGround(W) + if(prob(50)) + step(W, pick(GLOB.alldirs)) var/atom/Tsec = drop_location() for(var/mob/M in src) M.forceMove(Tsec) visible_message("[M] bursts out of [src]!") - ..() + . = ..() /mob/living/carbon/spill_organs(no_brain, no_organs, no_bodyparts) var/atom/Tsec = drop_location() diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 70d55f4dabb..7ea2c98605e 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -143,7 +143,7 @@ /datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M) if(HAS_TRAIT(M, TRAIT_FAT)) - M.gib() + M.inflate_gib() return ..() /datum/reagent/toxin/carpotoxin