]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add proper health / armor icons (used by the ItemStats and ItemsTime panels)
authorterencehill <piuntn@gmail.com>
Mon, 1 Nov 2021 23:48:18 +0000 (00:48 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 2 Nov 2021 13:04:10 +0000 (14:04 +0100)
gfx/hud/luma/armor_big.tga [new file with mode: 0644]
gfx/hud/luma/armor_medium.tga [new file with mode: 0644]
gfx/hud/luma/armor_mega.tga [new file with mode: 0644]
gfx/hud/luma/armor_small.tga [new file with mode: 0644]
gfx/hud/luma/health_big.tga [new file with mode: 0644]
gfx/hud/luma/health_medium.tga [new file with mode: 0644]
gfx/hud/luma/health_mega.tga [new file with mode: 0644]
gfx/hud/luma/health_small.tga [new file with mode: 0644]
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh

diff --git a/gfx/hud/luma/armor_big.tga b/gfx/hud/luma/armor_big.tga
new file mode 100644 (file)
index 0000000..90158b9
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 (file)
index 0000000..db14921
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 (file)
index 0000000..dcc7340
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 (file)
index 0000000..5a1a736
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 (file)
index 0000000..b2ab22e
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 (file)
index 0000000..eb71018
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 (file)
index 0000000..826d573
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 (file)
index 0000000..af3b6c3
Binary files /dev/null and b/gfx/hud/luma/health_small.tga differ
index e5ae8e36bd3bd1860080dc39f05f1c0552dc8190..f8cabaa0595f08bacfde5fbf9b14c5ffae0654d4 100644 (file)
@@ -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;
index 0d9992f0ec167575abc3a10f54bc67a29b6f8105..ca94651aa328a5e7d314e66c2d0b7906332c1129 100644 (file)
@@ -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;