Skip to content

Commit

Permalink
All Facehugger hugs notify now
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben10083 committed Jul 14, 2023
1 parent 4c63e5d commit e6b5407
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
17 changes: 16 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/Facehuggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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("<b>[human]</b> has been facehugged by <b>[name]</b> at \the <b>[hug_area]</b>" + " [OBSERVER_JMP(observer, human)]"))
to_chat(src, SPAN_DEADSAY("<b>[human]</b> has been facehugged by <b>[name]</b> at \the <b>[hug_area]</b>"))
else
for(var/mob/dead/observer/observer as anything in GLOB.observer_list)
to_chat(observer, SPAN_DEADSAY("<b>[human]</b> has been facehugged by <b>[name]</b>" + " [OBSERVER_JMP(observer, human)]"))
to_chat(src, SPAN_DEADSAY("<b>[human]</b> has been facehugged by <b>[name]</b>"))
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
Expand Down
15 changes: 1 addition & 14 deletions code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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("<b>[human]</b> has been facehugged by <b>[src]</b> at \the <b>[hug_area]</b>" + " [OBSERVER_JMP(observer, human)]"))
to_chat(src, SPAN_DEADSAY("<b>[human]</b> has been facehugged by <b>[src]</b> at \the <b>[hug_area]</b>"))
else
for(var/mob/dead/observer/observer as anything in GLOB.observer_list)
to_chat(observer, SPAN_DEADSAY("<b>[human]</b> has been facehugged by <b>[src]</b>" + " [OBSERVER_JMP(observer, human)]"))
to_chat(src, SPAN_DEADSAY("<b>[human]</b> has been facehugged by <b>[src]</b>"))
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()
Expand Down

0 comments on commit e6b5407

Please sign in to comment.