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

Tgui Player & Options panel - Please Review Me #4846

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

Veth-s
Copy link
Contributor

@Veth-s Veth-s commented Jan 12, 2025

About The Pull Request

Some screenshots for the intended workings:
pp
options panel
Essentially a full conversion of the player panel and player options panel. Player panel also now has some frequently used buttons etc. All the buttons have been tested and work locally, except those requiring a database, which I don't know how to setup on my home setup.
Old player panel is currently staying in until this can be properly bugtested/used and updated.
selectedPlayerCkey is a client/var/ used to transport the ckey between the two different panels. VUAP_selected_mob is the same thing, but for when the mob doesn't have an active ckey, allowing pp of soulless mobs.
This is my first time doing something like this, so if there is a better way to do it let me know.
All buttons have appropriate rights checks and logging required (some of which is in Topic() itself.)
Adds a right click menu entry for opening the panel for a specific mob. Refresh is disabled for these panels as I fear with the amount of changes they'd go through with 100 players it might cause lag.
Additionally I'm open to naming schemes... I sorta just put a name placeholder there and forgot about it so if you have any good name ideas let me know.

It's been tested on my end, and is probably ready for a test merge post review. I still need to name it something not shit but I'm happy with how it turned out.

IF YOU ARE PORTING THIS READ THIS
Every time a topic() call is called for adminplayeropts (which happens for pretty much every single ticket panel action labelled PP, you need to set usr.client.holder.VUAP_selected_mob = the mob that's located & you need to set the selectedPlayerCkey. This is to reduce errors if the client swaps mobs before you can press the button etc.
Any buttons are easy to add, just add them in the relevant sections on the frontend, and their backend handler in the appropriate area. Use Topic() calls when possible, the vast majority of them are logged and rights checked themselves (for safety)
The functionality of related by cid/ip and centcom ban DB will only work if you've properly ported the appropriate features (if they're not base IDK lol)

Why It's Good For The Game

Better admin tools make admin life easier. Plus it means I don't have to look at the ugly player panel we currently have.

Changelog

🆑
admin: Replaced player panel and player options panel with a tgui version. Includes a verb in the Admin Game category, and an option on right clicking a mob.
admin: Rebound F6 to the new TGUI player panel.
/:cl:

@Veth-s Veth-s changed the title Hehe pp hehe Tgui Player & Options panel - Do Not Merge Jan 12, 2025
@Absolucy Absolucy added the do not merge don't merge this ffs label Jan 12, 2025
@Kitsunemitsu
Copy link
Collaborator

Please write a better PR Body.

@Veth-s
Copy link
Contributor Author

Veth-s commented Jan 14, 2025

Please write a better PR Body.

I will when it's actually ready.

@Veth-s Veth-s changed the title Tgui Player & Options panel - Do Not Merge Tgui Player & Options panel - Please Review Me Jan 15, 2025
@Veth-s
Copy link
Contributor Author

Veth-s commented Jan 15, 2025

Boxes don't go red when ticked which annoys me but otherwise is probably ready for review when linters are done lol

@Veth-s Veth-s marked this pull request as ready for review January 15, 2025 03:17
Copy link
Member

@Absolucy Absolucy left a comment

Choose a reason for hiding this comment

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

not done reviewing yet, this is gonna take a bit, and it's 10 pm, but here's a preliminary review

@Veth-s
Copy link
Contributor Author

Veth-s commented Jan 15, 2025

not done reviewing yet, this is gonna take a bit, and it's 10 pm, but here's a preliminary review

thanks homie, sorry in advance it was written in a feverdream so there's probably a lot wrong with it. I'll update it tmrw when I get time

Update to fix some things:
Updated F6 keybind to use new pp
updated the pp to be on /datum/admins/ not a client proc (safety ig)
fixed centcom galactic db
fixed account age/first seen
@ThePooba
Copy link
Collaborator

Admins everywhere rejoice

Copy link
Member

@Absolucy Absolucy left a comment

Choose a reason for hiding this comment

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

if it's tested and works, then I'm okay with this being merged

@Veth-s
Copy link
Contributor Author

Veth-s commented Jan 31, 2025

if it's tested and works, then I'm okay with this being merged

I havent had any bug reports for a while, and i've fixed any i've come across. I'll update with the player_details changes, I just based it on what the old pp did :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge don't merge this ffs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants