-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Port Chat from Outdated branch #1426
Merged
Merged
Conversation
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
joaoburatto
previously requested changes
Feb 23, 2024
Code fine, needs runtime testing. |
Now chat formatting is done only by the original client who sents the message, so the rest of players receive the message already formatted Also updated how text is displayed to match the UI design (https://ss3d.gitbook.io/design/basic-game-mechanics/user-interface/game/player-hud)
Found a UI concept of how the chat should be (https://ss3d.gitbook.io/design/basic-game-mechanics/user-interface/game/player-hud) and decided to update both the UI visuals and how text is formatted to match a bit more that design |
stilnat
approved these changes
Mar 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR aims to have the chat from the outdated branch (#89) working. It also adds some more functionality, trying to replicate some of the mechanics of SS13
Currently, lobby and in-game chats (should) work. You can add new channels or modify existing ones at Content > Data > UI > Chat > Channels (Create > SS3D > UI > Chat > Chat Channel for a new channel). The Channels list (in Content > Data > UI > Chat) should be updated if removing/adding new channels
As on the original chat, channels can have abbreviations, colors and whether if they can be excluded from tabs or not (hidable). Messages sent to non-hidable channels will be always present in all chats/tabs. Currently the only non-hidable channel is System
On top of porting the original chat, this PR also adds the chat to the lobby and roles required to channels. Only players with same or higher role will be able to use specific channels, like System, which requires Administrator role or higher
Some things that are
notdoneyet, but I'd like to include if possible (no promises, though):PR checklist
Pictures/Videos
Chat_basic_functionality_working.mp4
2024-02-18.13-54-33.mp4
Testing
Open several clients with different roles, and use the chat in the lobby and in-game. When in-game, use different channels
Networking checklist
Changes
I decided to remove the "ChatRegister" from the original chat to make things easier. I'm using broadcasts messages for the chat. First time working with multiplayer on this level, so I may have done something really wrong - would appreciate if someone could check I'm not doing anything too silly
I've also modified Trait.cs to fix a bug where two equal traits were returning non-equal due to GetType() methods returning the base type for the first trait being compared, and the second trait was returning the specific type (for example, Security trait was returining Trait as type for the first object, and IDPermission (which inherits from Trait) for the second object, although they were exactly the same)
Related issues/PRs
Closes #1286