Reduces Stat Calls

This commit is contained in:
Fox-McCloud
2017-07-23 04:56:05 -04:00
parent b03d226f8c
commit f924ea15a4
5 changed files with 13 additions and 8 deletions
+9
View File
@@ -49,8 +49,17 @@
description_holders["icon"] = "[bicon(A)]"
description_holders["desc"] = A.desc
// Byond seemingly calls stat, each tick.
// Calling things each tick can get expensive real quick.
// So we slow this down a little.
// See: http://www.byond.com/docs/ref/info.html#/client/proc/Stat
/client/Stat()
. = ..()
if(holder)
sleep(1)
else
sleep(5)
stoplag()
if(usr && statpanel("Examine"))
stat(null,"[description_holders["icon"]] <font size='5'>[description_holders["name"]]</font>") //The name, written in big letters.
stat(null,"[description_holders["desc"]]") //the default examine text.