From a761c900b21c5854b3da85c50358cc7e39a74576 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 16 Apr 2016 19:32:16 -0300 Subject: [PATCH] The return of queued midis --- code/modules/admin/verbs/playsound.dm | 32 +++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index f2166945d65..7bb51127514 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -7,29 +7,27 @@ var/sound/admin_sound if(!check_rights(R_SOUNDS)) return - - var/sound/admin_sound = new() - admin_sound.file = S - admin_sound.priority = 250 - admin_sound.channel = SOUND_CHANNEL_ADMIN - admin_sound.wait = 1 - admin_sound.repeat = 0 - admin_sound.status = SOUND_UPDATE|SOUND_STREAM - log_admin("[key_name(src)] played sound [S]") message_admins("[key_name_admin(src)] played sound [S]") - + var/freq = 1 if(SSevent.holidays && SSevent.holidays[APRIL_FOOLS]) - admin_sound.frequency = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5) + freq = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5) src << "You feel the Honkmother messing with your song..." - + for(var/mob/M in player_list) if(M.client.prefs.toggles & SOUND_MIDI) var/vol = M.client.prefs.adminmusicvolume - M << sound(admin_sound,channel = SOUND_CHANNEL_ADMIN,volume=vol) - - admin_sound.frequency = 1 //Remove this line when the AFD stuff above is gone - admin_sound.wait = 0 + var/sound/admin_sound = new() + admin_sound.file = S + admin_sound.priority = 250 + admin_sound.channel = SOUND_CHANNEL_ADMIN + admin_sound.frequency = freq + admin_sound.wait = 1 + admin_sound.repeat = 0 + admin_sound.status = SOUND_STREAM + admin_sound.volume = vol + M << admin_sound + feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -72,4 +70,4 @@ var/sound/admin_sound M << sound(null) feedback_add_details("admin_verb","SS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -#undef SOUND_CHANNEL_ADMIN \ No newline at end of file +#undef SOUND_CHANNEL_ADMIN