From e6b5407afa3ecb4ac216b93c48eb06e73e1d8bb2 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Fri, 14 Jul 2023 00:32:38 -0400 Subject: [PATCH 1/7] 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() From 0e2d874724eabb9c24983194b4594352d0290275 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:09:14 -0400 Subject: [PATCH 2/7] Update code/modules/mob/living/carbon/xenomorph/Facehuggers.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 66bad131063d..a262d72a00ea 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -285,7 +285,7 @@ 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(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) From 9e1e8c263d734a3b479fc3520f279243b6736cb6 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:09:28 -0400 Subject: [PATCH 3/7] Update code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm index 74e0430432c6..5b03a5db685c 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm @@ -144,7 +144,7 @@ /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, src) + var/did_hug = hugger.attach(human, TRUE, 0.5, src) if(client) client.player_data?.adjust_stat(PLAYER_STAT_FACEHUGS, STAT_CATEGORY_XENO, 1) qdel(src) From fe139d367aee70bb6f3ca1fed02d2479fd5913b7 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:09:59 -0400 Subject: [PATCH 4/7] Update code/modules/mob/living/carbon/xenomorph/Facehuggers.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index a262d72a00ea..5c38cc949915 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, mob/living/carbon/xenomorph/facehugger/hugger) +/obj/item/clothing/mask/facehugger/proc/attach(mob/living/living_mob, silent = FALSE, knockout_mod = 1, mob/living/carbon/xenomorph/facehugger/hugger) if(attached || !can_hug(living_mob, hivenumber)) return FALSE From 07ec415932001f9bb4b8d158ec72f1bd159d1f91 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:10:06 -0400 Subject: [PATCH 5/7] Update code/modules/mob/living/carbon/xenomorph/Facehuggers.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 5c38cc949915..8e9348aa9e60 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -289,7 +289,7 @@ 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(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) From c049a173284aba12681c7f2d9d82603de06d5f45 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:10:11 -0400 Subject: [PATCH 6/7] Update code/modules/mob/living/carbon/xenomorph/Facehuggers.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 8e9348aa9e60..c1ad36480490 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -296,7 +296,7 @@ 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)) + addtimer(CALLBACK(src, PROC_REF(impregnate), human, hugger?.client?.ckey), rand(MIN_IMPREGNATION_TIME, MAX_IMPREGNATION_TIME)) return TRUE From 2da8f0fa6aebe7b27c2ff6ce78800d9f35b20635 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:25:05 -0400 Subject: [PATCH 7/7] remove src Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index c1ad36480490..bc86ea40361c 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -292,9 +292,9 @@ 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) + xeno_message(SPAN_XENOMINORWARNING("You sense that [name] has facehugged a host at \the [hug_area]!"), 1, hivenumber) else - xeno_message(SPAN_XENOMINORWARNING("You sense that [name] has facehugged a host!"), 1, src.hivenumber) + xeno_message(SPAN_XENOMINORWARNING("You sense that [name] has facehugged a host!"), 1, hivenumber) addtimer(CALLBACK(src, PROC_REF(impregnate), human, hugger?.client?.ckey), rand(MIN_IMPREGNATION_TIME, MAX_IMPREGNATION_TIME))