From 3a1cb614e33b8febba586287da80e67fe8b5b660 Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Tue, 28 Sep 2010 20:16:02 +0000 Subject: [PATCH] Electrified airlocks no longer zap you more than once if you bump into them while running. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@209 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/doors/airlock.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index e2b51e0b810..885278e5466 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -76,6 +76,8 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }. var/lockdownbyai = 0 autoclose = 1 var/doortype = 0 + var/justzap = 0 + /obj/machinery/door/airlock/command name = "Airlock" icon = 'Doorcom.dmi' @@ -132,7 +134,13 @@ About the new airlock wires panel: /obj/machinery/door/airlock/bumpopen(mob/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite if (!istype(usr, /mob/living/silicon)) if (src.isElectrified()) - if(src.shock(user, 100)) + if (!src.justzap) + if(src.shock(user, 100)) + src.justzap = 1 + spawn (10) + src.justzap = 0 + return + else if (src.justzap) return ..(user)