mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +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(
|
var/list/admin_verbs_sounds = list(
|
||||||
/client/proc/play_local_sound,
|
/client/proc/play_local_sound,
|
||||||
/client/proc/play_sound
|
/client/proc/play_sound,
|
||||||
|
/client/proc/play_server_sound
|
||||||
)
|
)
|
||||||
var/list/admin_verbs_fun = list(
|
var/list/admin_verbs_fun = list(
|
||||||
/client/proc/object_talk,
|
/client/proc/object_talk,
|
||||||
@@ -206,6 +207,7 @@ var/list/admin_verbs_hideable = list(
|
|||||||
/client/proc/check_words,
|
/client/proc/check_words,
|
||||||
/client/proc/play_local_sound,
|
/client/proc/play_local_sound,
|
||||||
/client/proc/play_sound,
|
/client/proc/play_sound,
|
||||||
|
/client/proc/play_server_sound,
|
||||||
/client/proc/object_talk,
|
/client/proc/object_talk,
|
||||||
/client/proc/cmd_admin_dress,
|
/client/proc/cmd_admin_dress,
|
||||||
/client/proc/cmd_admin_gib_self,
|
/client/proc/cmd_admin_gib_self,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
var/list/sounds_cache = list()
|
||||||
|
|
||||||
/client/proc/play_sound(S as sound)
|
/client/proc/play_sound(S as sound)
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
set name = "Play Global Sound"
|
set name = "Play Global Sound"
|
||||||
@@ -6,6 +8,11 @@
|
|||||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||||
uploaded_sound.priority = 250
|
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]")
|
log_admin("[key_name(src)] played sound [S]")
|
||||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||||
for(var/mob/M in player_list)
|
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!
|
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)
|
/client/proc/play_local_sound(S as sound)
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
set name = "Play Local Sound"
|
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!
|
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()
|
/client/proc/cuban_pete()
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
|
|||||||
11
sound/serversound_list.txt
Normal file
11
sound/serversound_list.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
sound/music/1.ogg
|
||||||
|
sound/music/b12_combined_start.ogg
|
||||||
|
sound/music/main.ogg
|
||||||
|
sound/music/space.ogg
|
||||||
|
sound/music/space_asshole.ogg
|
||||||
|
sound/music/space_oddity.ogg
|
||||||
|
sound/music/title1.ogg
|
||||||
|
sound/music/title2.ogg
|
||||||
|
sound/music/traitor.ogg
|
||||||
|
sound/items/bikehorn.ogg
|
||||||
|
sound/effects/siren.ogg
|
||||||
Reference in New Issue
Block a user