]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/health.qh
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / health.qh
index 8ceef1ea9c0931db8f97ffde6d33a0c3d8c7a1f5..bc87eb7c44af1788018aef1d6695c7c52ac65b53 100644 (file)
@@ -11,7 +11,7 @@ CLASS(Health, Pickup)
 ENDCLASS(Health)
 
 #ifdef SVQC
-    #include <common/t_items.qh>
+    #include <server/items/items.qh>
 #endif
 
 #ifdef GAMEQC
@@ -26,8 +26,8 @@ void item_healthsmall_init(Pickup this, entity item)
 {
     if(!item.max_health)
         item.max_health = g_pickup_healthsmall_max;
-    if(!GetResourceAmount(item, RESOURCE_HEALTH))
-        SetResourceAmountExplicit(item, RESOURCE_HEALTH, g_pickup_healthsmall);
+    if(!GetResource(item, RES_HEALTH))
+        SetResourceExplicit(item, RES_HEALTH, g_pickup_healthsmall);
 }
 #endif
 
@@ -39,11 +39,11 @@ REGISTER_ITEM(HealthSmall, Health) {
     this.m_sound                =   SND_HealthSmall;
 #endif
     this.netname                =   "health_small";
-    this.m_name                 =   "5 Health";
+    this.m_name                 =   _("Small health");
     this.m_icon                 =   "health";
        this.m_waypoint_icon        =   "waypoint_health";
 #ifdef SVQC
-    this.m_itemid               =   IT_5HP;
+    this.m_itemid               =   IT_RESOURCE;
     this.m_respawntime          =   GET(g_pickup_respawntime_short);
     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
     this.m_pickupanyway         =   GET(g_pickup_healthsmall_anyway);
@@ -65,8 +65,8 @@ void item_healthmedium_init(Pickup this, entity item)
 {
     if(!item.max_health)
         item.max_health = g_pickup_healthmedium_max;
-    if(!GetResourceAmount(item, RESOURCE_HEALTH))
-        SetResourceAmountExplicit(item, RESOURCE_HEALTH, g_pickup_healthmedium);
+    if(!GetResource(item, RES_HEALTH))
+        SetResourceExplicit(item, RES_HEALTH, g_pickup_healthmedium);
 }
 #endif
 
@@ -78,11 +78,11 @@ REGISTER_ITEM(HealthMedium, Health) {
     this.m_sound                =   SND_HealthMedium;
 #endif
     this.netname                =   "health_medium";
-    this.m_name                 =   "25 Health";
+    this.m_name                 =   _("Medium health");
     this.m_icon                 =   "health";
        this.m_waypoint_icon        =   "waypoint_health";
 #ifdef SVQC
-    this.m_itemid               =   IT_25HP;
+    this.m_itemid               =   IT_RESOURCE;
     this.m_respawntime          =   GET(g_pickup_respawntime_short);
     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
     this.m_pickupanyway         =   GET(g_pickup_healthmedium_anyway);
@@ -104,8 +104,8 @@ void item_healthbig_init(Pickup this, entity item)
 {
     if(!item.max_health)
         item.max_health = g_pickup_healthbig_max;
-    if(!GetResourceAmount(item, RESOURCE_HEALTH))
-        SetResourceAmountExplicit(item, RESOURCE_HEALTH, g_pickup_healthbig);
+    if(!GetResource(item, RES_HEALTH))
+        SetResourceExplicit(item, RES_HEALTH, g_pickup_healthbig);
 }
 #endif
 
@@ -117,13 +117,13 @@ REGISTER_ITEM(HealthBig, Health) {
     this.m_sound                =   SND_HealthBig;
 #endif
     this.netname                =   "health_big";
-    this.m_name                 =   "50 Health";
+    this.m_name                 =   _("Big health");
     this.m_icon                 =   "health";
     this.m_color                =   '1 0 0';
        this.m_waypoint_text        =   _("Big health");
        this.m_waypoint_icon        =   "waypoint_health";
 #ifdef SVQC
-    this.m_itemid               =   IT_25HP;
+    this.m_itemid               =   IT_RESOURCE;
     this.m_respawntime          =   GET(g_pickup_respawntime_medium);
     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_medium);
     this.m_pickupanyway         =   GET(g_pickup_healthbig_anyway);
@@ -145,8 +145,8 @@ void item_healthmega_init(Pickup this, entity item)
 {
     if(!item.max_health)
         item.max_health = g_pickup_healthmega_max;
-    if(!GetResourceAmount(item, RESOURCE_HEALTH))
-        SetResourceAmountExplicit(item, RESOURCE_HEALTH, g_pickup_healthmega);
+    if(!GetResource(item, RES_HEALTH))
+        SetResourceExplicit(item, RES_HEALTH, g_pickup_healthmega);
 }
 #endif
 
@@ -158,7 +158,7 @@ REGISTER_ITEM(HealthMega, Health) {
     this.m_sound                =   SND_HealthMega;
 #endif
     this.netname                =   "health_mega";
-    this.m_name                 =   "100 Health";
+    this.m_name                 =   _("Mega health");
     this.m_icon                 =   "item_mega_health";
     this.m_color                =   '1 0 0';
        this.m_waypoint_text        =   _("Mega health");
@@ -166,7 +166,7 @@ REGISTER_ITEM(HealthMega, Health) {
     this.m_waypointblink        =   2;
 #ifdef SVQC
     this.m_maxs                 =   '16 16 70';
-    this.m_itemid               =   IT_HEALTH;
+    this.m_itemid               =   IT_RESOURCE;
     this.m_respawntime          =   GET(g_pickup_respawntime_long);
     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
     this.m_pickupanyway         =   GET(g_pickup_healthmega_anyway);