Skip to content

Commit

Permalink
speech mod
Browse files Browse the repository at this point in the history
  • Loading branch information
larentoun committed Oct 30, 2024
1 parent 61eea34 commit e078f41
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 33 deletions.
6 changes: 6 additions & 0 deletions code/game/machinery/dna_infuser/organ_sets/fly_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
new /regex("Z+", "g") = "ZZZ",
"s" = "z",
"S" = "Z",
// BANDASTATION EDIT START - speech mod
new /regex("з+", "g") = "ззз",
new /regex("З+", "g") = "ЗЗЗ",
"с" = "з",
"С" = "З",
// BANDASTATION END
)

/obj/item/organ/tongue/fly/New(class, timer, datum/mutation/human/copymut)
Expand Down
6 changes: 6 additions & 0 deletions code/modules/surgery/organs/internal/tongue/_tongue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@
new /regex(@"(\w)X", "g") = "$1KSSS",
new /regex(@"\bx([\-|r|R]|\b)", "g") = "ecks$1",
new /regex(@"\bX([\-|r|R]|\b)", "g") = "ECKS$1",
// BANDASTATION EDIT START - speech mod
new /regex("с+", "g") = "ссс",
new /regex("C+", "g") = "ССС",
new /regex("ч+", "g") = "щ",
new /regex("Ч+", "g") = "Щ",
// BANDASTATION END
)

/obj/item/organ/tongue/lizard/New(class, timer, datum/mutation/human/copymut)
Expand Down
34 changes: 1 addition & 33 deletions modular_bandastation/autohiss/code/autohiss.dm
Original file line number Diff line number Diff line change
@@ -1,41 +1,9 @@
// TODO: Prefs for autohiss?

/obj/item/organ/internal/tongue/rat/modify_speech(datum/source, list/speech_args)
/obj/item/organ/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)
*/

0 comments on commit e078f41

Please sign in to comment.