]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/WaypointIcons
authorMario <mario.mario@y7mail.com>
Sun, 9 Aug 2020 12:49:56 +0000 (22:49 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 9 Aug 2020 12:49:56 +0000 (22:49 +1000)
18 files changed:
1  2 
qcsrc/common/items/item.qh
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh
qcsrc/common/items/item/jetpack.qh
qcsrc/common/items/item/powerup.qh
qcsrc/common/mutators/mutator/instagib/items.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/blaster.qh
qcsrc/common/weapons/weapon/crylink.qh
qcsrc/common/weapons/weapon/devastator.qh
qcsrc/common/weapons/weapon/electro.qh
qcsrc/common/weapons/weapon/hagar.qh
qcsrc/common/weapons/weapon/machinegun.qh
qcsrc/common/weapons/weapon/minelayer.qh
qcsrc/common/weapons/weapon/mortar.qh
qcsrc/common/weapons/weapon/shotgun.qh
qcsrc/common/weapons/weapon/vortex.qh

Simple merge
index 3591a66e835e713da8d7bb948ae138c2afc453ed,e5ae8e36bd3bd1860080dc39f05f1c0552dc8190..b5a784986f343f135475c939b8da1d21d2ed2ff7
@@@ -39,11 -39,10 +39,11 @@@ REGISTER_ITEM(ArmorSmall, Armor) 
      this.m_sound                =   SND_ArmorSmall;
  #endif
      this.netname                =   "armor_small";
-     this.m_name                 =   "5 Armor";
+     this.m_name                 =   _("Small armor");
      this.m_icon                 =   "armor";
 +      this.m_waypoint_icon        =   "waypoint_armor";
  #ifdef SVQC
-     this.m_itemid               =   IT_ARMOR_SHARD;
+     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_armorsmall_anyway);
@@@ -78,11 -77,10 +78,11 @@@ REGISTER_ITEM(ArmorMedium, Armor) 
      this.m_sound                =   SND_ArmorMedium;
  #endif
      this.netname                =   "armor_medium";
-     this.m_name                 =   "25 Armor";
+     this.m_name                 =   _("Medium armor");
      this.m_icon                 =   "armor";
 +      this.m_waypoint_icon        =   "waypoint_armor";
  #ifdef SVQC
-     this.m_itemid               =   IT_ARMOR;
+     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_armormedium_anyway);
@@@ -117,13 -115,12 +117,13 @@@ REGISTER_ITEM(ArmorBig, Armor) 
      this.m_sound                =   SND_ArmorBig;
  #endif
      this.netname                =   "armor_big";
-     this.m_name                 =   "50 Armor";
+     this.m_name                 =   _("Big armor");
      this.m_icon                 =   "armor";
      this.m_color                =   '0 1 0';
 -    this.m_waypoint             =   _("Big armor");
 +      this.m_waypoint_text        =   _("Big armor");
 +      this.m_waypoint_icon        =   "waypoint_armor";
  #ifdef SVQC
-     this.m_itemid               =   IT_ARMOR;
+     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_armorbig_anyway);
@@@ -158,11 -155,10 +158,11 @@@ REGISTER_ITEM(ArmorMega, Armor) 
      this.m_sound                =   SND_ArmorMega;
  #endif
      this.netname                =   "armor_mega";
-     this.m_name                 =   "100 Armor";
+     this.m_name                 =   _("Mega armor");
      this.m_icon                 =   "item_large_armor";
      this.m_color                =   '0 1 0';
 -    this.m_waypoint             =   _("Mega armor");
 +      this.m_waypoint_text        =   _("Mega armor");
 +      this.m_waypoint_icon        =   "waypoint_armor_mega";
      this.m_waypointblink        =   2;
  #ifdef SVQC
      this.m_maxs                 =   '16 16 70';
index 8ceef1ea9c0931db8f97ffde6d33a0c3d8c7a1f5,27f5dafc6e2019e9d8ac13669e323a18451dd11c..bc87eb7c44af1788018aef1d6695c7c52ac65b53
@@@ -39,11 -39,10 +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);
@@@ -78,11 -77,10 +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);
@@@ -117,13 -115,12 +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             =   _("Big health");
 +      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);
@@@ -158,11 -155,10 +158,11 @@@ 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             =   _("Mega health");
 +      this.m_waypoint_text        =   _("Mega health");
 +      this.m_waypoint_icon        =   "waypoint_health_mega";
      this.m_waypointblink        =   2;
  #ifdef SVQC
      this.m_maxs                 =   '16 16 70';
