Skip to content

Commit

Permalink
Merge pull request #55 from Very-Soft/looc
Browse files Browse the repository at this point in the history
LOOC sound
  • Loading branch information
Very-Soft authored Nov 13, 2023
2 parents 5911323 + 7aba38d commit 3106abb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
10 changes: 9 additions & 1 deletion code/modules/client/preference_setup/global/setting_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions code/modules/client/preferences_toggle_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions code/modules/client/verbs/ooc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@
admin_stuff += "/([key])"

to_chat(target, "<span class='looc'>" + create_text_tag("looc", "LOOC:", target) + " <EM>[display_name][admin_stuff]:</EM> <span class='message'>[msg]</span></span>")
//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)])"
Expand Down
Binary file added sound/talksounds/looc_sound.ogg
Binary file not shown.

0 comments on commit 3106abb

Please sign in to comment.