mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Port tg statpanel (#16463)
* Port tg statpanel * Add verb descriptions using the title attribute * Fix a dreamchecker error * Remove chomp edits * Add mentor tickets to ticket panel --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -384,11 +384,13 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
|
||||
delete_click = new(null, "INITIALIZING", src)
|
||||
if(!action_click)
|
||||
action_click = new(null, "INITIALIZNG", src)
|
||||
stat("[id] ", delete_click.update("DELETE QUERY | STATE : [text_state()] | ALL/ELIG/FIN \
|
||||
var/list/L = list()
|
||||
L[++L.len] = list("[id] ", "[delete_click.update("DELETE QUERY | STATE : [text_state()] | ALL/ELIG/FIN \
|
||||
[islist(obj_count_all)? length(obj_count_all) : (isnull(obj_count_all)? "0" : obj_count_all)]/\
|
||||
[islist(obj_count_eligible)? length(obj_count_eligible) : (isnull(obj_count_eligible)? "0" : obj_count_eligible)]/\
|
||||
[islist(obj_count_finished)? length(obj_count_finished) : (isnull(obj_count_finished)? "0" : obj_count_finished)] - [get_query_text()]"))
|
||||
stat(" ", action_click.update("[SDQL2_IS_RUNNING? "HALT" : "RUN"]"))
|
||||
[islist(obj_count_finished)? length(obj_count_finished) : (isnull(obj_count_finished)? "0" : obj_count_finished)] - [get_query_text()]")]", REF(delete_click))
|
||||
L[++L.len] = list(" ", "[action_click.update("[SDQL2_IS_RUNNING? "HALT" : "RUN"]")]", REF(action_click))
|
||||
return L
|
||||
|
||||
/datum/SDQL2_query/proc/delete_click()
|
||||
admin_del(usr)
|
||||
|
||||
@@ -72,18 +72,23 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
|
||||
//Tickets statpanel
|
||||
/datum/admin_help_tickets/proc/stat_entry()
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
var/list/L = list()
|
||||
var/num_disconnected = 0
|
||||
stat("== Admin Tickets ==")
|
||||
stat("Active Tickets:", astatclick.update("[active_tickets.len]"))
|
||||
L[++L.len] = list("== Admin Tickets ==", "", null, null)
|
||||
L[++L.len] = list("Active Tickets:", "[astatclick.update("[active_tickets.len]")]", null, REF(astatclick))
|
||||
astatclick.update("[active_tickets.len]")
|
||||
for(var/datum/admin_help/AH as anything in active_tickets)
|
||||
if(AH.initiator)
|
||||
stat("#[AH.id]. [AH.initiator_key_name]:", AH.statclick.update())
|
||||
L[++L.len] = list("#[AH.id]. [AH.initiator_key_name]:", "[AH.statclick.update()]", REF(AH))
|
||||
else
|
||||
++num_disconnected
|
||||
if(num_disconnected)
|
||||
stat("Disconnected:", astatclick.update("[num_disconnected]"))
|
||||
stat("Closed Tickets:", cstatclick.update("[closed_tickets.len]"))
|
||||
stat("Resolved Tickets:", rstatclick.update("[resolved_tickets.len]"))
|
||||
L[++L.len] = list("Disconnected:", "[astatclick.update("[num_disconnected]")]", null, REF(astatclick))
|
||||
L[++L.len] = list("Closed Tickets:", "[cstatclick.update("[closed_tickets.len]")]", null, REF(cstatclick))
|
||||
L[++L.len] = list("Resolved Tickets:", "[rstatclick.update("[resolved_tickets.len]")]", null, REF(rstatclick))
|
||||
return L
|
||||
|
||||
//Reassociate still open ticket if one exists
|
||||
/datum/admin_help_tickets/proc/ClientLogin(client/C)
|
||||
@@ -119,6 +124,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
/obj/effect/statclick/ticket_list/Click()
|
||||
GLOB.ahelp_tickets.BrowseTickets(current_state)
|
||||
|
||||
//called by admin topic
|
||||
/obj/effect/statclick/ticket_list/proc/Action()
|
||||
Click()
|
||||
//
|
||||
//TICKET DATUM
|
||||
//
|
||||
@@ -606,9 +614,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
return
|
||||
|
||||
//remove out adminhelp verb temporarily to prevent spamming of admins.
|
||||
src.verbs -= /client/verb/adminhelp
|
||||
remove_verb(src, /client/verb/adminhelp)
|
||||
spawn(1200)
|
||||
src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps
|
||||
add_verb(src, /client/verb/adminhelp) // 2 minute cool-down for adminhelps
|
||||
|
||||
feedback_add_details("admin_verb","Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
if(current_ticket)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
return
|
||||
|
||||
//if they requested spice, then remove spice verb temporarily to prevent spamming
|
||||
usr.verbs -= /client/verb/adminspice
|
||||
remove_verb(usr, /client/verb/adminspice)
|
||||
spawn(10 MINUTES)
|
||||
if(usr) // In case we left in the 10 minute cooldown
|
||||
usr.verbs += /client/verb/adminspice // 10 minute cool-down for spice request
|
||||
add_verb(usr, /client/verb/adminspice) // 10 minute cool-down for spice request
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
to_chat(src, span_red("Error: giveruntimelog(): Client not found."))
|
||||
return
|
||||
|
||||
target.verbs |= /client/proc/getruntimelog
|
||||
add_verb(target, /client/proc/getruntimelog)
|
||||
to_chat(target, span_red("You have been granted access to runtime logs. Please use them responsibly or risk being banned."))
|
||||
return
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ var/list/debug_verbs = list (
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
verbs += debug_verbs
|
||||
add_verb(src, debug_verbs)
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -182,7 +182,7 @@ var/list/debug_verbs = list (
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
verbs -= debug_verbs
|
||||
remove_verb(src, debug_verbs)
|
||||
|
||||
feedback_add_details("admin_verb","hDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -47,6 +47,6 @@
|
||||
set desc = "Give this guy possess/release verbs"
|
||||
set category = "Debug"
|
||||
set name = "Give Possessing Verbs"
|
||||
M.verbs += /proc/possess
|
||||
M.verbs += /proc/release
|
||||
feedback_add_details("admin_verb","GPV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
add_verb(M, /proc/possess)
|
||||
add_verb(M, /proc/release)
|
||||
feedback_add_details("admin_verb","GPV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -324,7 +324,7 @@ Ccomp's first proc.
|
||||
if(config.antag_hud_allowed)
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
if(!g.client.holder) //Remove the verb from non-admin ghosts
|
||||
g.verbs -= /mob/observer/dead/verb/toggle_antagHUD
|
||||
remove_verb(g, /mob/observer/dead/verb/toggle_antagHUD)
|
||||
if(g.antagHUD)
|
||||
g.antagHUD = 0 // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
@@ -335,7 +335,7 @@ Ccomp's first proc.
|
||||
else
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
g.verbs += /mob/observer/dead/verb/toggle_antagHUD
|
||||
add_verb(g, /mob/observer/dead/verb/toggle_antagHUD)
|
||||
to_chat(g, span_blue("<B>The Administrator has enabled AntagHUD </B>")) // Notify all observers they can now use AntagHUD
|
||||
config.antag_hud_allowed = 1
|
||||
action = "enabled"
|
||||
|
||||
Reference in New Issue
Block a user