mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 00:55:20 +01:00
Randomize tts voice more appropriately (#95272)
## About The Pull Request Adds a helper `SStts.random_tts_voice(gender)` which attempts to pick an appropriate voice for the passed gender ## Why It's Good For The Game Randomization into a completely wrong voice kinda ruins it ## Changelog 🆑 Melbert qol: TTS voice is more appropriately randomized to gender qol: Getting randomized through means such as mulligan toxin randomizes TTS voices /🆑 --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "tts_voice"
|
||||
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
|
||||
priority = PREFERENCE_PRIORITY_BODY_TYPE
|
||||
should_update_preview = FALSE
|
||||
|
||||
/datum/preference/choiced/voice/is_accessible(datum/preferences/preferences)
|
||||
@@ -23,7 +24,7 @@
|
||||
|
||||
/datum/preference/choiced/voice/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(SStts.tts_enabled && !(value in SStts.available_speakers))
|
||||
value = pick(SStts.available_speakers) // As a failsafe
|
||||
value = SStts.random_tts_voice(target.gender) // As a failsafe
|
||||
target.voice = value
|
||||
|
||||
/datum/preference/numeric/tts_voice_pitch
|
||||
|
||||
Reference in New Issue
Block a user