forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detective hat improvements regex, for real this time. (tgstation#83033)
Fun fact: This PR has been made a total of three (3) times because I keep forgetting about it. ## About The Pull Request The inspector's Fedora now uses regex. When saying commands, it is much more generous on picking up trigger words, as it is now case insensitive and ignores punctuation at the middle end as well as extra words. For example, if the prefix is "go go gadget" and the prefix is "batong", it will trigger with these phrases: - Go go gadget... batong (Ignores punctuation after the prefix) - Go go gadget batong! (Ignores punctuation at the end) - Go go gadget batong bitch! (Ignores extra words at the end) - Go go GADGET, BATONG (Ignores case) Multiple items can also be deployed at once, if it is possible to put an item in your hand. For example, you can assign two items to the same word, and the first item will be put in your active hand and the second would be put in your off hand. ## Why It's Good For The Game Regex good. Removes infuriating situations where the entire phrase is ignored because you didn't say it exactly, such as adding extra punctuation or typing in all caps. I tested this pretty extensively(tm) so it does work, and I tested some dumb possible exploits as well and couldn't do them. Works with latest version of /tg/. ## Changelog :cl: BurgerBB qol: The inspector's Fedora now uses regex. When saying commands, it is much more generous on picking up trigger word. /:cl: --------- Co-authored-by: san7890 <[email protected]>
- Loading branch information
Showing
1 changed file
with
76 additions
and
42 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