From dc4b29ac669d029e9ec1fef4347f35ca04527a05 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:49:17 +0300 Subject: [PATCH] Fixes teslas in fiorina (#6900) # About the pull request Closes #1090 Makes the tesla on the scavenger ship unhackable for consistency as well as not shoot the sentry right next to it due to how crowded the space is # Explain why it's good for the game Fixes a bug # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: Fixed the premade tesla coils on Fiorina /:cl: --------- Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> --- code/modules/defenses/tesla_coil.dm | 15 +++++++++++++++ .../FOP_v3_Sciannex/Fiorina_SciAnnex.dmm | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/code/modules/defenses/tesla_coil.dm b/code/modules/defenses/tesla_coil.dm index 0f7a0090300a..bb150acc1e95 100644 --- a/code/modules/defenses/tesla_coil.dm +++ b/code/modules/defenses/tesla_coil.dm @@ -11,6 +11,7 @@ var/last_fired = 0 var/tesla_range = TESLA_COIL_RANGE var/fire_delay = TESLA_COIL_FIREDELAY + var/attack_defenses = TRUE handheld_type = /obj/item/defenses/handheld/tesla_coil disassemble_time = 10 health = 150 @@ -83,6 +84,9 @@ targets += M FOR_DOVIEW_END + if(!attack_defenses) + return + FOR_DOVIEW(var/obj/structure/machinery/defenses/D, tesla_range, src, HIDE_INVISIBLE_OBSERVER) if(D.turned_on) targets += D @@ -159,6 +163,17 @@ . = ..() +// For mapping +/obj/structure/machinery/defenses/tesla_coil/premade + turned_on = TRUE + static = TRUE + +/obj/structure/machinery/defenses/tesla_coil/premade/attackby(obj/item/O, mob/user) + return + +/obj/structure/machinery/defenses/tesla_coil/premade/smart + attack_defenses = FALSE + #define TESLA_COIL_STUN_FIRE_DELAY 3 SECONDS #define TESLA_COIL_STUN_EFFECT 1 /obj/structure/machinery/defenses/tesla_coil/stun diff --git a/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm b/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm index 54a56be13283..6878a0c1ed20 100644 --- a/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm +++ b/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm @@ -845,7 +845,7 @@ /turf/open/floor/prison/floor_plate, /area/fiorina/station/telecomm/lz1_cargo) "aFp" = ( -/obj/structure/machinery/defenses/tesla_coil{ +/obj/structure/machinery/defenses/tesla_coil/premade/smart{ faction_group = list("CLF") }, /turf/open/floor/plating/plating_catwalk, @@ -30182,7 +30182,7 @@ /turf/open/floor/corsat/squares, /area/fiorina/station/medbay) "xgx" = ( -/obj/structure/machinery/defenses/tesla_coil{ +/obj/structure/machinery/defenses/tesla_coil/premade{ faction_group = list("USCM") }, /turf/open/organic/grass/astroturf,