Skip to content

Commit

Permalink
autohiss cyrillic (#136)
Browse files Browse the repository at this point in the history
## About The Pull Request
Модульная поддержка автохиса

## Changelog
:cl:
add: Добавлен автохисс для мух и ящуров
/:cl:
  • Loading branch information
larentoun authored Apr 19, 2024
1 parent e59aa90 commit a1859ba
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modular_bandastation/autohiss/_autohiss.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/autohiss
name = "Обновленный Autohiss"
desc = "Замена авто-шипения и подобного в речи"
author = "furior"
3 changes: 3 additions & 0 deletions modular_bandastation/autohiss/_autohiss.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_autohiss.dm"

#include "code/autohiss.dm"
41 changes: 41 additions & 0 deletions modular_bandastation/autohiss/code/autohiss.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// TODO: Prefs for autohiss?

/obj/item/organ/internal/tongue/rat/modify_speech(datum/source, list/speech_args)
. = ..()
var/message = lowertext(speech_args[SPEECH_MESSAGE])
if(message == "привет" || message == "привет.")
speech_args[SPEECH_MESSAGE] = "Сыррретствую вас!"
if(message == "привет?")
speech_args[SPEECH_MESSAGE] = "Мм... сыррретствую вас?"

/obj/item/organ/internal/tongue/fly/modify_speech(datum/source, list/speech_args)
. = ..()
var/static/regex/fly_buzz = new("з+", "g")
var/static/regex/fly_buZZ = new("З+", "g")
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")
message = fly_buzz.Replace(message, "ззз")
message = fly_buZZ.Replace(message, "ЗЗЗ")
message = replacetext(message, "с", "з")
message = replacetext(message, "С", "З")
speech_args[SPEECH_MESSAGE] = message

/obj/item/organ/internal/tongue/lizard/modify_speech(datum/source, list/speech_args)
. = ..()
var/static/regex/lizard_hiss = new("с+", "g")
var/static/regex/lizard_hiSS = new("С+", "g")
var/static/regex/lizard_che = new("ч+", "g")
var/static/regex/lizard_cHE = new("Ч+", "g")
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")
message = lizard_hiss.Replace(message, "ссс")
message = lizard_hiSS.Replace(message, "ССС")
message = lizard_che.Replace(message, "щ")
message = lizard_cHE.Replace(message, "Щ")
speech_args[SPEECH_MESSAGE] = message

/* TODO: Do these someday later
/obj/item/organ/internal/tongue/zombie/modify_speech(datum/source, list/speech_args)
/obj/item/organ/internal/tongue/snail/modify_speech(datum/source, list/speech_args)
*/
1 change: 1 addition & 0 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "_singletons/_singletons.dme"
#include "aesthetics/_aesthetics.dme"
#include "ai_laws/_ai_laws.dme"
#include "autohiss/_autohiss.dme"
#include "barsigns/_barsigns.dme"
#include "communication/_communication.dme"
//#include "crawl_speed/_crawl_speed.dme" // Fixing floored melee brawl, or first steps to remove RP speed
Expand Down

0 comments on commit a1859ba

Please sign in to comment.