From 4058f268e1ae643ebef9d199f05b959ac7217b07 Mon Sep 17 00:00:00 2001 From: oranges Date: Sun, 14 Feb 2016 19:39:29 +1300 Subject: [PATCH 1/2] Fix how AI turrets assess human perps Now it matches how the old logic worked Probably also takes care of how heavy turrets are at the moment. --- code/game/machinery/portable_turret.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 141ec913d30..adbf8dc78a4 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -554,6 +554,8 @@ invisibility = 2 icon_state = "[base_icon_state][off_state]" +/obj/machinery/porta_turret/ai/assess_perp(mob/living/carbon/human/perp) + return 10 //AI turrets shoot at everything not in their faction /obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp) var/threatcount = 0 //the integer returned From 1653df9e5115dba4ee5c8e8d33bd1050b25471fe Mon Sep 17 00:00:00 2001 From: oranges Date: Sun, 14 Feb 2016 19:43:52 +1300 Subject: [PATCH 2/2] Make sure function is defined before overriding it --- code/game/machinery/portable_turret.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index adbf8dc78a4..e0ef761e988 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -554,9 +554,6 @@ invisibility = 2 icon_state = "[base_icon_state][off_state]" -/obj/machinery/porta_turret/ai/assess_perp(mob/living/carbon/human/perp) - return 10 //AI turrets shoot at everything not in their faction - /obj/machinery/porta_turret/proc/assess_perp(mob/living/carbon/human/perp) var/threatcount = 0 //the integer returned @@ -609,6 +606,8 @@ return threatcount +/obj/machinery/porta_turret/ai/assess_perp(mob/living/carbon/human/perp) + return 10 //AI turrets shoot at everything not in their faction /obj/machinery/porta_turret/proc/in_faction(mob/target) if(!(faction in target.faction))