mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
Fixed turrets accidentally killing the AI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user