From b56d2b4db3214e6996f2a436f033fbd8e55c447f Mon Sep 17 00:00:00 2001 From: XDTM Date: Sat, 1 Apr 2017 01:57:47 +0200 Subject: [PATCH] Fixes facehuggers ripping masks off protected mobs (#25488) * Fixes facehuggers ripping masks off protected mobs * it didn't give an error on my end but oh well * i did it --- code/controllers/subsystem/garbage.dm | 4 ---- .../living/carbon/alien/special/facehugger.dm | 22 +++++++++---------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index dc28f4cb50d..77e1befad47 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -932,10 +932,6 @@ var/datum/controller/subsystem/garbage_collector/SSgarbage SearchVar(GALOSHES_DONT_HELP) SearchVar(SLIDE_ICE) SearchVar(limb_icon_cache) - SearchVar(MIN_IMPREGNATION_TIME) - SearchVar(MAX_IMPREGNATION_TIME) - SearchVar(MIN_ACTIVE_TIME) - SearchVar(MAX_ACTIVE_TIME) SearchVar(default_martial_art) SearchVar(plasmaman_on_fire) SearchVar(ai_list) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index fb99df8267a..570b2e13128 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -2,11 +2,11 @@ //TODO: Make these simple_animals -var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone -var/const/MAX_IMPREGNATION_TIME = 150 +#define MIN_IMPREGNATION_TIME 100 //time it takes to impregnate someone +#define MAX_IMPREGNATION_TIME 150 -var/const/MIN_ACTIVE_TIME = 200 //time between being dropped and going idle -var/const/MAX_ACTIVE_TIME = 400 +#define MIN_ACTIVE_TIME 200 //time between being dropped and going idle +#define MAX_ACTIVE_TIME 400 /obj/item/clothing/mask/facehugger name = "alien" @@ -152,14 +152,6 @@ var/const/MAX_ACTIVE_TIME = 400 // probiscis-blocker handling if(iscarbon(M)) var/mob/living/carbon/target = M - if(target.wear_mask) - var/obj/item/clothing/W = target.wear_mask - if(W.flags & NODROP) - return FALSE - if(!istype(W,/obj/item/clothing/mask/facehugger)) - target.dropItemToGround(W) - target.visible_message("[src] tears [W] off of [target]'s face!", \ - "[src] tears [W] off of [target]'s face!") if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -168,6 +160,12 @@ var/const/MAX_ACTIVE_TIME = 400 "[src] smashes against [H]'s [H.head]!") Die() return FALSE + + if(target.wear_mask) + var/obj/item/clothing/W = target.wear_mask + if(!istype(W,/obj/item/clothing/mask/facehugger) && target.dropItemToGround(W)) + target.visible_message("[src] tears [W] off of [target]'s face!", \ + "[src] tears [W] off of [target]'s face!") forceMove(target) target.equip_to_slot_if_possible(src, slot_wear_mask, 0, 1, 1) // early returns and validity checks done: attach.