mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
adds a playsoundtoken proc that allows one-shot sound tokens playing, and adds support for it to emotes. (#96519)
This commit is contained in:
@@ -219,3 +219,12 @@
|
||||
return soundin
|
||||
var/datum/sound_effect/sfx = GLOB.sfx_datum_by_key[soundin]
|
||||
return sfx?.return_sfx() || soundin
|
||||
|
||||
|
||||
/**
|
||||
* Creates a soundtoken datum (a sound that updates for movement).
|
||||
* allowed_listeners is an optional list of mobs that are the only ones that can hear this sound ever.
|
||||
* sound_length is an optional length of the sound. Things like TTS need to pass this since we can't dynamically grab the length in that case.
|
||||
*/
|
||||
/proc/playsoundtoken(atom/source, soundin, volume, range, falloff_exponent = SOUND_FALLOFF_EXPONENT, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, allowed_listeners, sound_length)
|
||||
return new /datum/sound_token(source, soundin, range, volume, falloff_exponent, falloff_distance, allowed_listeners, sound_length, _delete_on_end = TRUE)
|
||||
|
||||
Reference in New Issue
Block a user