From 698f86152c70bb99940f450c21965e8f790c6907 Mon Sep 17 00:00:00 2001 From: "d_h2005@yahoo.com" Date: Tue, 6 Nov 2012 22:24:54 +0000 Subject: [PATCH] Shield generator walls will no longer vanish when blown up. Instead, the walls will persist and the shield generators will take a hit to their stored power. Fixes issue 1070. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5020 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/shieldgen.dm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 3f6b47179c9..7cf0e63352b 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -576,7 +576,7 @@ return -//////////////Contaiment Field START +//////////////Containment Field START /obj/machinery/shieldwall name = "Shield" desc = "An energy shield." @@ -605,6 +605,7 @@ /obj/machinery/shieldwall/attack_hand(mob/user as mob) return + /obj/machinery/shieldwall/process() if(needs_power) if(isnull(gen_primary)||isnull(gen_secondary)) @@ -633,6 +634,32 @@ return +/obj/machinery/shieldwall/ex_act(severity) + if(needs_power) + var/obj/machinery/shieldwallgen/G + switch(severity) + if(1.0) //big boom + if(prob(50)) + G = gen_primary + else + G = gen_secondary + G.storedpower -= 200 + + if(2.0) //medium boom + if(prob(50)) + G = gen_primary + else + G = gen_secondary + G.storedpower -= 50 + + if(3.0) //lil boom + if(prob(50)) + G = gen_primary + else + G = gen_secondary + G.storedpower -= 20 + return + /obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1