diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index f8c0615ef95..cee1b37e176 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -323,6 +323,14 @@ var/list/_client_preferences_by_type enabled_description = "On" disabled_description = "Off" +//RS ADDITION +/datum/client_preference/looc_sounds + description = "LOOC Sound" + key = "LOOC_SOUNDS" + enabled_description = "On" + disabled_description = "Off" +//RS ADDITION END + /datum/client_preference/runechat_mob description = "Runechat (Mobs)" key = "RUNECHAT_MOB" @@ -373,7 +381,7 @@ var/list/_client_preferences_by_type key = "RECEIVE_TIPS" enabled_description = "Enabled" disabled_description = "Disabled" - + /datum/client_preference/pain_frequency description = "Pain Messages Cooldown" key = "PAIN_FREQUENCY" diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index dff1c3f5a2f..a9ff7cd59da 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -479,6 +479,21 @@ feedback_add_details("admin_verb","TSubtleSounds") +//RS ADDITION +/client/verb/toggle_looc_sounds() + set name = "Sound-Toggle-LOOC" + set category = "Preferences" + set desc = "Toggle hearing a sound when somebody uses LOOC." + + var/pref_path = /datum/client_preference/looc_sounds + toggle_preference(pref_path) + SScharacter_setup.queue_preferences_save(prefs) + + to_chat(src, "You will now [(is_preference_enabled(/datum/client_preference/looc_sounds)) ? "hear" : "not hear"] LOOC sounds.") + + feedback_add_details("admin_verb","TLOOCSounds") +//RS ADDITION END + // Not attached to a pref datum because those are strict binary toggles /client/verb/toggle_examine_mode() set name = "Toggle Examine Mode" diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index 0a5622752c7..6ccee7fe1dd 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -178,6 +178,10 @@ admin_stuff += "/([key])" to_chat(target, "" + create_text_tag("looc", "LOOC:", target) + " [display_name][admin_stuff]: [msg]") + //RS ADDITION + if(target.is_preference_enabled(/datum/client_preference/looc_sounds)) + target << sound('sound/talksounds/looc_sound.ogg', volume = 50) + //RS ADDITION END for(var/client/target in r_receivers) var/admin_stuff = "/([key])([admin_jump_link(mob, target.holder)])" diff --git a/sound/talksounds/looc_sound.ogg b/sound/talksounds/looc_sound.ogg new file mode 100644 index 00000000000..d5380a7e60c Binary files /dev/null and b/sound/talksounds/looc_sound.ogg differ