From dca7189b9cbf552ba43042e867df516e17a618bd Mon Sep 17 00:00:00 2001 From: TheDZD Date: Fri, 24 Jun 2016 09:30:43 -0400 Subject: [PATCH] Why the fuck did we not have this already? (#4755) --- code/modules/admin/admin_verbs.dm | 3 ++- code/modules/admin/verbs/randomverbs.dm | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 9d5a0503298..fa0059618bd 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -72,7 +72,8 @@ var/list/admin_verbs_admin = list( /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ /client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */ /client/proc/debug_variables, - /client/proc/show_snpc_verbs + /client/proc/show_snpc_verbs, + /client/proc/reset_all_tcs /*resets all telecomms scripts*/ ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index c236432e9d2..044a64211c8 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -868,6 +868,30 @@ 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/reset_all_tcs() + set category = "Admin" + set name = "Reset Telecomms Scripts" + set desc = "Blanks all telecomms scripts from all telecomms servers" + + if(!holder || !holder.rights || !holder.rights & R_ADMIN) + to_chat(usr, "Admin only.") + return + + var/confirm = alert(src, "You sure you want to blank all NTSL scripts?", "Confirm", "Yes", "No") + if(confirm != "Yes") + return + + for(var/obj/machinery/telecomms/server/S in telecomms_list) + var/datum/TCS_Compiler/C = S.Compiler + S.rawcode = "" + C.Compile("") + for(var/obj/machinery/computer/telecomms/traffic/T in machines) + T.storedcode = "" + log_admin("[key_name(usr)] blanked all telecomms scripts.") + message_admins("[key_name_admin(usr)] blanked all telecomms scripts.") + feedback_add_details("admin_verb","RAT") //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" @@ -886,4 +910,3 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(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) -