From 9d84f4890b18ca0ae9afd7bcca48c35eb89f683f Mon Sep 17 00:00:00 2001 From: YoYoBatty <32651551+yoyobatty@users.noreply.github.com> Date: Sun, 6 Oct 2019 05:35:18 -0400 Subject: [PATCH] Indestructible objects don't explode from tesla (#46895) Title. Prevents indestructible objects such as turret controller and authentication keys from exploding dozens of times from a tesloose. Could also stop lag and unintended deletion of objects not meant to be deleted such as the self destruct terminal. --- code/game/machinery/_machinery.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 11d0a30554b..e414c185f4c 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -530,7 +530,7 @@ Class Procs: /obj/machinery/tesla_act(power, tesla_flags, shocked_objects) ..() - if(prob(85) && (tesla_flags & TESLA_MACHINE_EXPLOSIVE)) + if(prob(85) && (tesla_flags & TESLA_MACHINE_EXPLOSIVE) && !(resistance_flags & INDESTRUCTIBLE)) explosion(src, 1, 2, 4, flame_range = 2, adminlog = FALSE, smoke = FALSE) if(tesla_flags & TESLA_OBJ_DAMAGE) take_damage(power/2000, BURN, "energy")