mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-19 13:53:17 +00:00
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
50 lines
1.8 KiB
Plaintext
50 lines
1.8 KiB
Plaintext
var/list/sounds_cache = list()
|
|
|
|
/client/proc/play_sound(S as sound)
|
|
set category = "Fun"
|
|
set name = "Play Global Sound"
|
|
if(!check_rights(R_SOUNDS)) return
|
|
|
|
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]",admin_key=key_name(src))
|
|
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
|
for(var/mob/M in GLOB.player_list)
|
|
if(M.client.prefs.toggles & SOUND_MIDI)
|
|
sound_to(M, uploaded_sound)
|
|
|
|
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"
|
|
if(!check_rights(R_SOUNDS)) return
|
|
|
|
log_admin("[key_name(src)] played a local sound [S]",admin_key=key_name(src))
|
|
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
|
|
playsound(get_turf(src.mob), S, 50, 0, 0)
|
|
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!
|