Radio headset sounds (#32402)

* Radio headset sounds

* SQL stuff

* wtf

* typo

* fixed db

Co-authored-by: Damian <damian@autistici.org>
This commit is contained in:
west3436
2022-04-30 21:41:57 -04:00
committed by GitHub
parent 3e6c674398
commit c48c54ea64
8 changed files with 47 additions and 4 deletions

View File

@@ -34,12 +34,16 @@
/obj/item/device/radio/headset/talk_into(datum/speech/speech_orig, channel=null)
if(!broadcasting)
return
if(usr.client && usr.client.prefs.headset_sound)
playsound(usr, 'sound/effects/radio_chatter.ogg', 100, 1, vary = 0)
return ..()
/obj/item/device/radio/headset/receive_range(freq, level)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(H.ears == src)
if(H.client && (H.client.prefs.headset_sound == HEADSET_SOUND_ALL))
playsound(H, 'sound/effects/radio_chatter.ogg', 100, 1, vary = 0)
return ..(freq, level)
return -1