From: Mario Date: Wed, 15 Feb 2017 00:57:06 +0000 (+1000) Subject: For sanity, give items an identifier name (like all other registries) X-Git-Tag: xonotic-v0.8.2~208 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b17972ee83a3122b78846181c63206a9e26191b2;p=xonotic%2Fxonotic-data.pk3dir.git For sanity, give items an identifier name (like all other registries) --- diff --git a/qcsrc/common/items/item/ammo.qh b/qcsrc/common/items/item/ammo.qh index 15d8e391d..209639285 100644 --- a/qcsrc/common/items/item/ammo.qh +++ b/qcsrc/common/items/item/ammo.qh @@ -34,6 +34,7 @@ REGISTER_ITEM(Bullets, Ammo) { #ifdef GAMEQC this.m_model = MDL_Bullets_ITEM; #endif + this.netname = "bullets"; this.m_name = "bullets"; this.m_icon = "ammo_bullets"; #ifdef SVQC @@ -59,6 +60,7 @@ REGISTER_ITEM(Cells, Ammo) { #ifdef GAMEQC this.m_model = MDL_Cells_ITEM; #endif + this.netname = "cells"; this.m_name = "cells"; this.m_icon = "ammo_cells"; #ifdef SVQC @@ -84,6 +86,7 @@ REGISTER_ITEM(Plasma, Ammo) { #ifdef GAMEQC this.m_model = MDL_Plasma_ITEM; #endif + this.netname = "plasma"; this.m_name = "plasma"; this.m_icon = "ammo_plasma"; #ifdef SVQC @@ -109,6 +112,7 @@ REGISTER_ITEM(Rockets, Ammo) { #ifdef GAMEQC this.m_model = MDL_Rockets_ITEM; #endif + this.netname = "rockets"; this.m_name = "rockets"; this.m_icon = "ammo_rockets"; #ifdef SVQC @@ -134,6 +138,7 @@ REGISTER_ITEM(Shells, Ammo) { #ifdef GAMEQC this.m_model = MDL_Shells_ITEM; #endif + this.netname = "shells"; this.m_name = "shells"; this.m_icon = "ammo_shells"; #ifdef SVQC diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index 6f9c5388e..81d05ad79 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -36,6 +36,7 @@ REGISTER_ITEM(ArmorSmall, Armor) { this.m_model = MDL_ArmorSmall_ITEM; this.m_sound = SND_ArmorSmall; #endif + this.netname = "armor_small"; this.m_name = "5 Armor"; this.m_icon = "armor"; #ifdef SVQC @@ -69,6 +70,7 @@ REGISTER_ITEM(ArmorMedium, Armor) { this.m_model = MDL_ArmorMedium_ITEM; this.m_sound = SND_ArmorMedium; #endif + this.netname = "armor_medium"; this.m_name = "25 Armor"; this.m_icon = "armor"; #ifdef SVQC @@ -102,6 +104,7 @@ REGISTER_ITEM(ArmorBig, Armor) { this.m_model = MDL_ArmorBig_ITEM; this.m_sound = SND_ArmorBig; #endif + this.netname = "armor_big"; this.m_name = "50 Armor"; this.m_icon = "armor"; this.m_color = '0 1 0'; @@ -137,6 +140,7 @@ REGISTER_ITEM(ArmorMega, Armor) { this.m_model = MDL_ArmorMega_ITEM; this.m_sound = SND_ArmorMega; #endif + this.netname = "armor_mega"; this.m_name = "100 Armor"; this.m_icon = "item_large_armor"; this.m_color = '0 1 0'; diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index 01a292418..5a4525157 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -36,6 +36,7 @@ REGISTER_ITEM(HealthSmall, Health) { this.m_model = MDL_HealthSmall_ITEM; this.m_sound = SND_HealthSmall; #endif + this.netname = "health_small"; this.m_name = "5 Health"; this.m_icon = "health"; #ifdef SVQC @@ -69,6 +70,7 @@ REGISTER_ITEM(HealthMedium, Health) { this.m_model = MDL_HealthMedium_ITEM; this.m_sound = SND_HealthMedium; #endif + this.netname = "health_medium"; this.m_name = "25 Health"; this.m_icon = "health"; #ifdef SVQC @@ -102,6 +104,7 @@ REGISTER_ITEM(HealthBig, Health) { this.m_model = MDL_HealthBig_ITEM; this.m_sound = SND_HealthBig; #endif + this.netname = "health_big"; this.m_name = "50 Health"; this.m_icon = "health"; this.m_color = '1 0 0'; @@ -137,6 +140,7 @@ REGISTER_ITEM(HealthMega, Health) { this.m_model = MDL_HealthMega_ITEM; this.m_sound = SND_HealthMega; #endif + this.netname = "health_mega"; this.m_name = "100 Health"; this.m_icon = "item_mega_health"; this.m_color = '1 0 0'; diff --git a/qcsrc/common/items/item/jetpack.qh b/qcsrc/common/items/item/jetpack.qh index 430161d6a..a6d1c8dae 100644 --- a/qcsrc/common/items/item/jetpack.qh +++ b/qcsrc/common/items/item/jetpack.qh @@ -28,6 +28,7 @@ REGISTER_ITEM(Jetpack, Powerup) { this.m_model = MDL_Jetpack_ITEM; this.m_itemid = IT_JETPACK; #endif + this.netname = "jetpack"; this.m_name = "Jet pack"; this.m_icon = "jetpack"; this.m_color = '0.5 0.5 0.5'; @@ -56,6 +57,7 @@ REGISTER_ITEM(JetpackFuel, Ammo) { #ifdef GAMEQC this.m_model = MDL_JetpackFuel_ITEM; #endif + this.netname = "fuel"; this.m_name = "Fuel"; this.m_icon = "ammo_fuel"; #ifdef SVQC @@ -73,6 +75,7 @@ REGISTER_ITEM(JetpackRegen, Powerup) { #ifdef GAMEQC this.m_model = MDL_JetpackRegen_ITEM; #endif + this.netname = "fuel_regen"; this.m_name = "Fuel regenerator"; this.m_icon = "fuelregen"; this.m_color = '1 0.5 0'; diff --git a/qcsrc/common/items/item/pickup.qh b/qcsrc/common/items/item/pickup.qh index d029ca597..dccd36886 100644 --- a/qcsrc/common/items/item/pickup.qh +++ b/qcsrc/common/items/item/pickup.qh @@ -26,6 +26,7 @@ CLASS(Pickup, GameItem) ATTRIB(Pickup, m_model, Model); ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP); #endif + ATTRIB(Pickup, netname, string); ATTRIB(Pickup, m_name, string); METHOD(Pickup, show, void(Pickup this)) { diff --git a/qcsrc/common/items/item/powerup.qh b/qcsrc/common/items/item/powerup.qh index ef0d223b6..41b658c2f 100644 --- a/qcsrc/common/items/item/powerup.qh +++ b/qcsrc/common/items/item/powerup.qh @@ -37,6 +37,7 @@ REGISTER_ITEM(Strength, Powerup) { this.m_glow = true; this.m_respawnsound = SND_STRENGTH_RESPAWN; #endif + this.netname = "strength"; this.m_name = "Strength Powerup"; this.m_icon = "strength"; this.m_color = '0 0 1'; @@ -68,6 +69,7 @@ REGISTER_ITEM(Shield, Powerup) { this.m_glow = true; this.m_respawnsound = SND_SHIELD_RESPAWN; #endif + this.netname = "invincible"; this.m_name = "Shield"; this.m_icon = "shield"; this.m_color = '1 0 1'; diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index 1851f1b67..e80f36e1a 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -27,6 +27,7 @@ REGISTER_ITEM(VaporizerCells, Ammo) { this.m_model = MDL_VaporizerCells_ITEM; this.m_sound = SND_VaporizerCells; #endif + this.netname = "minst_cells"; this.m_name = "Vaporizer Ammo"; this.m_icon = "ammo_supercells"; #ifdef SVQC @@ -48,6 +49,7 @@ REGISTER_ITEM(ExtraLife, Powerup) { this.m_model = MDL_ExtraLife_ITEM; this.m_sound = SND_ExtraLife; #endif + this.netname = "health_mega"; this.m_name = "Extra life"; this.m_icon = "item_mega_health"; this.m_color = '1 0 0'; @@ -66,6 +68,7 @@ REGISTER_ITEM(Invisibility, Powerup) { this.m_model = MDL_Invisibility_ITEM; this.m_sound = SND_Invisibility; #endif + this.netname = "strength"; this.m_name = "Invisibility"; this.m_icon = "strength"; this.m_color = '0 0 1'; @@ -84,6 +87,7 @@ REGISTER_ITEM(Speed, Powerup) { this.m_model = MDL_Speed_ITEM; this.m_sound = SND_Speed; #endif + this.netname = "invincible"; this.m_name = "Speed"; this.m_icon = "shield"; this.m_color = '1 0 1';