Fixed turrets accidentally killing the AI

This commit is contained in:
Loganbacca
2015-07-11 13:31:28 +12:00
parent c04fc312e2
commit 7a82e1c563
+5 -2
View File
@@ -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