Delta-v icon indicating copy to clipboard operation
Delta-v copied to clipboard

Add Delta-V patron detection and name coloring support

Open redmushie opened this issue 1 year ago • 3 comments

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.yml from Resources/Credits/ to Resources/
  • Shared: Added PatronTiers.yml containing the current Delta-V patron tiers.
  • Shared: Added PatronUsernames.yml to optionally be able to link a Patreon account name to an in-game username (since not everyone has them equal);
  • Shared: Added a shared PatronManager to handle parsing all of the above files;
  • Client: Reworked the Credits tab to use the PatronManager instead;
  • Server: Reworked the ChatManager logic to use the PatronManager in 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

Content Client_8kbdb4We2L

Captain patron

Content Client_F6PIZJqSNZ

Assistant patron

Content Client_2MizXSmynb

An Admin and Central Commander patron:

Content Client_lRqFpAgyQO

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

redmushie avatar Apr 26 '24 08:04 redmushie

I think you mixed up the assistant and captain images

Bonktrauma avatar Apr 26 '24 19:04 Bonktrauma

I think you mixed up the assistant and captain images

Fixed, thanks!

redmushie avatar Apr 26 '24 20:04 redmushie

Please review! I'd love to hear what I can improve and a timeline for when this could be merged.

redmushie avatar May 09 '24 15:05 redmushie

The approach RMC14 chose is much better, and preferred over this. If no one else does it I'll port that myself.

Axionyxx avatar Jul 09 '24 10:07 Axionyxx