Skip to content

Commit 208342e

Browse files
authored
Tgui Player & Options panel - Please Review Me (#4846)
* wasawasa * wasa * 1 * updatus * bowwwwwwwwwwww * i fink its done chief * oop * final final final v45? * oop * Updates post prelim review * Update to fix some things 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 * Fix Soulless Corpses not being PPable Fixed soulless corpses not being PPable. as far as I can tell this works * Update VethPlayerPanel.tsx * Adds Admin AI Interact button to PP * Adds "Also Known as" Also known as is a searchable target for the frontend, and backend displays all previous character names that the person has used. * Removes sinful one letter variables * Replaces pretty much all of the old player panel cases apart from the verb itself it's still accessable, just a lil bit hidden u know... * Consistency update to make sure it always grabs the correct mob * Updated with requested changes * Commenting update. Send it poobs.
1 parent 3175498 commit 208342e

File tree

11 files changed

+1519
-8
lines changed

11 files changed

+1519
-8
lines changed

code/datums/keybinding/admin.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
hotkey_keys = list("F6")
3131
name = "player_panel_new"
3232
full_name = "Player Panel New"
33-
description = "Opens up the new player panel"
33+
description = "Opens up the new TGUI player panel"
3434
keybind_signal = COMSIG_KB_ADMIN_PLAYERPANELNEW_DOWN
3535

3636
/datum/keybinding/admin/player_panel_new/down(client/user)
3737
. = ..()
3838
if(.)
3939
return
40-
user.holder.player_panel_new()
40+
user.holder.player_panel_veth()
4141
return TRUE
4242

4343
/datum/keybinding/admin/toggle_buildmode_self

code/modules/admin/admin_verbs.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ GLOBAL_PROTECT(admin_verbs_admin)
5151
/datum/verbs/menu/Admin/verb/playerpanel, /* It isn't /datum/admin but it fits no less */
5252
/datum/admins/proc/kick_player_by_ckey, //MONKESTATION ADDITION - kick a player by their ckey
5353
/datum/admins/proc/change_shuttle_events, //allows us to change the shuttle events
54+
/datum/admins/proc/player_panel_veth,
55+
/datum/admins/proc/vuap_open_context,
56+
/datum/admins/proc/vuap_open,
5457
// Client procs
5558
/client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
5659
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcom*/

code/modules/admin/topic.dm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,9 @@
725725

726726
else if(href_list["adminplayeropts"])
727727
var/mob/M = locate(href_list["adminplayeropts"])
728-
show_player_panel(M)
728+
usr.client.VUAP_selected_mob = M
729+
usr.client.selectedPlayerCkey = M.ckey
730+
usr.client.holder.vuap_open()
729731

730732
else if(href_list["ppbyckey"])
731733
var/target_ckey = href_list["ppbyckey"]
@@ -740,7 +742,9 @@
740742
return
741743

742744
to_chat(usr, span_notice("Jumping to [target_ckey]'s new mob: [target_mob]!"))
743-
show_player_panel(target_mob)
745+
usr.client.VUAP_selected_mob = target_mob
746+
usr.client.selectedPlayerCkey = target_mob.ckey
747+
usr.client.holder.vuap_open()
744748

745749
else if(href_list["adminopendemo"])
746750
usr.client << link("http://viewer.monkestation.com/?roundid=[GLOB.round_id]&password=[CONFIG_GET(string/replay_password)]#[world.time]") //opens current round at current time

code/modules/mob/mob.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,9 @@
13371337
if(href_list[VV_HK_PLAYER_PANEL])
13381338
if(!check_rights(NONE))
13391339
return
1340-
usr.client.holder.show_player_panel(src)
1340+
usr.client.VUAP_selected_mob = src
1341+
usr.client.selectedPlayerCkey = src.ckey
1342+
usr.client.holder.vuap_open()
13411343
if(href_list[VV_HK_GODMODE])
13421344
if(!check_rights(R_ADMIN))
13431345
return

code/modules/requests/request_manager.dm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
170170

171171
switch(action)
172172
if ("pp")
173-
var/mob/M = request.owner?.mob
174-
usr.client.holder.show_player_panel(M)
173+
usr.client.VUAP_selected_mob = request.owner?.mob
174+
usr.client.selectedPlayerCkey = request.owner?.mob.ckey
175+
usr.client.holder.vuap_open()
175176
return TRUE
176177
if ("vv")
177178
var/mob/M = request.owner?.mob

code/modules/wiremod/core/admin_panel.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@
6868
circuit.ui_interact(usr)
6969
if ("open_player_panel")
7070
var/datum/mind/inserter = circuit.inserter_mind?.resolve()
71-
usr.client?.holder?.show_player_panel(inserter?.current)
71+
usr.client.VUAP_selected_mob = inserter?.current
72+
usr.client.selectedPlayerCkey = inserter?.current?.ckey
73+
usr.client?.holder?.vuap_open()
7274

7375
return TRUE
7476

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Title: <!--Title of your addition-->
2+
3+
<!-- uppercase, underscore_connected name of your module, that you use to mark files-->
4+
MODULE ID: TGUIPLAYERPANEL
5+
6+
### Description:
7+
This PR adds a TGUI version of player panel. It should have all of the features of the current player panel, with some additional "most used" buttons on the main player panel. Ideally, if all goes well, I'd like to phase out the older player panel, but this will need extensive testing.
8+
9+
### Master file additions
10+
11+
- N/A
12+
<!-- Any master file changes you've made to existing master files or if you've added a new master file. Please mark either as #NEW or #CHANGE -->
13+
14+
### Included files that are not contained in this module:
15+
16+
#NEW tgui/packages/tgui/interfaces/VUAP_personal.tsx
17+
#NEW tgui/packages/tgui/interfaces/veth_player_panel.tsx
18+
#CHANGE code/modules/admin/admin_verbs.dm
19+
20+
21+
<!-- Likewise, be it a non-modular file or a modular one that's not contained within the folder belonging to this specific module, it should be mentioned here -->
22+
23+
### Credits:
24+
25+
<!-- Here go the credits to you, dear coder, and in case of collaborative work or ports, credits to the original source of the code -->
26+
<!-- Original Coders -->
27+
Made by Veth
28+
Special thanks to Fleepy, Pooba & Absolucy for their help.
29+

0 commit comments

Comments
 (0)