mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Merge pull request #13175 from farie82/logging-improvements
Logging view improvements
This commit is contained in:
@@ -78,6 +78,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
body += " \[<A href='?_src_=holder;revive=[M.UID()]'>Heal</A>\] "
|
||||
|
||||
body += "<br><br>\[ "
|
||||
body += "<a href='?_src_=holder;open_logging_view=[M.UID()];'>LOGS</a> - "
|
||||
body += "<a href='?_src_=vars;Vars=[M.UID()]'>VV</a> - "
|
||||
body += "[ADMIN_TP(M,"TP")] - "
|
||||
if(M.client)
|
||||
|
||||
@@ -911,6 +911,11 @@
|
||||
//M.client = null
|
||||
qdel(M.client)
|
||||
|
||||
else if(href_list["open_logging_view"])
|
||||
var/mob/M = locateUID(href_list["open_logging_view"])
|
||||
if(ismob(M))
|
||||
usr.client.open_logging_view(list(M), TRUE)
|
||||
|
||||
//Player Notes
|
||||
else if(href_list["addnote"])
|
||||
var/target_ckey = href_list["addnote"]
|
||||
|
||||
@@ -2,10 +2,20 @@ GLOBAL_LIST_INIT(open_logging_views, list())
|
||||
|
||||
/client/proc/cmd_admin_open_logging_view()
|
||||
set category = "Admin"
|
||||
set name = "Open Logging View"
|
||||
set name = "Logging View"
|
||||
set desc = "Opens the detailed logging viewer"
|
||||
open_logging_view()
|
||||
|
||||
if(!GLOB.open_logging_views[usr.client.ckey])
|
||||
GLOB.open_logging_views[usr.client.ckey] = new /datum/log_viewer()
|
||||
var/datum/log_viewer/LV = GLOB.open_logging_views[usr.client.ckey]
|
||||
LV.show_ui(usr)
|
||||
/client/proc/open_logging_view(list/mob/mobs_to_add = null, clear_view = FALSE)
|
||||
var/datum/log_viewer/cur_view = GLOB.open_logging_views[usr.client.ckey]
|
||||
if(!cur_view)
|
||||
cur_view = new /datum/log_viewer()
|
||||
GLOB.open_logging_views[usr.client.ckey] = cur_view
|
||||
else if(clear_view)
|
||||
cur_view.clear_all()
|
||||
|
||||
if(mobs_to_add?.len)
|
||||
cur_view.add_mobs(mobs_to_add)
|
||||
|
||||
cur_view.show_ui(usr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user