From a8f1ee6c91b32d9e92cc982c772479681305190a Mon Sep 17 00:00:00 2001 From: Nanai Date: Sat, 23 Nov 2013 18:50:15 -0500 Subject: [PATCH] Girder health/laserkill fix Allows girders to be broken by repeated laser shots to stop abuse against laserfire. Also, for actually being able to lase through walls if they're open. Resolves issue #3796 --- code/game/objects/structures/girders.dm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index b50225838e6..286c28f37ed 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -4,6 +4,18 @@ density = 1 layer = 2 var/state = 0 + var/health = 200 + + + bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj, /obj/item/projectile/beam)) + health -= Proj.damage + ..() + if(health <= 0) + new /obj/item/stack/sheet/metal(get_turf(src)) + del(src) + + return attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/wrench) && state == 0) @@ -183,10 +195,12 @@ /obj/structure/girder/displaced icon_state = "displaced" anchored = 0 + health = 50 /obj/structure/girder/reinforced icon_state = "reinforced" state = 2 + health = 500 /obj/structure/cultgirder icon= 'icons/obj/cult.dmi' @@ -194,6 +208,7 @@ anchored = 1 density = 1 layer = 2 + var/health = 250 attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/wrench)) @@ -220,6 +235,14 @@ if(prob(40)) del(src) + bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets????? + health -= Proj.damage + ..() + if(health <= 0) + new /obj/item/stack/sheet/metal(get_turf(src)) + del(src) + + return ex_act(severity) switch(severity)