From 796eb59bfa36d869e8bf256bfb09ea961c592886 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Fri, 15 Jun 2018 20:47:27 +0300 Subject: [PATCH] Waypoint icons: Updated game items. --- qcsrc/common/items/item.qh | 3 ++- qcsrc/common/items/item/armor.qh | 8 ++++++-- qcsrc/common/items/item/health.qh | 8 ++++++-- qcsrc/common/items/item/jetpack.qh | 6 ++++-- qcsrc/common/items/item/powerup.qh | 6 ++++-- qcsrc/common/mutators/mutator/instagib/items.qh | 9 ++++++--- .../common/mutators/mutator/waypoints/waypointsprites.qc | 4 ++-- 7 files changed, 30 insertions(+), 14 deletions(-) diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index 31b8f43cb..b224c8806 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -84,7 +84,8 @@ CLASS(GameItem, Object) ATTRIB(GameItem, m_name, string); ATTRIB(GameItem, m_icon, string); ATTRIB(GameItem, m_color, vector, '1 1 1'); - ATTRIB(GameItem, m_waypoint, string); + ATTRIB(GameItem, m_waypoint_text, string); + ATTRIB(GameItem, m_waypoint_icon, string); ATTRIB(GameItem, m_waypointblink, int, 1); #ifdef GAMEQC ATTRIB(GameItem, m_glow, bool, false); diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index 880a932d7..165f3ed8c 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -41,6 +41,7 @@ REGISTER_ITEM(ArmorSmall, Armor) { this.netname = "armor_small"; this.m_name = "5 Armor"; this.m_icon = "armor"; + this.m_waypoint_icon = "waypoint_armor"; #ifdef SVQC this.m_itemid = IT_ARMOR_SHARD; this.m_respawntime = GET(g_pickup_respawntime_short); @@ -79,6 +80,7 @@ REGISTER_ITEM(ArmorMedium, Armor) { this.netname = "armor_medium"; this.m_name = "25 Armor"; this.m_icon = "armor"; + this.m_waypoint_icon = "waypoint_armor"; #ifdef SVQC this.m_itemid = IT_ARMOR; this.m_respawntime = GET(g_pickup_respawntime_medium); @@ -118,7 +120,8 @@ REGISTER_ITEM(ArmorBig, Armor) { this.m_name = "50 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_respawntime = GET(g_pickup_respawntime_long); @@ -158,7 +161,8 @@ REGISTER_ITEM(ArmorMega, Armor) { this.m_name = "100 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'; diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index 6a5ffc5ca..059e8bb23 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -41,6 +41,7 @@ REGISTER_ITEM(HealthSmall, Health) { this.netname = "health_small"; this.m_name = "5 Health"; this.m_icon = "health"; + this.m_waypoint_icon = "waypoint_health"; #ifdef SVQC this.m_itemid = IT_5HP; this.m_respawntime = GET(g_pickup_respawntime_short); @@ -79,6 +80,7 @@ REGISTER_ITEM(HealthMedium, Health) { this.netname = "health_medium"; this.m_name = "25 Health"; this.m_icon = "health"; + this.m_waypoint_icon = "waypoint_health"; #ifdef SVQC this.m_itemid = IT_25HP; this.m_respawntime = GET(g_pickup_respawntime_short); @@ -118,7 +120,8 @@ REGISTER_ITEM(HealthBig, Health) { this.m_name = "50 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_respawntime = GET(g_pickup_respawntime_medium); @@ -158,7 +161,8 @@ REGISTER_ITEM(HealthMega, Health) { this.m_name = "100 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'; diff --git a/qcsrc/common/items/item/jetpack.qh b/qcsrc/common/items/item/jetpack.qh index c56d682fe..e19eb49f2 100644 --- a/qcsrc/common/items/item/jetpack.qh +++ b/qcsrc/common/items/item/jetpack.qh @@ -38,7 +38,8 @@ REGISTER_ITEM(Jetpack, Powerup) { 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; @@ -96,7 +97,8 @@ REGISTER_ITEM(JetpackRegen, JetpackRegen) { 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; diff --git a/qcsrc/common/items/item/powerup.qh b/qcsrc/common/items/item/powerup.qh index 1c10afa48..a6f3519fa 100644 --- a/qcsrc/common/items/item/powerup.qh +++ b/qcsrc/common/items/item/powerup.qh @@ -43,7 +43,8 @@ REGISTER_ITEM(Strength, Powerup) { this.m_name = "Strength Powerup"; 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; this.m_itemid = IT_STRENGTH; #ifdef SVQC @@ -79,7 +80,8 @@ REGISTER_ITEM(Shield, Powerup) { 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; this.m_itemid = IT_INVINCIBLE; #ifdef SVQC diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index 95f4f3210..4d6ec3109 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -59,7 +59,8 @@ REGISTER_ITEM(ExtraLife, Powerup) { 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; } @@ -91,7 +92,8 @@ REGISTER_ITEM(Invisibility, Powerup) { 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; this.m_itemid = IT_STRENGTH; #ifdef SVQC @@ -126,7 +128,8 @@ REGISTER_ITEM(Speed, Powerup) { 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; this.m_itemid = IT_INVINCIBLE; #ifdef SVQC diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 1eebd8ed8..30b41637c 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -243,7 +243,7 @@ string spritelookuptext(entity this, string s) 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; + if (s == WP_Item.netname) return Items_from(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)) { @@ -262,7 +262,7 @@ 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_Item.netname) return Items_from(this.wp_extra).m_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_Monster.netname) return get_monsterinfo(this.wp_extra).m_icon; if (MUTATOR_CALLHOOK(WP_Format, this, s)) -- 2.39.2