Add preference for variable pitch emotes

This commit is contained in:
TheGreatKitsune
2022-06-05 22:44:12 -05:00
parent b0b0ec8bc4
commit 00fa8ea63e
4 changed files with 28 additions and 1 deletions

View File

@@ -187,7 +187,13 @@ var/global/list/emotes_by_key
if(islist(sound_to_play) && length(sound_to_play))
sound_to_play = pick(sound_to_play)
if(sound_to_play)
playsound(user.loc, sound_to_play, use_sound["vol"], sound_vary, frequency = null, preference = sound_preferences) //VOREStation Add - Preference
//CHOMPEdit Add - Preference for variable pitch
if(istype(user, /mob))
var/mob/u = user
playsound(user.loc, sound_to_play, use_sound["vol"], u.is_preference_enabled(/datum/client_preference/random_emote_pitch) && sound_vary, frequency = null, preference = sound_preferences)
else
playsound(user.loc, sound_to_play, use_sound["vol"], sound_vary, frequency = null, preference = sound_preferences) //VOREStation Add - Preference
//CHOMPEdit End - Previous line used to be outside an if/else before the edit.
/decl/emote/proc/mob_can_use(var/mob/user)
return istype(user) && user.stat != DEAD && (type in user.get_available_emotes())