mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Soundloop runtime (#7959)
This commit is contained in:
@@ -59,6 +59,8 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/looping_sound/proc/start(atom/add_thing, skip_start_sound = FALSE)
|
/datum/looping_sound/proc/start(atom/add_thing, skip_start_sound = FALSE)
|
||||||
|
if(QDELETED(src)) //Chomp runtime
|
||||||
|
return //Chomp runtime
|
||||||
if(add_thing)
|
if(add_thing)
|
||||||
output_atoms |= add_thing
|
output_atoms |= add_thing
|
||||||
if(timerid)
|
if(timerid)
|
||||||
@@ -84,7 +86,7 @@
|
|||||||
started = FALSE
|
started = FALSE
|
||||||
|
|
||||||
/datum/looping_sound/proc/sound_loop(starttime)
|
/datum/looping_sound/proc/sound_loop(starttime)
|
||||||
if(max_loops && world.time >= starttime + mid_length * max_loops)
|
if(QDELETED(src) || (max_loops && world.time >= starttime + mid_length * max_loops)) //ChompEDIT - runtime
|
||||||
stop()
|
stop()
|
||||||
return
|
return
|
||||||
if(!chance || prob(chance))
|
if(!chance || prob(chance))
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
if(direct)
|
if(direct)
|
||||||
S.channel = SSsounds.random_available_channel()
|
S.channel = SSsounds.random_available_channel()
|
||||||
S.volume = volume
|
S.volume = volume
|
||||||
for(var/i in 1 to atoms_cache.len)
|
for(var/i in 1 to atoms_cache?.len) //Chomp - runtime
|
||||||
var/atom/thing = atoms_cache[i]
|
var/atom/thing = atoms_cache[i]
|
||||||
if(direct)
|
if(direct)
|
||||||
if(ismob(thing))
|
if(ismob(thing))
|
||||||
|
|||||||
Reference in New Issue
Block a user