From f271e162f86b73091ae527962452715c8873333e Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Mon, 8 Jun 2015 07:16:28 -0700 Subject: [PATCH] Clean up odd list cancel things in playsound. --- code/modules/admin/verbs/playsound.dm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index ae985071f76..8f02ba18611 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -38,12 +38,10 @@ var/list/sounds_cache = list() if(!check_rights(R_SOUNDS)) return var/list/sounds = file2list("sound/serversound_list.txt"); - sounds += "--CANCEL--" sounds += sounds_cache - var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds - - if(melody == "--CANCEL--") return + var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds + if(!melody) return play_sound(melody) feedback_add_details("admin_verb","PSS") //If you are copy-pasting this, ensure the 2nd paramter is unique to the new proc! @@ -58,15 +56,14 @@ var/list/sounds_cache = list() if(A != "Yep") return var/list/sounds = file2list("sound/serversound_list.txt"); - sounds += "--CANCEL--" sounds += sounds_cache - var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds - - if(melody == "--CANCEL--") return + var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds + if(!melody) return var/cvol = 35 var/inputvol = input("How loud would you like this to be? (1-70)", "Volume", "35") as num | null + if(!inputvol) return if(inputvol && inputvol >= 1 && inputvol <= 70) cvol = inputvol