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

Added multi-chat support for UnturnedChat methods #79

Conversation

MidnightTokyo
Copy link
Contributor

Rework of wrapMessage method. Originally RocketMod divides text into multiple messages every 90 characters, now it uses a constant from ChatManager, so now messages sent by plugins via UnturnedChat will look better.

@Trojaner
Copy link

Trojaner commented Nov 12, 2024

The previous implementation tried to break only on words, yours would cut words in half if the message exceeds max length.

Example:

previous:

Hello this is a very
long message

yours:

Hello this is a very lo
ng message

My suggestion is to just change the constant to the built-in one and keep the rest of the original implementation.

@SDGNelson
Copy link
Member

Thanks for the upgrade MidnightTokyo, and thanks for pointing out the loss of word wrapping Trojaner! :)

I think Trojaner's proposed compromise to use ChatManager.MAX_MESSAGE_LENGTH instead of the existing constant of 90 in that method makes sense if you'd like to revise your RP to do that instead.

In general, we're not looking to fundamentally upgrade Rocket with this repo - only maintain compatibility. There are some awesome community projects with varying degrees of progress beyond that though like:

@SDGNelson
Copy link
Member

Thank you both! I've made a note to update the LDM release here and in the base game as part of the next update.

@SDGNelson SDGNelson merged commit f2e41ac into SmartlyDressedGames:master Nov 19, 2024
1 check passed
@MidnightTokyo MidnightTokyo deleted the unturnedchat-multi-chat-support branch November 20, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants