From 1acee77427010116467d266707bad0116324d272 Mon Sep 17 00:00:00 2001 From: ExcessiveUseOfCobblestone <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com> Date: Tue, 13 Feb 2018 21:46:33 -0500 Subject: [PATCH] Fixes Battlecruiser Turrets and Improves Turret's Faction Capabilities (#35427) * Update portable_turret.dm * Update portable_turret.dm * Update portable_turret.dm * f --- .../RandomRuins/SpaceRuins/caravanambush.dmm | 4 ++-- _maps/templates/pirate_ship.dmm | 18 +++++++++--------- .../machinery/porta_turret/portable_turret.dm | 19 ++++++++++--------- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/_maps/RandomRuins/SpaceRuins/caravanambush.dmm b/_maps/RandomRuins/SpaceRuins/caravanambush.dmm index 8bf0ab8c89ff..5370be03a08f 100644 --- a/_maps/RandomRuins/SpaceRuins/caravanambush.dmm +++ b/_maps/RandomRuins/SpaceRuins/caravanambush.dmm @@ -530,14 +530,14 @@ "bb" = ( /obj/machinery/porta_turret/syndicate/pod{ dir = 5; - faction = "pirate" + faction = list("pirate") }, /turf/closed/wall/mineral/plastitanium, /area/shuttle/caravan/pirate) "bc" = ( /obj/machinery/porta_turret/syndicate/pod{ dir = 6; - faction = "pirate" + faction = list("pirate") }, /turf/closed/wall/mineral/plastitanium, /area/shuttle/caravan/pirate) diff --git a/_maps/templates/pirate_ship.dmm b/_maps/templates/pirate_ship.dmm index 954e396486ea..8b513991b0e4 100644 --- a/_maps/templates/pirate_ship.dmm +++ b/_maps/templates/pirate_ship.dmm @@ -904,13 +904,6 @@ }, /turf/open/floor/plating, /area/shuttle/pirate) -"cf" = ( -/obj/machinery/porta_turret/syndicate{ - dir = 1; - faction = "pirate" - }, -/turf/closed/wall/mineral/plastitanium/nodiagonal, -/area/shuttle/pirate) "cg" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden, /obj/machinery/door/airlock/public/glass{ @@ -1788,6 +1781,13 @@ }, /turf/open/floor/engine/vacuum, /area/shuttle/pirate) +"dV" = ( +/obj/machinery/porta_turret/syndicate{ + dir = 1; + faction = list("pirate") + }, +/turf/closed/wall/mineral/plastitanium/nodiagonal, +/area/shuttle/pirate) (1,1,1) = {" aa @@ -1803,7 +1803,7 @@ aj aj bF aj -cf +dV aj aj aj @@ -2323,7 +2323,7 @@ aj aj bW aj -cf +dV aj aj aj diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index aa54ae0b4dac..9a88febdc2b9 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -67,7 +67,7 @@ var/on = TRUE //determines if the turret is on - var/faction = "turret" // Same faction mobs will never be shot at, no matter the other settings + var/list/faction = list("turret") // Same faction mobs will never be shot at, no matter the other settings var/datum/effect_system/spark_spread/spark_system //the spark system, used for generating... sparks? @@ -488,9 +488,10 @@ /obj/machinery/porta_turret/proc/in_faction(mob/target) - if(!(faction in target.faction)) - return 0 - return 1 + for(var/faction1 in faction) + if(faction1 in target.faction) + return TRUE + return FALSE /obj/machinery/porta_turret/proc/target(atom/movable/target) if(target) @@ -570,7 +571,7 @@ stun_projectile_sound = 'sound/weapons/gunshot.ogg' icon_state = "syndie_off" base_icon_state = "syndie" - faction = ROLE_SYNDICATE + faction = list(ROLE_SYNDICATE) emp_vunerable = 0 desc = "A ballistic machine gun auto-turret." @@ -606,7 +607,7 @@ lethal_projectile = /obj/item/projectile/bullet/syndicate_turret /obj/machinery/porta_turret/ai - faction = "silicon" + faction = list("silicon") /obj/machinery/porta_turret/ai/assess_perp(mob/living/carbon/human/perp) return 10 //AI turrets shoot at everything not in their faction @@ -618,7 +619,7 @@ lethal_projectile = /obj/item/projectile/plasma/turret lethal_projectile_sound = 'sound/weapons/plasma_cutter.ogg' mode = TURRET_LETHAL //It would be useless in stun mode anyway - faction = "neutral" //Minebots, medibots, etc that should not be shot. + faction = list("neutral","silicon","turret") //Minebots, medibots, etc that should not be shot. /obj/machinery/porta_turret/aux_base/assess_perp(mob/living/carbon/human/perp) return 0 //Never shoot humanoids. You are on your own if Ashwalkers or the like attack! @@ -647,7 +648,7 @@ stun_projectile_sound = 'sound/weapons/plasma_cutter.ogg' icon_state = "syndie_off" base_icon_state = "syndie" - faction = "turret" + faction = list("neutral","silicon","turret") emp_vunerable = 0 mode = TURRET_LETHAL @@ -664,7 +665,7 @@ desc = "A turret built with substandard parts and run down further with age. Still capable of delivering lethal lasers to the odd space carp, but not much else." stun_projectile = /obj/item/projectile/beam/weak lethal_projectile = /obj/item/projectile/beam/weak - faction = "neutral" + faction = list("neutral","silicon","turret") //////////////////////// //Turret Control Panel//