From fee91f7d886d062800757d95bb6cf24e88f3ad98 Mon Sep 17 00:00:00 2001
From: Ben <91219575+Ben10083@users.noreply.github.com>
Date: Fri, 21 Jul 2023 04:49:44 -0400
Subject: [PATCH] Ghosts now notified when larva are about to chestburst out of
un-nested (#3947)
# About the pull request
This PR tells ghosts when someone is about to be chestbursted (only if
not nested)
# Explain why it's good for the game
It is good to have interesting events like chestbursts be told to ghosts
before it happens, letting them observe the event in advance
# Testing Photographs and Procedure
![image](https://github.com/cmss13-devs/cmss13/assets/91219575/ca2b486f-f9ed-41cb-a249-fd4ddd8e4d91)
# Changelog
:cl:
qol: Ghosts now informed when a non-nested host is about to chestburst
/:cl:
---
code/modules/mob/living/carbon/xenomorph/Embryo.dm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/code/modules/mob/living/carbon/xenomorph/Embryo.dm b/code/modules/mob/living/carbon/xenomorph/Embryo.dm
index e6fc734e4e5a..b1c6bddd0ac8 100644
--- a/code/modules/mob/living/carbon/xenomorph/Embryo.dm
+++ b/code/modules/mob/living/carbon/xenomorph/Embryo.dm
@@ -218,6 +218,18 @@
to_chat(new_xeno, "Talk in Hivemind using ; (e.g. ';My life for the queen!')")
playsound_client(new_xeno.client, 'sound/effects/xeno_newlarva.ogg', 25, 1)
+ // Inform observers to grab some popcorn if it isnt nested
+ if(!HAS_TRAIT(affected_mob, TRAIT_NESTED))
+ var/area/burst_area = get_area(src)
+ if(burst_area)
+ for(var/mob/dead/observer/observer as anything in GLOB.observer_list)
+ to_chat(observer, SPAN_DEADSAY("A [new_xeno.hive.prefix]Larva is about to chestburst out of [affected_mob] at \the [burst_area]! [OBSERVER_JMP(observer, affected_mob)]"))
+ to_chat(src, SPAN_DEADSAY("A [new_xeno.hive.prefix]Larva is about to chestburst out of [affected_mob] at \the [burst_area]!"))
+ else
+ for(var/mob/dead/observer/observer as anything in GLOB.observer_list)
+ to_chat(observer, SPAN_DEADSAY("A [new_xeno.hive.prefix]Larva is about to chestburst out of [affected_mob]! [OBSERVER_JMP(observer, affected_mob)]"))
+ to_chat(src, SPAN_DEADSAY("A [new_xeno.hive.prefix]Larva is about to chestburst out of [affected_mob]!"))
+
stage = 6
/mob/living/carbon/xenomorph/larva/proc/cause_unbearable_pain(mob/living/carbon/victim)