mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 06:28:01 +01:00
POLARIS: Port's /tg/'s current sound.dm, plus pref
It's mostly the same, just a little more efficient. I added a 'preferences' var to pass a datum and decide whether or not to play the sound for that client based on some preference.
This commit is contained in:
@@ -1210,3 +1210,18 @@ default behaviour is:
|
||||
|
||||
|
||||
item.throw_at(target, throw_range, item.throw_speed, src)
|
||||
|
||||
/mob/living/get_sound_env(var/pressure_factor)
|
||||
if (hallucination)
|
||||
return PSYCHOTIC
|
||||
else if (druggy)
|
||||
return DRUGGED
|
||||
else if (drowsyness)
|
||||
return DIZZY
|
||||
else if (confused)
|
||||
return DIZZY
|
||||
else if (sleeping)
|
||||
return UNDERWATER
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -627,3 +627,11 @@ var/global/image/backplane
|
||||
backplane.mouse_opacity = 0
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/proc/get_sound_env(var/pressure_factor)
|
||||
if (pressure_factor < 0.5)
|
||||
return SPACE
|
||||
else
|
||||
var/area/A = get_area(src)
|
||||
return A.sound_env
|
||||
|
||||
Reference in New Issue
Block a user