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.
This commit is contained in:
YoYoBatty
2019-10-06 22:35:18 +13:00
committed by oranges
parent f356d01469
commit 9d84f4890b
+1 -1
View File
@@ -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")