index c9387830efe6babedcbe7d48101cecbdb9e3877b,962f16170b8d7268f7d7cd9ff79e6d77f2ed9b68..c8c30cb1c113b883c9011e61a365d5f2e12c6c58
@@@ -35,11 -35,10 +35,11 @@@ REGISTER_ITEM(Jetpack, Powerup) 
      this.m_itemid               =   IT_JETPACK;
  #endif
      this.netname                =   "jetpack";
-     this.m_name                 =   "Jetpack";
+     this.m_name                 =   _("Jetpack");
      this.m_icon                 =   "jetpack";
      this.m_color                =   '0.5 0.5 0.5';
 -    this.m_waypoint             =   _("Jetpack");
 +    this.m_waypoint_text        =   _("Jetpack");
 +    this.m_waypoint_icon        =   "waypoint_jetpack";
      this.m_waypointblink        =   2;
  #ifdef SVQC
      this.m_botvalue             =   3000;
@@@ -94,11 -93,10 +94,11 @@@ REGISTER_ITEM(JetpackRegen, JetpackRege
      this.m_model                =   MDL_JetpackRegen_ITEM;
  #endif
      this.netname                =   "fuel_regen";
-     this.m_name                 =   "Fuel regenerator";
+     this.m_name                 =   _("Fuel regenerator");
      this.m_icon                 =   "fuelregen";
      this.m_color                =   '1 0.5 0';
 -    this.m_waypoint             =   _("Fuel regen");
 +    this.m_waypoint_text        =   _("Fuel regen");
 +    this.m_waypoint_icon        =   "waypoint_fuel_regen";
      this.m_waypointblink        =   2;
  #ifdef SVQC
      this.m_botvalue             =   3000;
index 9e47a3d52698320adaea9d079d4a85bd3fa8e3d5,bf4727a79fdba674faedc71be9c98414754914a2..b698ea41485464e58e6d88c75bc94d38cb78e8a7
@@@ -40,13 -40,14 +40,15 @@@ REGISTER_ITEM(Strength, Powerup) 
      this.m_respawnsound     =   SND_STRENGTH_RESPAWN;
  #endif
      this.netname            =   "strength";
-     this.m_name             =   "Strength Powerup";
+     this.m_name             =   _("Strength");
      this.m_icon             =   "strength";
      this.m_color            =   '0 0 1';
 -    this.m_waypoint         =   _("Strength");
 +      this.m_waypoint_text    =   _("Strength");
 +      this.m_waypoint_icon    =   "waypoint_strength";
      this.m_waypointblink    =   2;
+ #ifdef GAMEQC
      this.m_itemid           =   IT_STRENGTH;
+ #endif
  #ifdef SVQC
      this.m_iteminit         =   powerup_strength_init;
  #endif
@@@ -77,13 -78,14 +79,15 @@@ REGISTER_ITEM(Shield, Powerup) 
      this.m_respawnsound     =   SND_SHIELD_RESPAWN;
  #endif
      this.netname            =   "invincible";
-     this.m_name             =   "Shield";
+     this.m_name             =   _("Shield");
      this.m_icon             =   "shield";
      this.m_color            =   '1 0 1';
 -    this.m_waypoint         =   _("Shield");
 +      this.m_waypoint_text    =   _("Shield");
 +      this.m_waypoint_icon    =   "waypoint_shield";
      this.m_waypointblink    =   2;
+ #ifdef GAMEQC
      this.m_itemid           =   IT_INVINCIBLE;
+ #endif
  #ifdef SVQC
      this.m_iteminit         =   powerup_shield_init;
  #endif
index 13c61e6fce6ea53111659f9b7edfc82e76160b27,4724eda1735f5c37c80989854c4fe2ce0c2c71bc..6adda9e1958b1331336a319ca83f3d3894b56ddd
@@@ -56,13 -56,14 +56,15 @@@ REGISTER_ITEM(ExtraLife, Powerup) 
      this.m_sound                =   SND_ExtraLife;
  #endif
      this.netname                =   "extralife";
-     this.m_name                 =   "Extra life";
+     this.m_name                 =   _("Extra life");
      this.m_icon                 =   "item_mega_health";
      this.m_color                =   '1 0 0';
 -    this.m_waypoint             =   _("Extra life");
 +      this.m_waypoint_text        =   _("Extra life");
 +      this.m_waypoint_icon        =   "waypoint_health_mega";
      this.m_waypointblink        =   2;
-     this.m_itemid               =   IT_NAILS;
+ #ifdef SVQC
+     this.m_itemid               =   IT_RESOURCE;
+ #endif
  }
  
  SPAWNFUNC_ITEM(item_extralife, ITEM_ExtraLife)
