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

admin event preference panel #480

Merged

Conversation

lunarcomets
Copy link
Contributor

@lunarcomets lunarcomets commented Nov 21, 2024

About the PR

adds an event preference panel that allows admins to see the event preferences of a player's current selected character through the eventpreferences <name> command

currently only accessible through a command, can be added if needed or if it's wanted via context menu, admin menu, etc.

Why / Balance

while working on the character panel, i figured that there will be situations that an admin would only want to see a player's event preferences without the additional features that will be present in the character panel

whether or not this gets merged or is needed, the xaml file will be reused for the characterpanel itself

Technical details

implemented with Eui, a player's character current character profile is fetched and the current active preferences is gotten from the profile every time that the Eui is opened via command or (hopefully) otherwise

the preferences that are listed in the panel are every AntagPrototype that has it's VisiblePreference bool set to True, allowing further preferences that may be added in preference.yml to be listed here automatically without the need of adding anything to the xaml or code as well

a new EventPreferences control was added under in the Content.Client._CD.Admin.UI namespace as well, allowing this portion of the UI to be easily reused

Media

image

Requirements

  • I have read and I am following the Pull Request Guidelines. I understand that not doing so may get my pr closed at maintainer’s discretion
  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

nada

Changelog

for admins: added an event preference panel that allows game admins to view the event preferences of a player via the eventpreferences command

@lunarcomets lunarcomets marked this pull request as ready for review November 21, 2024 10:57
@lunarcomets
Copy link
Contributor Author

putting this up for review early in case i missed some outstanding issues, will personally look it over again soon

@lunarcomets
Copy link
Contributor Author

something fucked up with the pushing the FUCKK

@dffdff2423 dffdff2423 self-requested a review November 24, 2024 05:07
Copy link
Collaborator

@dffdff2423 dffdff2423 left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few minor things. I reviewed this at 11:40pm, so if anything here is nonsensical let me know.

@github-actions github-actions bot added the Changes: UI Changes to UI files. label Dec 12, 2024
@lunarcomets
Copy link
Contributor Author

no longer dying yippioe

@dffdff2423
Copy link
Collaborator

Looking at this again, I would rather preferences not show up if they are not enabled. I think red vs. green could cause a bit of confusion because people commonly associate antags with red. Given that it is a two line change I am just going to make it myself so this gets merged.

Also removed some deadcode in the server-side Eui.
@dffdff2423 dffdff2423 merged commit 8356075 into cosmatic-drift-14:master Dec 17, 2024
11 checks passed
@lunarcomets
Copy link
Contributor Author

lunarcomets commented Dec 17, 2024

oh that works too, thank you!

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

Successfully merging this pull request may close these issues.

2 participants