From 1172851b0e01cb91f5033f8a6bcad93675433620 Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Wed, 26 Nov 2014 15:29:30 +1100 Subject: [PATCH] Stop Sounds usable by any holder --- code/modules/admin/admin_verbs.dm | 4 ++-- code/modules/admin/verbs/playsound.dm | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 0703040b571..60aafa58491 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -16,7 +16,8 @@ var/list/admin_verbs_default = list( /client/proc/reload_admins, /client/proc/reestablish_db_connection,/*reattempt a connection to the database*/ /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ - /client/proc/cmd_admin_pm_panel /*admin-pm list*/ + /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ + /client/proc/stop_sounds ) var/list/admin_verbs_admin = list( /client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/ @@ -69,7 +70,6 @@ var/list/admin_verbs_ban = list( var/list/admin_verbs_sounds = list( /client/proc/play_local_sound, /client/proc/play_sound, - /client/proc/stop_sounds ) var/list/admin_verbs_fun = list( /client/proc/cmd_admin_dress, diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 0fa3e382fa5..ebb678e1fbc 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -39,15 +39,13 @@ var/sound/admin_sound /client/proc/stop_sounds() set category = "Debug" set name = "Stop Sounds" - if((check_rights(R_SOUNDS)) || (check_rights(R_DEBUG))) + if(!src.holder) return - log_admin("[key_name(src)] stopped all currently playing sounds.") - message_admins("[key_name_admin(src)] stopped all currently playing sounds.") - for(var/mob/M in player_list) - if(M.client) - M << sound(null) - feedback_add_details("admin_verb","SS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + log_admin("[key_name(src)] stopped all currently playing sounds.") + message_admins("[key_name_admin(src)] stopped all currently playing sounds.") + for(var/mob/M in player_list) + if(M.client) + M << sound(null) + feedback_add_details("admin_verb","SS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - else - return #undef SOUND_CHANNEL_ADMIN \ No newline at end of file