From 075ad2a943c3e8fc893a067bb87d8b58be1efc68 Mon Sep 17 00:00:00 2001 From: SamCroswell Date: Sat, 26 Jul 2014 18:04:33 -0400 Subject: [PATCH] Added an admin verb to toggle ERTs --- code/modules/admin/admin_verbs.dm | 2 ++ code/modules/admin/verbs/randomverbs.dm | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 605c526022c..a114e065049 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -88,6 +88,7 @@ var/list/admin_verbs_event = list( /client/proc/toggle_random_events, /client/proc/editappear, /client/proc/toggle_random_events, + /client/proc/toggle_ert_calling, /client/proc/cmd_admin_change_custom_event, /datum/admins/proc/access_news_network, /*allows access of newscasters*/ /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/ @@ -125,6 +126,7 @@ var/list/admin_verbs_server = list( /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/ /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ /client/proc/toggle_random_events, + /client/proc/toggle_ert_calling, /client/proc/one_click_antag, /client/proc/cmd_admin_change_custom_event, /client/proc/cmd_admin_create_centcom_report, diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 30b962d08dc..b9f284a1a2f 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1048,3 +1048,21 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1) feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/proc/toggle_ert_calling() + set category = "Event" + set name = "Toggle ERT" + + set desc = "Toggle the station's ability to call a response team." + if(!check_rights(R_EVENT)) return + + if(ticker.mode.ert_disabled) + ticker.mode.ert_disabled = 0 + usr << "\blue ERT has been Enabled." + log_admin("Admin [key_name(src)] has enabled ERT calling.") + message_admins("Admin [key_name_admin(usr)] has enabled ERT calling.", 1) + else + ticker.mode.ert_disabled = 1 + usr << "\red ERT has been Disabled." + log_admin("Admin [key_name(src)] has disabled ERT calling.") + message_admins("Admin [key_name_admin(usr)] has disabled ERT calling.", 1) +