diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index e5b5e53cbd..934aeec09c 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -474,14 +474,14 @@ var/list/turret_icons if(!L) return TURRET_NOT_TARGET - if(issilicon(L)) // Don't target silica + if(!emagged && issilicon(L)) // Don't target silica return TURRET_NOT_TARGET if(L.stat && !emagged) //if the perp is dead/dying, no need to bother really return TURRET_NOT_TARGET //move onto next potential victim! if(get_dist(src, L) > 7) //if it's too far away, why bother? - return 0 + return TURRET_NOT_TARGET if(!check_trajectory(L, src)) //check if we have true line of sight return TURRET_NOT_TARGET @@ -489,6 +489,9 @@ var/list/turret_icons if(emagged) // If emagged not even the dead get a rest return L.stat ? TURRET_SECONDARY_TARGET : TURRET_PRIORITY_TARGET + if(lethal && locate(/mob/living/silicon/ai) in get_turf(L)) //don't accidentally kill the AI! + return TURRET_NOT_TARGET + if(check_synth) //If it's set to attack all non-silicons, target them! if(L.lying) return lethal ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET