From 2eca334bb2a1c00c548c3e8a9204ed6f9d7bc2ce Mon Sep 17 00:00:00 2001 From: jimmyl <70376633+mc-oofert@users.noreply.github.com> Date: Wed, 28 Feb 2024 08:38:03 +0100 Subject: [PATCH] Grilles dont break by just walking into them under any circumstances (#81594) ## About The Pull Request you can no longer just walk into a grille to destroy it rather fast also single letter variable cleanup from that proc ## Why It's Good For The Game this is a bug and bugs are bad ## Changelog :cl: fix: Grilles dont break by just walking into them under any circumstances /:cl: --- code/game/objects/structures/grille.dm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index fba9d5cecc4..da023942518 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -339,19 +339,19 @@ var/turf/T = get_turf(src) if(T.overfloor_placed)//cant be a floor in the way! return FALSE - // Shocking hurts the grille (to weaken monkey powersinks) - if(prob(50)) + + var/obj/structure/cable/cable_node = T.get_cable_node() + if(isnull(cable_node)) + return FALSE + if(!electrocute_mob(user, cable_node, src, 1, TRUE)) + return FALSE + if(prob(50)) // Shocking hurts the grille (to weaken monkey powersinks) take_damage(1, BURN, FIRE, sound_effect = FALSE) - var/obj/structure/cable/C = T.get_cable_node() - if(C) - if(electrocute_mob(user, C, src, 1, TRUE)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() - return TRUE - else - return FALSE - return FALSE + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread + sparks.set_up(3, 1, src) + sparks.start() + + return TRUE /obj/structure/grille/should_atmos_process(datum/gas_mixture/air, exposed_temperature) return exposed_temperature > T0C + 1500 && !broken