Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatsan fixes to emote entries ending with letters. #2292

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

whatston3
Copy link
Contributor

About the PR

Fixes Chatsan emote entries that end in letters by adding periods.

Why / Balance

Brainrot.

How to test

Enter the following text in in-game chat. Each one of them should result in an emote. Note that the >:i entry requires an additional > because of local chat.

:D
:O
:S
xD
qwq
:u
:v
>:i
:i
:p
;p
:b
o-o
o.o
smh
lmao
lmfao
lol
lel
kek
rofl
idk

Media

Requirements

Breaking changes

Changelog

🆑

  • fix: Chatsan emotes ending in letters now work again.

@github-actions github-actions bot added the C# label Oct 20, 2024
@GreyMario
Copy link
Contributor

GreyMario commented Oct 20, 2024

Isn't there code somewhere that's explicitly supposed to strip trailing punctuation... exactly for this purpose?

E: oh right that's buried in emote chatcode instead of being in a sane place

@dvir001
Copy link
Contributor

dvir001 commented Oct 20, 2024

Was this fixed on upstream?

arimah
arimah previously requested changes Oct 20, 2024
Copy link
Contributor

@arimah arimah left a comment

Choose a reason for hiding this comment

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

There is a much simpler and more robust fix to these recurring issues:

_sanitizer.TrySanitizeOutSmilies(newMessage, source, out newMessage, out emoteStr);

Move this line up above all the if statements. Check emotes first, then punctate and capitalise and stuff. Since this is inherited from upstream, we could probably even upstream that fix. It'll help everyone who uses the auto-punctuate feature.

@whatston3
Copy link
Contributor Author

Move this line up above all the if statements. Check emotes first, then punctate and capitalise and stuff. Since this is inherited from upstream, we could probably even upstream that fix. It'll help everyone who uses the auto-punctuate feature.

If you'd like this done, I'd ask you to do it. I frankly hate this feature and tried to spend the minimum amount of time on it.

Thank you.

@whatston3 whatston3 changed the title Chatsan fixes: add periods to emote entries ending with letters. Chatsan fixes to emote entries ending with letters. Oct 20, 2024
@whatston3
Copy link
Contributor Author

Testbench in description works without issue.

@whatston3 whatston3 merged commit e2b3a8d into new-frontiers-14:master Oct 20, 2024
13 checks passed
FrontierATC added a commit that referenced this pull request Oct 20, 2024
@arimah
Copy link
Contributor

arimah commented Oct 20, 2024

Oh, I was just about to make the change. Well, thanks for doing it yourself, I suppose! I hate this feature too, but it is what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants