mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-02-06 22:59:00 +00:00
Allows you to mute soundfiles from specific admins (#20576)
* Allows you to mute soundfiles from specific admins * me no spello * Wording tweak
This commit is contained in:
@@ -26,14 +26,24 @@ GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
if(alert("Are you sure?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
|
||||
return
|
||||
|
||||
if(holder.fakekey)
|
||||
if(alert("Playing this sound will expose your real ckey despite being in stealth mode. You sure?", "Double check" ,"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 GLOB.player_list)
|
||||
if(M.client.prefs.sound & SOUND_MIDI)
|
||||
if(ckey in M.client.prefs.admin_sound_ckey_ignore)
|
||||
continue // This player has this admin muted
|
||||
if(isnewplayer(M) && (M.client.prefs.sound & SOUND_LOBBY))
|
||||
M.stop_sound_channel(CHANNEL_LOBBYMUSIC)
|
||||
uploaded_sound.volume = 100 * M.client.prefs.get_channel_volume(CHANNEL_ADMIN)
|
||||
|
||||
var/this_uid = M.client.UID()
|
||||
to_chat(M, "<span class='boldannounce'>[ckey] played <code>[S]</code> (<a href='?src=[this_uid];action=silenceSound'>SILENCE</a>) (<a href='?src=[this_uid];action=muteAdmin&a=[ckey]'>ALWAYS SILENCE THIS ADMIN</a>)</span>")
|
||||
SEND_SOUND(M, uploaded_sound)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
Reference in New Issue
Block a user