mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #11495 from VOREStation/upstream-merge-8242
[MIRROR] Adds Headset Radio Sounds
This commit is contained in:
committed by
Chompstation Bot
parent
145f8172f4
commit
ce6a820f44
@@ -62,10 +62,12 @@
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
|
||||
if (aiOverride)
|
||||
playsound(loc, 'sound/effects/radio_common.ogg', 25, 1, 1)
|
||||
return ..(freq, level)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.l_ear == src || H.r_ear == src)
|
||||
playsound(loc, 'sound/effects/radio_common.ogg', 25, 1, 1)
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
|
||||
|
||||
@@ -295,6 +295,12 @@ var/list/_client_preferences_by_type
|
||||
enabled_description = "Show"
|
||||
disabled_description = "Hide"
|
||||
|
||||
/datum/client_preference/radio_sounds
|
||||
description = "Radio Sounds"
|
||||
key = "RADIO_SOUNDS"
|
||||
enabled_description = "On"
|
||||
disabled_description = "Off"
|
||||
|
||||
/datum/client_preference/runechat_mob
|
||||
description = "Runechat (Mobs)"
|
||||
key = "RUNECHAT_MOB"
|
||||
|
||||
@@ -393,6 +393,19 @@
|
||||
feedback_add_details("admin_verb","TStatusIndicators")
|
||||
|
||||
|
||||
/client/verb/toggle_radio_sounds()
|
||||
set name = "Toggle Radio Sounds"
|
||||
set category = "Preferences"
|
||||
set desc = "Enable/Disable hearing a sound when somebody speaks over your headset."
|
||||
|
||||
var/pref_path = /datum/client_preference/radio_sounds
|
||||
toggle_preference(pref_path)
|
||||
SScharacter_setup.queue_preferences_save(prefs)
|
||||
|
||||
to_chat(src, "You will now [(is_preference_enabled(/datum/client_preference/radio_sounds)) ? "hear" : "not hear"] radio sounds.")
|
||||
|
||||
feedback_add_details("admin_verb","TRadioSounds")
|
||||
|
||||
// Not attached to a pref datum because those are strict binary toggles
|
||||
/client/verb/toggle_examine_mode()
|
||||
set name = "Toggle Examine Mode"
|
||||
|
||||
BIN
sound/effects/radio_common.ogg
Normal file
BIN
sound/effects/radio_common.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user