Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions code/controllers/subsystem/tts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,17 @@ SUBSYSTEM_DEF(tts)
return request.is_complete() && request_blips.is_complete()

#undef SHIFT_DATA_ARRAY


// MASSMETA ADD BEGIN
/// Helper to get a random TTS voice for a vendor
/datum/controller/subsystem/tts/proc/radnom_vendor_voice()
if(!tts_enabled)
return null

for (var/voice in available_speakers)
if (findtext(voice, "Vendor"))
return voice
CRASH("Cant find voice for vendor! At least one voice must me for vendors")
return pick(available_speakers)
// MASSMETA ADD END
3 changes: 2 additions & 1 deletion code/modules/vending/vendor/_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@
if(SStts.tts_enabled)
var/static/vendor_voice_by_type = list()
if(!vendor_voice_by_type[type])
vendor_voice_by_type[type] = pick(SStts.available_speakers)
vendor_voice_by_type[type] = SStts.radnom_vendor_voice() // //MASSMETA ADD START (vendor one voice) Original: vendor_voice_by_type[type] = pick(SStts.available_speakers)

voice = vendor_voice_by_type[type]

slogan_list = splittext(product_slogans, ";")
Expand Down
Loading