diff --git a/code/modules/mob/mob_say.dm b/code/modules/mob/mob_say.dm index dd44363101f9..0fe2254aaece 100644 --- a/code/modules/mob/mob_say.dm +++ b/code/modules/mob/mob_say.dm @@ -12,9 +12,13 @@ //queue this message because verbs are scheduled to process after SendMaps in the tick and speech is pretty expensive when it happens. //by queuing this for next tick the mc can compensate for its cost instead of having speech delay the start of the next tick - message = fix_brainrot(message, TRUE) - if(message && proverka_na_detey(message, src)) + + if(message) + if(stat != DEAD) + if(GLOB.ic_autocorrect[message]) + message = "*[GLOB.ic_autocorrect[message]]" + check_for_brainrot(message, src) SSspeech_controller.queue_say_for_mob(src, message, SPEECH_CONTROLLER_QUEUE_SAY_VERB) ///Whisper verb @@ -27,8 +31,10 @@ to_chat(usr, span_danger("Не могу шептать.")) return - message = fix_brainrot(message) - if(message && proverka_na_detey(message, src)) + //if(GLOB.ic_autocorrect[message]) // Не работает >> шепчет, "*laugh" + // message = "*[GLOB.ic_autocorrect[message]]" + if(message) + check_for_brainrot(message, src) SSspeech_controller.queue_say_for_mob(src, message, SPEECH_CONTROLLER_QUEUE_WHISPER_VERB) ///whisper a message @@ -48,8 +54,9 @@ var/ckeyname = "[usr.ckey]/[usr.name]" webhook_send_me(ckeyname, message) - message = fix_brainrot(message) - if(proverka_na_detey(message, src)) + + if(message) + check_for_brainrot(message, src) SSspeech_controller.queue_say_for_mob(src, message, SPEECH_CONTROLLER_QUEUE_EMOTE_VERB) ///Speak as a dead person (ghost etc) diff --git a/white/hule/wordlist.dm b/white/hule/wordlist.dm index ae5ea4004ffe..18d8a4fef3ca 100644 --- a/white/hule/wordlist.dm +++ b/white/hule/wordlist.dm @@ -4,10 +4,11 @@ GLOBAL_LIST_INIT(exc_start, world.file2list("cfg/autoeban/exc_start.fackuobema") GLOBAL_LIST_INIT(exc_end, world.file2list("cfg/autoeban/exc_end.fackuobema")) GLOBAL_LIST_INIT(exc_full, world.file2list("cfg/autoeban/exc_full.fackuobema")) -/proc/proverka_na_detey(var/msg, var/mob/target) +/proc/check_for_brainrot(var/msg, var/mob/target) if(!target.client) - return TRUE + return msg = lowertext(msg) + for(var/bad_word in GLOB.bad_words) bad_word = lowertext(bad_word) if(findtext_char(msg, bad_word) && isliving(target) && bad_word != "") @@ -16,37 +17,31 @@ GLOBAL_LIST_INIT(exc_full, world.file2list("cfg/autoeban/exc_full.fackuobema")) if(bad_word in GLOB.exc_start) for(var/word in words) if(findtext_char(word, "[bad_word]") < findtext_char(word, regex("^[bad_word]"))) - return TRUE + return if(bad_word in GLOB.exc_end) for(var/word in words) if(findtext_char(word, "[bad_word]") > findtext_char(word, regex("^[bad_word]"))) - return TRUE + return if(bad_word in GLOB.exc_full) for(var/word in words) if(findtext_char(word, bad_word) && (word != bad_word)) - return TRUE + return target.client.bad_word_counter += 1 message_admins("[ADMIN_LOOKUPFLW(target)], возможно, насрал на ИЦ словом \"[bad_word]\". Это его [target.client.bad_word_counter]-й раз.
([strip_html(msg)]) [ADMIN_SMITE(target)] [target.client.bad_word_counter > 1 ? "Возможно, он заслужил смайт." : ""]") - return FALSE - return TRUE + return + return /client var/bad_word_counter = 0 - -/proc/fix_brainrot(var/word, make_into_emote = FALSE) - var/static/list/simple = list( ")" = "smile", "(" = "frown", \ - "))" = "laugh", "((" = "cry", \ - "лол" = "laugh", "lol" = "laugh", \ - "лмао" = "laugh", "lmao" = "laugh", \ - "рофл" = "laugh", "rofl" = "laugh", \ - "кек" = "giggle", "kek" = "giggle", \ - "хз" = "shrug", "hz" = "shrug") - - . = word - if(simple[word]) - return "[make_into_emote ? "*" : ""][simple[word]]" +GLOBAL_LIST_INIT(ic_autocorrect, list( ")" = "smile", "(" = "frown", \ + "))" = "laugh", "((" = "cry", \ + "лол" = "laugh", "lol" = "laugh", \ + "лмао" = "laugh", "lmao" = "laugh", \ + "рофл" = "laugh", "rofl" = "laugh", \ + "кек" = "giggle", "kek" = "giggle", \ + "хз" = "shrug", "hz" = "shrug"))