From ebf50d073a345858863c688fca412e33a467d95c Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sun, 5 Mar 2017 18:42:24 -0500 Subject: [PATCH] Add TOTAL_HUDS define Making a list just... 'be 10 long' is bad. Like update_icons layers and various other things, if you add more, it will compile fine and then you get runtimes later, which is a little annoying. Having places you just have to 'know' to update elsewhere in the code is meh. --- code/__defines/misc.dm | 1 + code/modules/mob/living/carbon/human/human.dm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 4199a28bbaa..af010501b30 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -36,6 +36,7 @@ #define SPECIALROLE_HUD 8 // AntagHUD image. #define STATUS_HUD_OOC 9 // STATUS_HUD without virus DB check for someone being ill. #define LIFE_HUD 10 // STATUS_HUD that only reports dead or alive +#define TOTAL_HUDS 10 // Total number of HUDs. Like body layers, and other things, it comes up sometimes. //some colors #define COLOR_WHITE "#FFFFFF" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fd202245a01..c83d3d98b3a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -5,7 +5,7 @@ icon = 'icons/mob/human.dmi' icon_state = "body_m_s" - var/list/hud_list[10] + var/list/hud_list[TOTAL_HUDS] var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call. var/last_push_time //For human_attackhand.dm, keeps track of the last use of disarm