ID:260251
 
Could we have the option to ident stats in the Stat() proc?

e.g.
mob/Stat()
statpanel("Stats")
stat(1)
stat(2)

statpanel("Other")
stat(3)
stat("lol")
Hello! I came back from the future. Yes, I'm a BYOND Developer in the year 2010. Let's just hope that this message doesn't change the pace of time! I already modified the sourcecode a few years before this time, so that you have the changes I incorporated now:

mob/Stat()
if(statpanel("Stats"))
stat(1)
stat(2)
if(statpanel("Other"))
stat(3)
stat("lol")


This is more efficent, because it checks wether the statpanel is currently selected. If it isn't, it doesn't execute the code. That way, when you have something CPU-intensive going on in there, it's skipped for those that don't want to see it.

Be careful not to include an "else if" in there. This is a pretty common misunderstanding: doing this will make the statpanel dissappear if it's not selected.