Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/datums/mutations/speech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
message = replacetext(message,"a",pick("å","ä","a"))
message = replacetext(message,"bo","bjo")
message = replacetext(message,"o",pick("ö","o"))
message = replacetext(message, regex(@"([^\w]?)the (([^\W]|å|ä|ö)*)", "gmi"), pick("$1$2en", "$1$2et"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The å|ä|ö is disgusting, but byond doesn't support matching against full unicode (even on 513), so it interprets them as "non-word characters", hence the need for me to check explicitly.

The check at the start of the regex is to make sure we don't fuck up [word-ending-with-the] [word].

if(prob(30))
message += " Bork[pick("",", bork",", bork, bork")]!"
speech_args[SPEECH_MESSAGE] = trim(message)
Expand Down