From 0682b94b7b0cc7fdd3ae2a68e50445dc3cbb4601 Mon Sep 17 00:00:00 2001 From: Furior Date: Tue, 26 Sep 2023 18:52:27 +0700 Subject: [PATCH 1/5] tts change for synths, cling, ert --- modular_ss220/text_to_speech/code/tts_seed.dm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modular_ss220/text_to_speech/code/tts_seed.dm b/modular_ss220/text_to_speech/code/tts_seed.dm index 11f20282d3b5..5a87b4768600 100644 --- a/modular_ss220/text_to_speech/code/tts_seed.dm +++ b/modular_ss220/text_to_speech/code/tts_seed.dm @@ -16,13 +16,28 @@ if(dna) dna.tts_seed_dna = tts_seed +/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() + +/mob/living/silicon/verb/synth_change_voice() + set name = "Change Voice" + set desc = "Express yourself!" + set category = "Subsystems" + change_voice() + /atom/proc/select_voice(mob/user, silent_target = FALSE, override = FALSE) if(!ismob(src) && !user) return null var/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) From 42180480589d9cd2eae17c91da5e28edba712517 Mon Sep 17 00:00:00 2001 From: Furior Date: Tue, 26 Sep 2023 19:35:06 +0700 Subject: [PATCH 2/5] fix --- modular_ss220/text_to_speech/code/tts_seed.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modular_ss220/text_to_speech/code/tts_seed.dm b/modular_ss220/text_to_speech/code/tts_seed.dm index 5a87b4768600..df7912ee876d 100644 --- a/modular_ss220/text_to_speech/code/tts_seed.dm +++ b/modular_ss220/text_to_speech/code/tts_seed.dm @@ -23,7 +23,7 @@ /client/create_response_team_part_1(new_gender, new_species, role, turf/spawn_location) . = ..() var/mob/living/ert_member = . - ert_member.change_voice() + ert_member.change_voice(src.mob) /mob/living/silicon/verb/synth_change_voice() set name = "Change Voice" @@ -34,7 +34,7 @@ /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, FALSE, user) || override)) From 07b74a4fcafac70586995e8b6f34f0ab4988def8 Mon Sep 17 00:00:00 2001 From: Furior Date: Tue, 26 Sep 2023 19:37:25 +0700 Subject: [PATCH 3/5] rem: todo --- modular_ss220/text_to_speech/code/tts_seed.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/modular_ss220/text_to_speech/code/tts_seed.dm b/modular_ss220/text_to_speech/code/tts_seed.dm index df7912ee876d..7d3c4f38aa36 100644 --- a/modular_ss220/text_to_speech/code/tts_seed.dm +++ b/modular_ss220/text_to_speech/code/tts_seed.dm @@ -1,7 +1,6 @@ /atom var/tts_seed -// SS220 TODO: usage of tts in dna /datum/dna var/tts_seed_dna From de3d2140727c80c12b06dbddfdfdf034daa7bdde Mon Sep 17 00:00:00 2001 From: Furior Date: Tue, 26 Sep 2023 19:39:48 +0700 Subject: [PATCH 4/5] Some code moves --- modular_ss220/text_to_speech/code/tts_seed.dm | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/modular_ss220/text_to_speech/code/tts_seed.dm b/modular_ss220/text_to_speech/code/tts_seed.dm index 7d3c4f38aa36..4f8ebe27522f 100644 --- a/modular_ss220/text_to_speech/code/tts_seed.dm +++ b/modular_ss220/text_to_speech/code/tts_seed.dm @@ -1,3 +1,14 @@ +/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 + /atom var/tts_seed @@ -10,26 +21,6 @@ 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 - -/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() - /atom/proc/select_voice(mob/user, silent_target = FALSE, override = FALSE) if(!ismob(src) && !user) return null @@ -61,14 +52,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() From 3f945bf77d22d07c888db90ba16a500b81d80ea4 Mon Sep 17 00:00:00 2001 From: Furior Date: Tue, 26 Sep 2023 19:44:33 +0700 Subject: [PATCH 5/5] more code moves --- modular_ss220/text_to_speech/_tts.dme | 1 + modular_ss220/text_to_speech/code/seeds/base.dm | 10 ++++++++++ modular_ss220/text_to_speech/code/tts_seed.dm | 11 ----------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 modular_ss220/text_to_speech/code/seeds/base.dm diff --git a/modular_ss220/text_to_speech/_tts.dme b/modular_ss220/text_to_speech/_tts.dme index 602fdfd9829c..4facec666490 100644 --- a/modular_ss220/text_to_speech/_tts.dme +++ b/modular_ss220/text_to_speech/_tts.dme @@ -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" diff --git a/modular_ss220/text_to_speech/code/seeds/base.dm b/modular_ss220/text_to_speech/code/seeds/base.dm new file mode 100644 index 000000000000..6c415c67128c --- /dev/null +++ b/modular_ss220/text_to_speech/code/seeds/base.dm @@ -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 diff --git a/modular_ss220/text_to_speech/code/tts_seed.dm b/modular_ss220/text_to_speech/code/tts_seed.dm index 4f8ebe27522f..9118207d2776 100644 --- a/modular_ss220/text_to_speech/code/tts_seed.dm +++ b/modular_ss220/text_to_speech/code/tts_seed.dm @@ -1,14 +1,3 @@ -/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 - /atom var/tts_seed