Finish porting bay's timer SS (#12978)

This commit is contained in:
Matt Atlas
2022-01-29 13:07:51 -03:00
committed by GitHub
parent edb1c08178
commit 2842f4e39f
18 changed files with 381 additions and 303 deletions
+2 -2
View File
@@ -68,7 +68,7 @@
if(!chance || prob(chance))
play(get_sound(starttime))
if(!timerid)
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_LOOP)
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_STOPPABLE | TIMER_LOOP)
/datum/looping_sound/proc/play(soundfile)
var/list/atoms_cache = output_atoms
@@ -93,7 +93,7 @@
if(start_sound)
play(start_sound)
start_wait = start_length
addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME)
addtimer(CALLBACK(src, .proc/sound_loop), start_wait)
/datum/looping_sound/proc/on_stop()
if(end_sound)