mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Ported the core of the overlays management subsystem from /tg
- Added SSoverlays subsystem for compiling overlay lists and applying them to atoms in a controlled anti-lag subsystem. - Added vars and procs to atom which should eventually replace all direct interaction with BYOND's /atom/overlays var outside the subsystem. - Added OVERLAY_QUEUED flag to var/atom/flags bitfield. - Added small framework for subsystem performance tracking. So far used only by SSoverlays - Added admin debug command "Display overlay Log" to see performance stats mid-round.
This commit is contained in:
@@ -195,6 +195,7 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/cmd_display_del_log,
|
||||
/client/proc/cmd_display_init_log,
|
||||
/client/proc/cmd_display_overlay_log,
|
||||
/client/proc/air_report,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/reload_eventMs,
|
||||
|
||||
@@ -335,6 +335,28 @@
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
src << browse(replacetext(SSatoms.InitLog(), "\n", "<br>"), "window=initlog")
|
||||
|
||||
/client/proc/cmd_display_overlay_log()
|
||||
set category = "Debug"
|
||||
set name = "Display overlay Log"
|
||||
set desc = "Display SSoverlays log of everything that's passed through it."
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
render_stats(SSoverlays.stats, src)
|
||||
|
||||
// Render stats list for round-end statistics.
|
||||
/proc/render_stats(list/stats, user, sort = /proc/cmp_generic_stat_item_time)
|
||||
sortTim(stats, sort, TRUE)
|
||||
|
||||
var/list/lines = list()
|
||||
for (var/entry in stats)
|
||||
var/list/data = stats[entry]
|
||||
lines += "[entry] => [num2text(data[STAT_ENTRY_TIME], 10)]ms ([data[STAT_ENTRY_COUNT]]) (avg:[num2text(data[STAT_ENTRY_TIME]/(data[STAT_ENTRY_COUNT] || 1), 99)])"
|
||||
|
||||
if (user)
|
||||
user << browse("<ol><li>[lines.Join("</li><li>")]</li></ol>", "window=[url_encode("stats:\ref[stats]")]")
|
||||
else
|
||||
. = lines.Join("\n")
|
||||
|
||||
/client/proc/cmd_admin_grantfullaccess(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Grant Full Access"
|
||||
|
||||
Reference in New Issue
Block a user