From b27b58ce8f31ab575c35b23dd64d328b6f4ded44 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sun, 13 Mar 2016 04:33:59 -0700 Subject: [PATCH] Lets environment smashers smash through girders --- code/game/objects/structures/girders.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 1fa27723486..af20468279e 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -11,6 +11,23 @@ for(var/i=0;i < metalAmount;i++) new /obj/item/stack/sheet/metal(get_turf(src)) +/obj/structure/girder/attack_animal(var/mob/living/simple_animal/M) + M.changeNext_move(CLICK_CD_MELEE) + M.do_attack_animation(src) + if(M.environment_smash >= 1) + if(M.environment_smash == 3) + ex_act(2) + visible_message("You smash through \the [src].", "[M] smashes through \the [src].") + else + visible_message("You smash against \the [src].", "[M] smash against \the [src].") + take_damage(rand(25, 75)) + return + +/obj/structure/girder/proc/take_damage(var/amount) + health -= amount + if(health < 0) + qdel(src) + /obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/wrench) && state == 0) if(anchored && !istype(src,/obj/structure/girder/displaced))