@@@ -89,13 -90,14 +91,15 @@@ REGISTER_ITEM(Invisibility, Powerup) 
      this.m_respawnsound     =   SND_STRENGTH_RESPAWN;
  #endif
      this.netname            =   "invisibility";
-     this.m_name             =   "Invisibility";
+     this.m_name             =   _("Invisibility");
      this.m_icon             =   "strength";
      this.m_color            =   '0 0 1';
 -    this.m_waypoint         =   _("Invisibility");
 +      this.m_waypoint_text    =   _("Invisibility");
 +      this.m_waypoint_icon    =   "waypoint_invisibility";
      this.m_waypointblink    =   2;
+ #ifdef GAMEQC
      this.m_itemid           =   IT_STRENGTH;
+ #endif
  #ifdef SVQC
      this.m_iteminit         =   powerup_invisibility_init;
  #endif
@@@ -125,13 -127,14 +129,15 @@@ REGISTER_ITEM(Speed, Powerup) 
      this.m_respawnsound     =   SND_SHIELD_RESPAWN;
  #endif
      this.netname            =   "speed";
-     this.m_name             =   "Speed";
+     this.m_name             =   _("Speed");
      this.m_icon             =   "shield";
      this.m_color            =   '1 0 1';
 -    this.m_waypoint         =   _("Speed");
 +      this.m_waypoint_text    =   _("Speed");
 +      this.m_waypoint_icon    =   "waypoint_speed";
      this.m_waypointblink    =   2;
+ #ifdef GAMEQC
      this.m_itemid           =   IT_INVINCIBLE;
+ #endif
  #ifdef SVQC
      this.m_iteminit         =   powerup_speed_init;
  #endif
index fd46a712f9b827311eb49eb8ab24b2ba0d08af7d,bb6a68863793cb707c6d4e790bbace6a13ae6f89..ae4db057af657891623be5e1a264dd2b29048c54
@@@ -242,8 -238,8 +238,8 @@@ string spritelookuptext(entity this, st
        if(autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
                return "Spam"; // no need to translate this debug string
      if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
-     if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_name;
-       if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint_text;
+     if (s == WP_Weapon.netname) return REGISTRY_GET(Weapons, this.wp_extra).m_name;
 -    if (s == WP_Item.netname) return REGISTRY_GET(Items, this.wp_extra).m_waypoint;
++    if (s == WP_Item.netname) return REGISTRY_GET(Items, this.wp_extra).m_waypoint_text;
      if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).monster_name;
      if (MUTATOR_CALLHOOK(WP_Format, this, s))
      {
  string spritelookupicon(entity this, string s)
  {
      // TODO: needs icons! //if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
-     //if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).model2;
-       if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_waypoint_icon;
-       if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint_icon;
-     if (s == WP_Vehicle.netname) return Vehicles_from(this.wp_extra).m_icon;
 -    if (s == WP_Weapon.netname) return REGISTRY_GET(Weapons, this.wp_extra).model2;
 -    if (s == WP_Item.netname) return REGISTRY_GET(Items, this.wp_extra).m_icon;
++    //if (s == WP_Weapon.netname) return REGISTRY_GET(Weapons, this.wp_extra).model2;
++    if (s == WP_Weapon.netname) return REGISTRY_GET(Weapons, this.wp_extra).m_waypoint_icon;
++    if (s == WP_Item.netname) return REGISTRY_GET(Items, this.wp_extra).m_waypoint_icon;
+     if (s == WP_Vehicle.netname) return REGISTRY_GET(Vehicles, this.wp_extra).m_icon;
      //if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).m_icon;
      if (MUTATOR_CALLHOOK(WP_Format, this, s))
      {
@@@ -427,17 -422,10 +423,17 @@@ vector drawsprite_TextOrIcon(bool is_te
  
      o.x += 0.5 * (w - sw);
  
 -    if (is_text)
 -        drawstring(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
 -    else
 -        drawpic(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
 +      if (is_text)
 +      {
 +              drawstring(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
 +      }
 +      else
 +      {
 +              drawpic(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
-               // https://docs.gimp.org/en/gimp-tool-desaturate.html
++              // https://docs.gimp.org/2.8/en/gimp-tool-desaturate.html
 +              //float gray = rgb.x * 0.21 + rgb.y * 0.72 + rgb.z * 0.07;
 +              //drawpic(o, str, sz, '1 1 1', gray * a, DRAWFLAG_ADDITIVE);
 +      }
  
      o.x += 0.5 * sw;
      o.y += 0.5 * h;
Simple merge
Simple merge
Simple merge
Simple merge