From e6b5407afa3ecb4ac216b93c48eb06e73e1d8bb2 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Fri, 14 Jul 2023 00:32:38 -0400 Subject: [PATCH] All Facehugger hugs notify now --- .../mob/living/carbon/xenomorph/Facehuggers.dm | 17 ++++++++++++++++- .../carbon/xenomorph/castes/Facehugger.dm | 15 +-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 5ef9626620b2..66bad131063d 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -246,7 +246,7 @@ throw_atom(target, 3, SPEED_FAST) return TRUE -/obj/item/clothing/mask/facehugger/proc/attach(mob/living/living_mob, silent = FALSE, knockout_mod = 1, hugger_ckey = null) +/obj/item/clothing/mask/facehugger/proc/attach(mob/living/living_mob, silent = FALSE, knockout_mod = 1, hugger_ckey = null, mob/living/carbon/xenomorph/facehugger/hugger) if(attached || !can_hug(living_mob, hivenumber)) return FALSE @@ -281,6 +281,21 @@ if(!human.species || !(human.species.flags & IS_SYNTHETIC)) //synthetics aren't paralyzed human.apply_effect(MIN_IMPREGNATION_TIME * 0.5 * knockout_mod, PARALYZE) //THIS MIGHT NEED TWEAKS + var/area/hug_area = get_area(src) + var/name = hugger ? "[hugger]" : "\a [src]" + if(hug_area) + for(var/mob/dead/observer/observer as anything in GLOB.observer_list) + to_chat(observer, SPAN_DEADSAY("[human] has been facehugged by [name] at \the [hug_area]" + " [OBSERVER_JMP(observer, human)]")) + to_chat(src, SPAN_DEADSAY("[human] has been facehugged by [name] at \the [hug_area]")) + else + for(var/mob/dead/observer/observer as anything in GLOB.observer_list) + to_chat(observer, SPAN_DEADSAY("[human] has been facehugged by [name]" + " [OBSERVER_JMP(observer, human)]")) + to_chat(src, SPAN_DEADSAY("[human] has been facehugged by [name]")) + if(hug_area) + xeno_message(SPAN_XENOMINORWARNING("You sense that [name] has facehugged a host at \the [hug_area]!"), 1, src.hivenumber) + else + xeno_message(SPAN_XENOMINORWARNING("You sense that [name] has facehugged a host!"), 1, src.hivenumber) + addtimer(CALLBACK(src, PROC_REF(impregnate), human, hugger_ckey), rand(MIN_IMPREGNATION_TIME, MAX_IMPREGNATION_TIME)) return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm index 1ad171ec5c93..74e0430432c6 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm @@ -144,23 +144,10 @@ /mob/living/carbon/xenomorph/facehugger/proc/handle_hug(mob/living/carbon/human/human) var/obj/item/clothing/mask/facehugger/hugger = new /obj/item/clothing/mask/facehugger(loc, hivenumber) - var/did_hug = hugger.attach(human, TRUE, 0.5, client?.ckey) + var/did_hug = hugger.attach(human, TRUE, 0.5, client?.ckey, src) if(client) client.player_data?.adjust_stat(PLAYER_STAT_FACEHUGS, STAT_CATEGORY_XENO, 1) - var/area/hug_area = get_area(src) - if(hug_area) - for(var/mob/dead/observer/observer as anything in GLOB.observer_list) - to_chat(observer, SPAN_DEADSAY("[human] has been facehugged by [src] at \the [hug_area]" + " [OBSERVER_JMP(observer, human)]")) - to_chat(src, SPAN_DEADSAY("[human] has been facehugged by [src] at \the [hug_area]")) - else - for(var/mob/dead/observer/observer as anything in GLOB.observer_list) - to_chat(observer, SPAN_DEADSAY("[human] has been facehugged by [src]" + " [OBSERVER_JMP(observer, human)]")) - to_chat(src, SPAN_DEADSAY("[human] has been facehugged by [src]")) qdel(src) - if(hug_area) - xeno_message(SPAN_XENOMINORWARNING("You sense that [src] has facehugged a host at \the [hug_area]!"), 1, src.hivenumber) - else - xeno_message(SPAN_XENOMINORWARNING("You sense that [src] has facehugged a host!"), 1, src.hivenumber) return did_hug /mob/living/carbon/xenomorph/facehugger/age_xeno()