mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Play server sound verb for admins
This commit is contained in:
@@ -87,7 +87,8 @@ var/list/admin_verbs_ban = list(
|
||||
)
|
||||
var/list/admin_verbs_sounds = list(
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound
|
||||
/client/proc/play_sound,
|
||||
/client/proc/play_server_sound
|
||||
)
|
||||
var/list/admin_verbs_fun = list(
|
||||
/client/proc/object_talk,
|
||||
@@ -206,6 +207,7 @@ var/list/admin_verbs_hideable = list(
|
||||
/client/proc/check_words,
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/play_server_sound,
|
||||
/client/proc/object_talk,
|
||||
/client/proc/cmd_admin_dress,
|
||||
/client/proc/cmd_admin_gib_self,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
var/list/sounds_cache = list()
|
||||
|
||||
/client/proc/play_sound(S as sound)
|
||||
set category = "Fun"
|
||||
set name = "Play Global Sound"
|
||||
@@ -6,6 +8,11 @@
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||
uploaded_sound.priority = 250
|
||||
|
||||
sounds_cache += S
|
||||
|
||||
if(alert("Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
@@ -14,7 +21,6 @@
|
||||
|
||||
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/play_local_sound(S as sound)
|
||||
set category = "Fun"
|
||||
set name = "Play Local Sound"
|
||||
@@ -26,6 +32,22 @@
|
||||
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/play_server_sound()
|
||||
set category = "Fun"
|
||||
set name = "Play Server Sound"
|
||||
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
|
||||
|
||||
play_sound(melody)
|
||||
feedback_add_details("admin_verb","PSS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/*
|
||||
/client/proc/cuban_pete()
|
||||
set category = "Fun"
|
||||
|
||||
Reference in New Issue
Block a user