From 93c7b4c6c321b2bfe169d763404a7c7b2ff476b2 Mon Sep 17 00:00:00 2001 From: Chakirski Date: Thu, 1 Jun 2017 13:38:53 -0500 Subject: [PATCH] faux --- code/game/objects/items/devices/radio/radio.dm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 6fa955b461f..3930192ba47 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -37,6 +37,7 @@ var/global/list/default_medbay_channels = list( var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h var/subspace_transmission = 0 var/syndie = 0//Holder to see if it's a syndicate encrpyed radio + var/emp = 0 //How many times this is affected by EMPs var/is_special = 0 //For electropacks mostly, skips Topic() checks @@ -599,13 +600,9 @@ var/global/list/default_medbay_channels = list( else return /obj/item/device/radio/emp_act(severity) - var/emp on = 0 emp++ - spawn(rand(100, 200)) - emp-- - if(!emp) - on = 1 + addtimer(src, "enable_radio", rand(100, 200)) if(listening) visible_message("[src] buzzes violently!") @@ -616,6 +613,12 @@ var/global/list/default_medbay_channels = list( channels[ch_name] = 0 ..() +/obj/item/device/radio/proc/enable_radio() + if(emp > 0) + emp-- + if(!emp) + on = 1 + /////////////////////////////// //////////Borg Radios////////// ///////////////////////////////