Add Delta-V patron detection and name coloring support
Add Delta-V patron detection and name coloring support in OOC chat.
About the PR
In a nutshell, this PR adds name coloring for Delta-V patrons. See the Media section for what this looks like.
- Shared: Moved
Patrons.ymlfromResources/Credits/toResources/ - Shared: Added
PatronTiers.ymlcontaining the current Delta-V patron tiers. - Shared: Added
PatronUsernames.ymlto optionally be able to link a Patreon account name to an in-game username (since not everyone has them equal); - Shared: Added a shared
PatronManagerto handle parsing all of the above files; - Client: Reworked the
Creditstab to use thePatronManagerinstead; - Server: Reworked the
ChatManagerlogic to use thePatronManagerin addition to the existing Patron name coloring logic:- Primarily, if the username matches a current Delta-V patron, that color is used.
- Secondarily, if they are not a Delta-V patron, but are a SS14 patron, the default Patron color is used (meaning: default behavior hasn't changed, Delta-V patron status just takes precedence.)
Why / Balance
As a player relatively new to Delta-V, I was incredibly confused when I found out that people with purple names in OOC chat weren't in fact Delta-V patrons, but rather Wizden/SS14 patrons. This was in addition to Delta-V patrons not actually getting anything ingame!
I think the end result is nice (visually), makes it more worthwhile to be a Patron, and generally just helps to incentivize people supporting Delta-V.
Technical details
Since the parsing of Patrons.yml prior to this PR was client-side, I added a shared PatronManager to handle the parsing logic instead to prevent unnecessary code duplication. This class is pretty much self-contained when it comes to determining if someone is a current Patron, what name to match them by, and to provide access to the current Tiers.
Next, in the server ChatManager.cs, I added a reference to the PatronManager and added a branch for handling Delta-V patrons in addition to the already existing SS14 patrons.
Lastly, in the client side CreditsWindow.xaml.cs, I now use the shared PatronManager instead of the previous manual parsing logic.
Media
Central Commander patron
Captain patron
Assistant patron
An Admin and Central Commander patron:
This mix of colors is actually default behavior, but admins can simply turn off their Patron color via console command:
cvar ooc.show_ooc_patron_color False
- [x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase
Breaking changes
None.
Changelog
:cl:
- add: Delta-V patrons now have their name colored in OOC chat corresponding to their Patron tier
- tweak: Made SS14 patron status secondary to Delta-V patron status
I think you mixed up the assistant and captain images
I think you mixed up the assistant and captain images
Fixed, thanks!
Please review! I'd love to hear what I can improve and a timeline for when this could be merged.
The approach RMC14 chose is much better, and preferred over this. If no one else does it I'll port that myself.