From 02aa672673d9b95a392a96e69edda92788c3f747 Mon Sep 17 00:00:00 2001 From: TalkingCactus Date: Tue, 30 Aug 2016 17:14:08 -0400 Subject: [PATCH] alien death rattle --- code/modules/mob/living/carbon/alien/alien.dm | 1 + code/modules/mob/living/carbon/alien/death.dm | 14 ++++++++++ .../mob/living/carbon/alien/humanoid/death.dm | 27 +++++++++++++++++-- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index b847cec7be..3f0f4d5179 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -19,6 +19,7 @@ bubble_icon = "alien" type_of_meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/xeno var/nightvision = 1 + var/deathNotified = 0 var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie var/has_fine_manipulation = 0 diff --git a/code/modules/mob/living/carbon/alien/death.dm b/code/modules/mob/living/carbon/alien/death.dm index 99dc75f8ea..745366568a 100644 --- a/code/modules/mob/living/carbon/alien/death.dm +++ b/code/modules/mob/living/carbon/alien/death.dm @@ -9,3 +9,17 @@ /mob/living/carbon/alien/dust_animation() PoolOrNew(/obj/effect/overlay/temp/dust_animation, list(loc, "dust-a")) + +/mob/living/carbon/alien/proc/deathNotice(var/area/AR, var/turf/T) + if(src.z == 2) //Admin fuckery can continue without giving false death rattles to aliens on station or elsewhere. + return + src.deathNotified = 1 + T = get_turf(src) + var/mob/living/carbon/alien/A + for(A in world) + A << "[src.name] has died at [T.loc.name]! " + +/mob/living/carbon/alien/death(gibbed) + if(!deathNotified) + deathNotice() + ..() diff --git a/code/modules/mob/living/carbon/alien/humanoid/death.dm b/code/modules/mob/living/carbon/alien/humanoid/death.dm index 38877ee7eb..cf6c5cac7b 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/death.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/death.dm @@ -1,15 +1,22 @@ /mob/living/carbon/alien/humanoid/death(gibbed) if(stat == DEAD) return - stat = DEAD + if(!deathNotified) //Did we message the other aliens that we died? + deathNotice() //If not, do so now. This proc will change the deathNotified var to 1 so it never happens again. + if(!gibbed) playsound(loc, 'sound/voice/hiss6.ogg', 80, 1, 1) visible_message("[src] lets out a waning guttural screech, green blood bubbling from its maw...") update_canmove() update_icons() status_flags |= CANPUSH + if(fireloss >= (maxHealth/2)) + spawn(10) + visible_message("[src] starts shaking...") + spawn(30) + src.gib() return ..() @@ -25,4 +32,20 @@ if(istype(node)) // just in case someone would ever add a diffirent node to hivenode slot node.queen_death() - return ..(gibbed) \ No newline at end of file + return ..(gibbed) + +/mob/living/carbon/alien/humanoid/gib() + visible_message("[src] explodes in a shower of acid blood and gibs!") + for(var/mob/living/M in viewers(2, src)) + if(ishuman(M)) + M << "You're sprayed with acid blood!" + M.adjustFireLoss(15) + M.reagents.add_reagent("xblood",5) + else if(ismonkey(M)) + M << "You're sprayed with acid blood!" + M.adjustFireLoss(15) + M.reagents.add_reagent("xblood",5) + else if(!isalien(M)) + M << "You're sprayed with acid blood!" + M.adjustFireLoss(15) + ..()