From: terencehill Date: Mon, 1 Nov 2021 23:48:18 +0000 (+0100) Subject: Add proper health / armor icons (used by the ItemStats and ItemsTime panels) X-Git-Tag: xonotic-v0.8.5~288^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=733007aec6567ef08afd05911e7ff9062be85a44;p=xonotic%2Fxonotic-data.pk3dir.git Add proper health / armor icons (used by the ItemStats and ItemsTime panels) --- diff --git a/gfx/hud/luma/armor_big.tga b/gfx/hud/luma/armor_big.tga new file mode 100644 index 000000000..90158b997 Binary files /dev/null and b/gfx/hud/luma/armor_big.tga differ diff --git a/gfx/hud/luma/armor_medium.tga b/gfx/hud/luma/armor_medium.tga new file mode 100644 index 000000000..db14921bc Binary files /dev/null and b/gfx/hud/luma/armor_medium.tga differ diff --git a/gfx/hud/luma/armor_mega.tga b/gfx/hud/luma/armor_mega.tga new file mode 100644 index 000000000..dcc7340d1 Binary files /dev/null and b/gfx/hud/luma/armor_mega.tga differ diff --git a/gfx/hud/luma/armor_small.tga b/gfx/hud/luma/armor_small.tga new file mode 100644 index 000000000..5a1a736de Binary files /dev/null and b/gfx/hud/luma/armor_small.tga differ diff --git a/gfx/hud/luma/health_big.tga b/gfx/hud/luma/health_big.tga new file mode 100644 index 000000000..b2ab22e35 Binary files /dev/null and b/gfx/hud/luma/health_big.tga differ diff --git a/gfx/hud/luma/health_medium.tga b/gfx/hud/luma/health_medium.tga new file mode 100644 index 000000000..eb71018d2 Binary files /dev/null and b/gfx/hud/luma/health_medium.tga differ diff --git a/gfx/hud/luma/health_mega.tga b/gfx/hud/luma/health_mega.tga new file mode 100644 index 000000000..826d573ae Binary files /dev/null and b/gfx/hud/luma/health_mega.tga differ diff --git a/gfx/hud/luma/health_small.tga b/gfx/hud/luma/health_small.tga new file mode 100644 index 000000000..af3b6c38f Binary files /dev/null and b/gfx/hud/luma/health_small.tga differ diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index e5ae8e36b..f8cabaa05 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -40,7 +40,11 @@ REGISTER_ITEM(ArmorSmall, Armor) { #endif this.netname = "armor_small"; this.m_name = _("Small armor"); - this.m_icon = "armor"; + this.m_icon = "armor_small"; +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "armor"; // compatible with Xonotic v0.8.2 or lower +#endif #ifdef SVQC this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_short); @@ -78,7 +82,11 @@ REGISTER_ITEM(ArmorMedium, Armor) { #endif this.netname = "armor_medium"; this.m_name = _("Medium armor"); - this.m_icon = "armor"; + this.m_icon = "armor_medium"; +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "armor"; // compatible with Xonotic v0.8.2 or lower +#endif #ifdef SVQC this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_medium); @@ -116,7 +124,11 @@ REGISTER_ITEM(ArmorBig, Armor) { #endif this.netname = "armor_big"; this.m_name = _("Big armor"); - this.m_icon = "armor"; + this.m_icon = "armor_big"; +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "armor"; // compatible with Xonotic v0.8.2 or lower +#endif this.m_color = '0 1 0'; this.m_waypoint = _("Big armor"); #ifdef SVQC @@ -156,7 +168,11 @@ REGISTER_ITEM(ArmorMega, Armor) { #endif this.netname = "armor_mega"; this.m_name = _("Mega armor"); - this.m_icon = "item_large_armor"; + this.m_icon = "armor_mega"; +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "item_large_armor"; // compatible with Xonotic v0.8.2 or lower +#endif this.m_color = '0 1 0'; this.m_waypoint = _("Mega armor"); this.m_waypointblink = 2; diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index 0d9992f0e..ca94651aa 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -40,7 +40,11 @@ REGISTER_ITEM(HealthSmall, Health) { #endif this.netname = "health_small"; this.m_name = _("Small health"); - this.m_icon = "health"; + this.m_icon = "health_small"; +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower +#endif #ifdef SVQC this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_short); @@ -78,7 +82,11 @@ REGISTER_ITEM(HealthMedium, Health) { #endif this.netname = "health_medium"; this.m_name = _("Medium health"); - this.m_icon = "health"; + this.m_icon = "health_medium"; +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower +#endif #ifdef SVQC this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_short); @@ -116,9 +124,13 @@ REGISTER_ITEM(HealthBig, Health) { #endif this.netname = "health_big"; this.m_name = _("Big health"); - this.m_icon = "health"; + this.m_icon = "health_big"; this.m_color = '1 0 0'; this.m_waypoint = _("Big health"); +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower +#endif #ifdef SVQC this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_medium); @@ -156,7 +168,11 @@ REGISTER_ITEM(HealthMega, Health) { #endif this.netname = "health_mega"; this.m_name = _("Mega health"); - this.m_icon = "item_mega_health"; + this.m_icon = "health_mega"; +#ifdef CSQC + if(precache_pic(strcat("gfx/hud/luma/", this.m_icon)) == "") + this.m_icon = "item_mega_health"; // compatible with Xonotic v0.8.2 or lower +#endif this.m_color = '1 0 0'; this.m_waypoint = _("Mega health"); this.m_waypointblink = 2;