mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-01 20:01:45 +00:00
* upports server maint subsystem * fix runtime in admin z narrate * . * sorts them verbs * . * . * Update code/controllers/subsystems/statpanel.dm Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> * Update code/controllers/subsystems/server_maint.dm Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> --------- Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
24 lines
646 B
Plaintext
24 lines
646 B
Plaintext
|
|
/client/verb/update_ping(time as num)
|
|
set instant = TRUE
|
|
set name = ".update_ping"
|
|
var/ping = pingfromtime(time)
|
|
lastping = ping
|
|
if (!avgping)
|
|
avgping = ping
|
|
else
|
|
avgping = MC_AVERAGE_SLOW(avgping, ping)
|
|
|
|
/client/proc/pingfromtime(time)
|
|
return ((world.time+world.tick_lag*TICK_USAGE_REAL/100)-time)*100
|
|
|
|
/client/verb/display_ping(time as num)
|
|
set instant = TRUE
|
|
set name = ".display_ping"
|
|
to_chat(src, span_notice("Round trip ping took [round(pingfromtime(time),1)]ms"))
|
|
|
|
/client/verb/ping()
|
|
set name = "Ping"
|
|
set category = "OOC.Debug"
|
|
winset(src, null, "command=.display_ping+[world.time+world.tick_lag*TICK_USAGE_REAL/100]")
|