From 7f7b13b6fd52872023cc6eba19d5ec42cdd507ee Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Wed, 26 Jul 2023 05:43:31 -0500 Subject: [PATCH] facehuggers are less janky (#21805) --- .../mob/living/carbon/alien/special/facehugger.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index ffd813d325d..e76cd3f68c8 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -40,7 +40,7 @@ return attack_hand(user) /obj/item/clothing/mask/facehugger/attack_hand(mob/user) - if((stat == CONSCIOUS && !sterile) && !isalien(user)) + if((stat != DEAD && !sterile) && !isalien(user)) if(Attach(user)) return ..() @@ -74,7 +74,7 @@ return /obj/item/clothing/mask/facehugger/on_found(mob/finder) - if(stat == CONSCIOUS) + if(stat != DEAD) return HasProximity(finder) return 0 @@ -86,7 +86,7 @@ /obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, dodgeable) if(!..()) return - if(stat == CONSCIOUS) + if(stat != DEAD) icon_state = "[initial(icon_state)]_thrown" spawn(15) if(icon_state == "[initial(icon_state)]_thrown") @@ -94,23 +94,23 @@ /obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom) ..() - if(stat == CONSCIOUS) + if(stat != DEAD) icon_state = "[initial(icon_state)]" Attach(hit_atom) /obj/item/clothing/mask/facehugger/proc/Attach(mob/living/M) if(!isliving(M)) return FALSE + if(HAS_TRAIT(M, TRAIT_XENO_IMMUNE)) + return FALSE if(attached) return FALSE else attached = TRUE addtimer(VARSET_CALLBACK(src, attached, FALSE), impregnation_time) - if(HAS_TRAIT(M, TRAIT_XENO_IMMUNE)) - return FALSE if(loc == M) return FALSE - if(stat != CONSCIOUS) + if(stat == DEAD) return FALSE if(!sterile) M.take_organ_damage(strength, 0) //done here so that even borgs and humans in helmets take damage