From 19b59f306b967977a222ddfd6db24fcbe7057588 Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 31 Mar 2022 20:29:43 +0300 Subject: [PATCH] Fixes runtime with turrets and viscerators Fixes viscerators runtiming their ally check when shot by something that's not a mob. --- .../living/simple_mob/subtypes/mechanical/viscerator.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm index 915c14e9f7..6c1d5b738b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm @@ -57,14 +57,14 @@ // Used for a special grenade, to ensure they don't attack the wrong thing. /mob/living/simple_mob/mechanical/viscerator/mercenary/IIsAlly(mob/living/L) . = ..() - if(!.) // Not friendly, see if they're a baddie first. + if(!. && isliving(L)) // Not friendly, see if they're a baddie first. if(L.mind && mercs.is_antagonist(L.mind)) return TRUE // Similar to above but for raiders. /mob/living/simple_mob/mechanical/viscerator/raider/IIsAlly(mob/living/L) . = ..() - if(!.) // Not friendly, see if they're a baddie first. + if(!. && isliving(L)) // Not friendly, see if they're a baddie first. if(L.mind && raiders.is_antagonist(L.mind)) return TRUE @@ -83,7 +83,7 @@ /mob/living/simple_mob/mechanical/viscerator/station/IIsAlly(mob/living/L) . = ..() - if(!.) + if(!. && isliving(L)) if(isrobot(L)) // They ignore synths. return TRUE if(istype(L, /mob/living/simple_mob/mechanical/ward/monitor/crew)) // Also ignore friendly monitor wards @@ -97,4 +97,4 @@ movement_cooldown = 0.5 /decl/mob_organ_names/viscerator - hit_zones = list("chassis", "rotor blades", "sensor array") \ No newline at end of file + hit_zones = list("chassis", "rotor blades", "sensor array")