From 2f78c0a5db904a471dfddb3113f0b96e3ecb02a9 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Thu, 19 Dec 2019 17:51:23 -0700 Subject: [PATCH] Update mob.dm --- code/modules/mob/mob.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 2d5424e845..da307a6763 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -567,8 +567,8 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) return 0 /mob/Stat() - ..() - + . = ..() + var/statdelay = 20 if(statpanel("Status")) if (client) stat(null, "Ping: [round(client.lastping, 1)]ms (Average: [round(client.avgping, 1)]ms)") @@ -576,7 +576,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) var/datum/map_config/cached = SSmapping.next_map_config if(cached) stat(null, "Next Map: [cached.map_name]") - stat(null, "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]") + stat(null, "Round ID: [GLOB.round_id || "NULL"]") stat(null, "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]") stat(null, "Round Time: [WORLDTIME2TEXT("hh:mm:ss")]") stat(null, "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss")]") @@ -586,8 +586,9 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) if(ETA) stat(null, "[ETA] [SSshuttle.emergency.getTimerStr()]") - if(client && client.holder) + if(client?.holder) if(statpanel("MC")) + statdelay = 0 //It's assumed that if you're doing this you are doing debug stuff, don't do ioditic things. var/turf/T = get_turf(client.eye) stat("Location:", COORD(T)) stat("CPU:", "[world.cpu]") @@ -613,6 +614,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) GLOB.ahelp_tickets.stat_entry() if(length(GLOB.sdql2_queries)) if(statpanel("SDQL2")) + statdelay = 0 //It's assumed that if you're doing this you are doing debug stuff, don't do ioditic things. stat("Access Global SDQL2 List", GLOB.sdql2_vv_statobj) for(var/i in GLOB.sdql2_queries) var/datum/SDQL2_query/Q = i @@ -636,14 +638,13 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) if(A.IsObscured()) continue statpanel(listed_turf.name, null, A) - - if(mind) add_spells_to_statpanel(mind.spell_list) var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling) if(changeling) add_stings_to_statpanel(changeling.purchasedpowers) add_spells_to_statpanel(mob_spell_list) + sleep(statdelay) /mob/proc/add_spells_to_statpanel(list/spells) for(var/obj/effect/proc_holder/spell/S in spells) @@ -976,4 +977,4 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) /mob/setMovetype(newval) . = ..() - update_movespeed(FALSE) \ No newline at end of file + update_movespeed(FALSE)