diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index ee509be5fc9..d7b3be526cd 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -534,7 +534,9 @@ for(var/obj/machinery/capture_the_flag/CTF in machines) ctf_enabled = !CTF.ctf_enabled CTF.ctf_enabled = !CTF.ctf_enabled + CTF.TellGhost() message_admins("[key_name_admin(usr)] has [ctf_enabled? "enabled" : "disabled"] CTF!") + notify_ghosts("CTF has been [ctf_enabled? "enabled" : "disabled"]!",'sound/effects/ghost2.ogg') if(E) E.processing = 0 diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index ea4446dcd21..d5b92844f51 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -172,6 +172,16 @@ M.faction += team M.equipOutfit(ctf_gear) +/obj/machinery/capture_the_flag/proc/TellGhost() + if(ctf_enabled) + notify_ghosts("[name] has been activated!", enter_link="(Click to join the [team] team!) or click on the controller directly!", source = src, attack_not_jump = 0) + +/obj/machinery/capture_the_flag/Topic(href, href_list) + if(href_list["join"]) + var/mob/dead/observer/ghost = usr + if(istype(ghost)) + attack_ghost(ghost) + /obj/machinery/capture_the_flag/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/twohanded/required/ctf)) var/obj/item/weapon/twohanded/required/ctf/flag = I @@ -214,6 +224,12 @@ CTF.ctf_gear = CTF.instagib_gear CTF.respawn_cooldown = INSTAGIB_RESPAWN +/obj/machinery/capture_the_flag/proc/normal_mode() + for(var/obj/machinery/capture_the_flag/CTF in machines) + if(CTF.ctf_enabled == TRUE) + CTF.ctf_gear = initial(ctf_gear) + CTF.respawn_cooldown = DEFAULT_RESPAWN + /obj/item/weapon/gun/projectile/automatic/pistol/deagle/CTF desc = "This looks like it could really hurt in melee." force = 75