Skip to content

Commit

Permalink
tts any
Browse files Browse the repository at this point in the history
  • Loading branch information
larentoun committed Apr 20, 2024
1 parent 0fde9e4 commit 4ccc8d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modular_ss220/text_to_speech/code/tts_component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
var/tts_seeds
var/tts_gender = get_converted_tts_seed_gender()
var/list/tts_seeds_by_gender = SStts220.tts_seeds_by_gender[tts_gender]
tts_seeds_by_gender |= SStts220.tts_seeds_by_gender[TTS_GENDER_ANY]
if(check_rights(R_VAREDIT, FALSE, chooser) || override || !ismob(being_changed))
tts_seeds = tts_seeds_by_gender
else
Expand Down Expand Up @@ -97,7 +98,9 @@

/datum/component/tts_component/proc/get_random_tts_seed_by_gender()
var/tts_gender = get_converted_tts_seed_gender()
var/tts_random = pick(SStts220.tts_seeds_by_gender[tts_gender])
var/list/tts_seeds = SStts220.tts_seeds_by_gender[tts_gender]
tts_seeds |= SStts220.tts_seeds_by_gender[TTS_GENDER_ANY]
var/tts_random = pick(tts_seeds)
var/datum/tts_seed/seed = SStts220.tts_seeds[tts_random]
if(!seed)
return null
Expand Down

0 comments on commit 4ccc8d7

Please sign in to comment.