diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 683ef1da..28ff7c8e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -59,7 +59,7 @@ //...and display them. add_to_all_human_data_huds() -/var/list/sList2 + /mob/living/carbon/human/Stat() ..() //Same thing from mob @@ -80,7 +80,8 @@ if(changeling) sList2 += "Chemical Storage: " + "[changeling.chem_charges]/[changeling.chem_storage]" sList2 += "Absorbed DNA: "+ "[changeling.absorbedcount]" - stat(null, "[sList2.Join("\n\n")]") + if (sList2 != null) + stat(null, "[sList2.Join("\n\n")]") //NINJACODE if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)) //Only display if actually a ninja. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index eea92ce5..7e2b742e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -531,9 +531,7 @@ /mob/proc/is_muzzled() return 0 -/var/tickrefreshThr = 20 -/var/tickrefresh = 0 -/var/list/sList + /mob/Stat() ..() //This is where I try and add a temporary solution to the issue of the status tab. This solution is bad and I should feel bad, but it should mitigate some of the client lag. @@ -553,7 +551,8 @@ tickrefresh = 0 else tickrefresh++ - stat(null, "[sList.Join("\n\n")]") + if (sList != null) + stat(null, "[sList.Join("\n\n")]") if(client && client.holder) if(statpanel("MC")) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 4f804dd8..803a392d 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -16,6 +16,11 @@ var/stat = CONSCIOUS //Whether a mob is alive or dead. TODO: Move this to living - Nodrak + + var/list/sList = list() + var/list/sList2 = list() + var/tickrefreshThr = 20 + var/tickrefresh = 0 /*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob. A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such. The current method unnecessarily clusters up the variable list, especially for humans (although rearranging won't really clean it up a lot but the difference will be noticable for other mobs).