rustg updates& makes shit work

This commit is contained in:
Letter N
2020-12-21 21:06:45 +08:00
parent 98ff0a080e
commit 2966f985a3
12 changed files with 142 additions and 38 deletions

View File

@@ -94,9 +94,7 @@ SUBSYSTEM_DEF(jukeboxes)
stack_trace("Nonexistant or invalid object associated with jukebox.")
continue
var/sound/song_played = sound(juketrack.song_path)
var/area/currentarea = get_area(jukebox)
var/turf/currentturf = get_turf(jukebox)
var/list/hearerscache = hearers(7, jukebox)
song_played.falloff = jukeinfo[4]
@@ -107,13 +105,8 @@ SUBSYSTEM_DEF(jukeboxes)
M.stop_sound_channel(jukeinfo[2])
continue
var/inrange = FALSE
if(jukebox.z == M.z) //todo - expand this to work with mining planet z-levels when robust jukebox audio gets merged to master
song_played.status = SOUND_UPDATE
if(get_area(M) == currentarea)
inrange = TRUE
else if(M in hearerscache)
inrange = TRUE
else
song_played.status = SOUND_MUTE | SOUND_UPDATE //Setting volume = 0 doesn't let the sound properties update at all, which is lame.
M.playsound_local(currentturf, null, 100, channel = jukeinfo[2], S = song_played, use_reverb = FALSE)