From 56321f94f584b0868295a3b16f2e7964a9f07c02 Mon Sep 17 00:00:00 2001 From: Furior <68264134+Furrior@users.noreply.github.com> Date: Mon, 16 Oct 2023 00:57:46 +0700 Subject: [PATCH] Tweak: Annoying-stuff (#433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Тут всякие мелочи, которые надо бы пофиксить, но мне все лень --- code/modules/client/preference/link_processing.dm | 2 +- code/modules/mob/new_player/new_player.dm | 6 ++++-- modular_ss220/_modpacks.dm | 3 +-- modular_ss220/discord_link/code/discord.dm | 2 +- modular_ss220/text_to_speech/code/hear.dm | 3 +-- modular_ss220/text_to_speech/code/providers/silero.dm | 2 +- modular_ss220/text_to_speech/code/tts_preferences.dm | 1 + 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index 0fc8b7cd8a13..fc89c803608a 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -1172,7 +1172,7 @@ "CLEAR" = "Center" ) - new_key = key_map[new_key] || new_key + new_key = convert_ru_key_to_en_key(key_map[new_key] || new_key) // SS220 EDIT var/full_key switch(new_key) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index bb7ed66155fc..25bc1931d9fd 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -157,7 +157,8 @@ ready = FALSE return FALSE - check_tts_seed_ready() // SS220 ADDITION + if(!check_tts_seed_ready()) // SS220 ADDITION + return FALSE ready = !ready new_player_panel_proc() @@ -231,7 +232,8 @@ to_chat(src, alert("You are currently not whitelisted to play [client.prefs.active_character.species].")) return FALSE - check_tts_seed_ready() + if(!check_tts_seed_ready()) // SS220 ADDITION + return FALSE LateChoices() diff --git a/modular_ss220/_modpacks.dm b/modular_ss220/_modpacks.dm index 4f453a4a33a8..2350349bbd21 100644 --- a/modular_ss220/_modpacks.dm +++ b/modular_ss220/_modpacks.dm @@ -8,8 +8,7 @@ SUBSYSTEM_DEF(modpacks) /datum/controller/subsystem/modpacks/Initialize() var/list/all_modpacks = list() - for(var/modpack in subtypesof(/datum/modpack/)) - all_modpacks.Add(new modpack) + init_subtypes(/datum/modpack/, all_modpacks) loaded_modpacks = list() // Pre-init and register all compiled modpacks. diff --git a/modular_ss220/discord_link/code/discord.dm b/modular_ss220/discord_link/code/discord.dm index 1c14de62a3bf..10d9bf464ff4 100644 --- a/modular_ss220/discord_link/code/discord.dm +++ b/modular_ss220/discord_link/code/discord.dm @@ -28,7 +28,7 @@ if(!SSdbcore.IsConnected()) return - var/token = md5("[world.time+rand(1000,1000000)]") + var/token = "WyccStation_" + md5("[world.time+rand(1000,1000000)]") var/datum/db_query/query_replace_token = SSdbcore.NewQuery("REPLACE INTO discord_links (ckey, timestamp, one_time_token) VALUES (:ckey, NOW(), :token)", list( "token" = token, "ckey" = ckey diff --git a/modular_ss220/text_to_speech/code/hear.dm b/modular_ss220/text_to_speech/code/hear.dm index bc248aa9fd6e..d30f1084a460 100644 --- a/modular_ss220/text_to_speech/code/hear.dm +++ b/modular_ss220/text_to_speech/code/hear.dm @@ -38,8 +38,7 @@ var/message_tts = combine_message_tts(message_pieces, speaker) var/effect = isrobot(speaker) ? SOUND_EFFECT_ROBOT : SOUND_EFFECT_NONE var/traits = TTS_TRAIT_RATE_FASTER - var/is_whisper = verb == "whispers" - if(is_whisper) + if(italics) traits |= TTS_TRAIT_PITCH_WHISPER INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(tts_cast), speaker, src, message_tts, speaker.tts_seed, TRUE, effect, traits) diff --git a/modular_ss220/text_to_speech/code/providers/silero.dm b/modular_ss220/text_to_speech/code/providers/silero.dm index 6c924b0a8ad6..9f3f2bba1772 100644 --- a/modular_ss220/text_to_speech/code/providers/silero.dm +++ b/modular_ss220/text_to_speech/code/providers/silero.dm @@ -4,9 +4,9 @@ api_url = "http://s2.ss220.club:9999/voice" /datum/tts_provider/silero/vv_edit_var(var_name, var_value) - . = ..() if(var_name == "api_url") return FALSE + return ..() /datum/tts_provider/silero/request(text, datum/tts_seed/silero/seed, datum/callback/proc_callback) if(throttle_check()) diff --git a/modular_ss220/text_to_speech/code/tts_preferences.dm b/modular_ss220/text_to_speech/code/tts_preferences.dm index b5533eebcf04..dba00ddaabe8 100644 --- a/modular_ss220/text_to_speech/code/tts_preferences.dm +++ b/modular_ss220/text_to_speech/code/tts_preferences.dm @@ -105,3 +105,4 @@ to_chat(usr, span_danger("Выбранный голос персонажа более недоступен на текущем уровне подписки!")) client.prefs.ShowChoices(src) return FALSE + return TRUE