-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes the the majority of "The the" in chat messages (Part 1) (#5087)
*(Part 1/3 because there's about 100 files in total and it's easier to review if they're split up.)* # About the pull request Fixes instances of `"The the item"` and `"A the item"` in chat messages so that they display as `"The item"` and `"A item"` instead. These were caused by DM's built-in [Text Macros](https://www.byond.com/docs/ref/#/DM/text/macros) system either being used incorrectly, or used unintentionally. <details> <summary><b>DM outputs for various inputs:</b></summary> <hr> ``` /obj/improper_noun name = "test object" var/obj/improper_noun/T = new() "The [T] is formatted" // Outputs as "The the test object is formatted" "The [T.name] is formatted" // Outputs as "The test object is formatted" "\The [T] is formatted" // Outputs as "The test object is formatted" "\The [T.name] is formatted" // Outputs as "The test object is formatted" "A [T] is formatted" // Outputs as "A the test object is formatted" "A [T.name] is formatted" // Outputs as "A test object is formatted" "\A [T] is formatted" // Outputs as "A test object is formatted" "\A [T.name] is formatted" // Outputs as "A test object is formatted" /obj/proper_noun name = "Test Object" var/obj/proper_noun/T = new() "The [T] is formatted" // Outputs as "The Test Object is formatted" "The [T.name] is formatted" // Outputs as "The Test Object is formatted" "\The [T] is formatted" // Outputs as "Test Object is formatted" "\The [T.name] is formatted" // Outputs as "Test Object is formatted" "A [T] is formatted" // Outputs as "A Test Object is formatted" "A [T.name] is formatted" // Outputs as "A Test Object is formatted" "\A [T] is formatted" // Outputs as "Test Object is formatted" "\A [T.name] is formatted" // Outputs as "Test Object is formatted" ``` (Code validation [here](https://discord.com/channels/484170914754330625/487268744419344384/1179950399483027536) in Coderbus) <hr> </details> I've tried to avoid touching anything that already works properly in-game in order to keep the PR size down, even if the manner in which it's working isn't the "correct" way (things like improper nouns being capitalised and vice versa). I did edit the names of some items in `chem_grenade.dm` though, since they needed to be changed for the `/obj/item/explosive/proc/toggle_blast_dampener()` proc to display its message properly. <hr> **RegEx used:** `^(?!.*(?:\/{2,}|\/\*|\* )).*?[^\\](?:the|a) \[.+\]` (https://regexr.com/7o5vd) (For search only. All replacements were done manually and I skipped a lot of false positives.) <details> <summary><b>Bad regex explanation:</b></summary> ``` ^ == Beginning of the line. (?! == Negative lookahead START (If this group matches anything further in the line, discard this result.) .* == 0 or more characters. (e.g. indentation) (?: == Non-capturing group START (Capturing vs non-capturing actually makes no difference here since nothing's being replaced) \/{2,} == 2 or more forward slash '/' characters ('//' or '///' at the start of the line is a comment) | == OR \/\* == One forward slash and an asterisk. (Block comment start) | == OR \* == A single asterisk followed by a space. (Middle of a block comment) ) == Non-capturing group END ) == Negative lookahead END .*? == 0 or more characters with a 'lazy' quantifier so that it matches as few as possible. [^\\] == Negated character set containing a backslash. (Match any character that is not a '\'. (This filters out "\the [item]" results)) (?: == Non-capturing group START the|a == Match 'the' or 'a'. (As in "the [item]"/ "a [item]") ) == Non-capturing group END \[.+\] == Match opening and closing square brackets with 1 or more characters inside them. ``` </details> # Explain why it's good for the game "Typo" fixes. # Testing Photographs and Procedure <details> <summary>Screenshots</summary> *(I took these screenshots before I split the PR into smaller parts and I'm posting it pretty late at night, so some of these examples might not actually be included in this PR.) (I can take new ones later if that's requested later.)* **Before:** ![sandwich before](https://github.com/cmss13-devs/cmss13/assets/57483089/17f0f20b-4c13-40fe-a12b-58d9ff974cbf) ![pizza before](https://github.com/cmss13-devs/cmss13/assets/57483089/d00a158f-fcab-4aec-b044-f5d591b12aad) ![cigarette before](https://github.com/cmss13-devs/cmss13/assets/57483089/463a0b36-1ee9-4b3b-bf63-36326edd04c3) ![barricade before](https://github.com/cmss13-devs/cmss13/assets/57483089/92bffce0-c2f4-47c9-8358-b9c36474c787) ![magazine box before](https://github.com/cmss13-devs/cmss13/assets/57483089/c9af9b35-7d13-4c27-b063-6048818847ec) **After:** ![sandwich after](https://github.com/cmss13-devs/cmss13/assets/57483089/7655b48f-5843-4fd8-8baa-967add160752) ![pizza after](https://github.com/cmss13-devs/cmss13/assets/57483089/9bfb1388-d712-4386-beca-0c924e4f1adf) ![cigarette after](https://github.com/cmss13-devs/cmss13/assets/57483089/fd707f3e-583e-49da-97c9-9972f9013de3) ![barricade after](https://github.com/cmss13-devs/cmss13/assets/57483089/65d8d0c3-921a-41c2-a640-27f184db01d8) ![magazine box after](https://github.com/cmss13-devs/cmss13/assets/57483089/b79a8704-2674-4f68-a556-13e8cec59ab4) </details> # Changelog :cl: spellcheck: Fixed instances of "The the" and "A the" in chat messages so that they're just "The" instead. (Part 1) /:cl:
- Loading branch information
Showing
34 changed files
with
112 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.