Adds headset radio sounds

This commit is contained in:
Cerebulon
2021-08-23 19:58:43 +01:00
parent 17cbd9e7fb
commit bfdbd5b1fa
4 changed files with 24 additions and 3 deletions
@@ -16,7 +16,7 @@
var/obj/item/device/encryptionkey/keyslot2 = null
var/ks1type = null
var/ks2type = null
drop_sound = 'sound/items/drop/component.ogg'
pickup_sound = 'sound/items/pickup/component.ogg'
@@ -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