Disable CTF emitters until CTF occurs

This commit is contained in:
Tad Hardesty
2018-08-20 03:07:57 -07:00
parent e613eb4e5a
commit 04ef961531
3 changed files with 9 additions and 2 deletions
@@ -125,8 +125,12 @@
/proc/toggle_all_ctf(mob/user)
var/ctf_enabled = FALSE
var/area/A
for(var/obj/machinery/capture_the_flag/CTF in GLOB.machines)
ctf_enabled = CTF.toggle_ctf()
A = get_area(CTF)
for(var/obj/machinery/power/emitter/E in A)
E.active = ctf_enabled
message_admins("[key_name_admin(user)] has [ctf_enabled? "enabled" : "disabled"] CTF!")
notify_ghosts("CTF has been [ctf_enabled? "enabled" : "disabled"]!",'sound/effects/ghost2.ogg')
@@ -28,7 +28,7 @@
idle_power_usage = 0
active_power_usage = 0
active = 1
active = TRUE
locked = TRUE
state = 2