diff --git a/modular_ss220/text_to_speech/code/rust_g_ss220.dm b/modular_ss220/text_to_speech/code/rust_g_ss220.dm index dffceaafc9bd..d1b12a05957a 100644 --- a/modular_ss220/text_to_speech/code/rust_g_ss220.dm +++ b/modular_ss220/text_to_speech/code/rust_g_ss220.dm @@ -39,19 +39,10 @@ #endif /// Gets the version of rust_g -/proc/rustgss220_get_version() return RUSTG_CALL(RUST_G_SS220, "get_version")() +/proc/rustg_ss220_get_version() return RUSTG_CALL(RUST_G_SS220, "get_version")() -#define rustgss220_file_write_b64decode(text, fname) RUSTG_CALL(RUST_G_SS220, "file_write")(text, fname, "true") - -// Hashing Operations // -#define rustgss220_hash_string(algorithm, text) RUSTG_CALL(RUST_G_SS220, "hash_string")(algorithm, text) -#define rustgss220_hash_file(algorithm, fname) RUSTG_CALL(RUST_G_SS220, "hash_file")(algorithm, fname) - - -#ifdef RUSTG_OVERRIDE_BUILTINS - #define md5(thing) (isfile(thing) ? rustgss220_hash_file(RUSTG_HASH_MD5, "[thing]") : rustgss220_hash_string(RUSTG_HASH_MD5, thing)) -#endif +#define rustg_ss220_file_write_b64decode(text, fname) RUSTG_CALL(RUST_G_SS220, "file_write")(text, fname, "true") // Text Operations // -#define rustgss220_cyrillic_to_latin(text) RUSTG_CALL(RUST_G_SS220, "cyrillic_to_latin")("[text]") -#define rustgss220_latin_to_cyrillic(text) RUSTG_CALL(RUST_G_SS220, "latin_to_cyrillic")("[text]") +#define rustg_ss220_cyrillic_to_latin(text) RUSTG_CALL(RUST_G_SS220, "cyrillic_to_latin")("[text]") +#define rustg_ss220_latin_to_cyrillic(text) RUSTG_CALL(RUST_G_SS220, "latin_to_cyrillic")("[text]") diff --git a/modular_ss220/text_to_speech/code/tts_subsystem.dm b/modular_ss220/text_to_speech/code/tts_subsystem.dm index 462b19c1baa1..fef9fa06ff12 100644 --- a/modular_ss220/text_to_speech/code/tts_subsystem.dm +++ b/modular_ss220/text_to_speech/code/tts_subsystem.dm @@ -279,7 +279,7 @@ SUBSYSTEM_DEF(tts220) if(traits & TTS_TRAIT_PITCH_WHISPER) text = provider.pitch_whisper(text) - var/hash = rustgss220_hash_string(RUSTG_HASH_MD5, text) + var/hash = rustg_hash_string(RUSTG_HASH_MD5, text) var/filename = "data/tts_cache/[seed.name]/[hash]" var/datum/callback/play_tts_cb = CALLBACK(src, PROC_REF(play_tts), speaker, listener, filename, is_local, effect, preSFX, postSFX) @@ -330,7 +330,7 @@ SUBSYSTEM_DEF(tts220) if(!voice) return - rustgss220_file_write_b64decode(voice, "[filename].ogg") + rustg_ss220_file_write_b64decode(voice, "[filename].ogg") if (!GLOB.configuration.tts.tts_cache_enabled) addtimer(CALLBACK(src, PROC_REF(cleanup_tts_file), "[filename].ogg"), 30 SECONDS) @@ -458,7 +458,7 @@ SUBSYSTEM_DEF(tts220) /datum/controller/subsystem/tts220/proc/sanitize_tts_input(message) var/hash if(sanitized_messages_caching) - hash = rustgss220_hash_string(RUSTG_HASH_MD5, message) + hash = rustg_hash_string(RUSTG_HASH_MD5, message) if(sanitized_messages_cache[hash]) sanitized_messages_cache_hit++ return sanitized_messages_cache[hash] @@ -481,7 +481,7 @@ SUBSYSTEM_DEF(tts220) . = replacetext(., words, /proc/tts_word_replacer) for(var/job in tts_job_replacements) . = replacetext(., regex(job, "igm"), tts_job_replacements[job]) - . = rustgss220_latin_to_cyrillic(.) + . = rustg_ss220_latin_to_cyrillic(.) var/static/regex/decimals = new(@"-?\d+\.\d+", "g") . = replacetext(., decimals, /proc/dec_in_words) diff --git a/modular_ss220/text_to_speech/code/~undefs/~undefs.dm b/modular_ss220/text_to_speech/code/~undefs/~undefs.dm index d7e24fab195b..36820ba42c79 100644 --- a/modular_ss220/text_to_speech/code/~undefs/~undefs.dm +++ b/modular_ss220/text_to_speech/code/~undefs/~undefs.dm @@ -11,19 +11,11 @@ #undef TTS_TRAIT_RATE_FASTER #undef TTS_TRAIT_RATE_MEDIUM -#undef rustgss220_file_write_b64decode - -#undef rustgss220_hash_string -#undef rustgss220_hash_file - - -#ifdef RUSTG_OVERRIDE_BUILTINS - #undef md5 -#endif +#undef rustg_ss220_file_write_b64decode // Text Operations // -#undef rustgss220_cyrillic_to_latin -#undef rustgss220_latin_to_cyrillic +#undef rustg_ss220_cyrillic_to_latin +#undef rustg_ss220_latin_to_cyrillic #undef TTS_CATEGORY_OTHER #undef TTS_CATEGORY_WARCRAFT3