Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Swedish speech mutation now replaces 'the [X]' with '[X]en'/'[X]et' - #8035

Merged
alexkar598 merged 3 commits into
yogstation13:masterfrom
Amelia0010:swedish
Mar 30, 2020
Merged

Swedish speech mutation now replaces 'the [X]' with '[X]en'/'[X]et'#8035
alexkar598 merged 3 commits into
yogstation13:masterfrom
Amelia0010:swedish

Conversation

@Amelia0010

Copy link
Copy Markdown
Contributor

Intent of your Pull Request

Continuing the number 1 danish pastime, bullying swedes

Changelog

🆑
tweak: Swede-speak mutation now replaces 'the [X]' with '[X]en'/'[X]et'
/:cl:

@yogstation13-bot yogstation13-bot added the Tweak This PR contains changes to the game. label Mar 27, 2020
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
Copy Markdown
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].

@alexkar598
alexkar598 merged commit 6f8259e into yogstation13:master Mar 30, 2020
@Amelia0010
Amelia0010 deleted the swedish branch March 30, 2020 17:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Tweak This PR contains changes to the game.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants