Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: tts change for synths, cling, ert #246

Merged
merged 5 commits into from
Sep 26, 2023
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
1 change: 1 addition & 0 deletions modular_ss220/text_to_speech/_tts.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "code/numbers.dm"
#include "code/providers/silero.dm"
#include "code/rust_g_ss220.dm"
#include "code/seeds/base.dm"
#include "code/seeds/silero.dm"
#include "code/sound.dm"
#include "code/tts_preferences.dm"
Expand Down
10 changes: 10 additions & 0 deletions modular_ss220/text_to_speech/code/seeds/base.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/datum/tts_seed
var/name = "STUB"
var/value = "STUB"
var/category = TTS_CATEGORY_OTHER
var/gender = TTS_GENDER_ANY
var/datum/tts_provider/provider = /datum/tts_provider
var/required_donator_level = 0

/datum/tts_seed/vv_edit_var(var_name, var_value)
return FALSE
36 changes: 19 additions & 17 deletions modular_ss220/text_to_speech/code/tts_seed.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/atom
var/tts_seed

// SS220 TODO: usage of tts in dna
/datum/dna
var/tts_seed_dna

Expand All @@ -11,18 +10,13 @@
new_dna.tts_seed_dna = tts_seed_dna
return new_dna

/mob/living/carbon/human/Initialize(mapload, datum/species/new_species)
. = ..()
if(dna)
dna.tts_seed_dna = tts_seed

/atom/proc/select_voice(mob/user, silent_target = FALSE, override = FALSE)
if(!ismob(src) && !user)
return null
var/tts_test_str = "Так звучит мой голос."
var/static/tts_test_str = "Так звучит мой голос."

var/tts_seeds
if(user && (check_rights(R_ADMIN, 0, user) || override))
if(user && (check_rights(R_ADMIN, FALSE, user) || override))
tts_seeds = SStts220.tts_seeds_names
else
tts_seeds = SStts220.get_available_seeds(src)
Expand All @@ -47,14 +41,22 @@
tts_seed = new_tts_seed
return new_tts_seed

/datum/tts_seed
var/name = "STUB"
var/value = "STUB"
var/category = TTS_CATEGORY_OTHER
var/gender = TTS_GENDER_ANY
var/datum/tts_provider/provider = /datum/tts_provider
var/required_donator_level = 0
/mob/living/carbon/human/Initialize(mapload, datum/species/new_species)
. = ..()
if(dna)
dna.tts_seed_dna = tts_seed

/datum/tts_seed/vv_edit_var(var_name, var_value)
return FALSE
/mob/living/carbon/human/change_dna(datum/dna/new_dna, include_species_change, keep_flavor_text)
. = ..()
tts_seed = dna.tts_seed_dna

/client/create_response_team_part_1(new_gender, new_species, role, turf/spawn_location)
. = ..()
var/mob/living/ert_member = .
ert_member.change_voice(src.mob)

/mob/living/silicon/verb/synth_change_voice()
set name = "Change Voice"
set desc = "Express yourself!"
set category = "Subsystems"
change_voice()