]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Simplify item definitions
authorTimePath <andrew.hardaker1995@gmail.com>
Tue, 11 Aug 2015 02:28:51 +0000 (12:28 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Tue, 11 Aug 2015 02:31:19 +0000 (12:31 +1000)
qcsrc/common/items/item.qh
qcsrc/common/items/item/ammo.qc
qcsrc/common/items/item/ammo.qh
qcsrc/common/items/item/armor.qc
qcsrc/common/items/item/buff.qc
qcsrc/common/items/item/health.qc
qcsrc/common/items/item/jetpack.qc
qcsrc/common/items/item/powerup.qc
qcsrc/common/items/item/powerup.qh
qcsrc/server/mutators/mutator_instagib_items.qc

index 43231cc1f10b8426b0a5cb2bb9b5040de99472ae..507ca93e029c993f00fccf6132e19213f02d48c7 100644 (file)
@@ -12,9 +12,9 @@ ENDCLASS(GameItem)
 
 int ITEM_COUNT;
 /** If you register a new item, make sure to add it to all.inc */
-#define REGISTER_ITEM(id, class, body)          \
+#define REGISTER_ITEM(id, class)                \
     entity ITEM_##id;                           \
-    void RegisterItems_init_##id(entity this) { body } \
+    void RegisterItems_init_##id(entity this) {} \
     void RegisterItems_##id() {                 \
         entity this = NEW(class);               \
         ITEM_##id = this;                       \
index 276e6bbe6310d1c083ea28669ae82602e24a203a..58f30fb848483ca8438593174e44e3d58592dd92 100644 (file)
@@ -3,67 +3,43 @@
     #include "../../../server/t_items.qh"
 #endif
 
-#define WITH(it) this.m_##it;
-#define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id)                                                      \
-    REGISTER_ITEM(id, Ammo, LAMBDA(                                     \
-        IF(SV, CONFIGURE                                                \
-        ,   respawntime         =       GET(g_pickup_respawntime_ammo)  \
-        ,   respawntimejitter   = GET(g_pickup_respawntimejitter_ammo)  \
-        )                                                               \
-    ))
-
-DEFINE(Bullets) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/a_bullets.mdl"
-    ,   name                =   "bullets"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   2000
-    ,   itemid              =   IT_NAILS
-    )
+REGISTER_ITEM(Bullets, Ammo) {
+    this.m_model    =   "models/items/a_bullets.mdl";
+    this.m_name     =   "bullets";
+#ifdef SVQC
+    this.m_botvalue =   2000;
+    this.m_itemid   =   IT_NAILS;
+#endif
 }
-DEFINE(Cells) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/a_cells.md3"
-    ,   name                =   "cells"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   2000
-    ,   itemid              =   IT_CELLS
-    )
+REGISTER_ITEM(Cells, Ammo) {
+    this.m_model    =   "models/items/a_cells.md3";
+    this.m_name     =   "cells";
+#ifdef SVQC
+    this.m_botvalue =   2000;
+    this.m_itemid   =   IT_CELLS;
+#endif
 }
-DEFINE(Plasma) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/a_cells.md3"
-    ,   name                =   "plasma"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   2000
-    ,   itemid              =   IT_PLASMA
-    )
+REGISTER_ITEM(Plasma, Ammo) {
+    this.m_model    =   "models/items/a_cells.md3";
+    this.m_name     =   "plasma";
+#ifdef SVQC
+    this.m_botvalue =   2000;
+    this.m_itemid   =   IT_PLASMA;
+#endif
 }
-DEFINE(Rockets) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/a_rockets.md3"
-    ,   name                =   "rockets"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   3000
-    ,   itemid              =   IT_ROCKETS
-    )
+REGISTER_ITEM(Rockets, Ammo) {
+    this.m_model    =   "models/items/a_rockets.md3";
+    this.m_name     =   "rockets";
+#ifdef SVQC
+    this.m_botvalue =   3000;
+    this.m_itemid   =   IT_ROCKETS;
+#endif
 }
-DEFINE(Shells) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/a_shells.md3"
-    ,   name                =   "shells"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   500
-    ,   itemid              =   IT_SHELLS
-    )
+REGISTER_ITEM(Shells, Ammo) {
+    this.m_model    =   "models/items/a_shells.md3";
+    this.m_name     =   "shells";
+#ifdef SVQC
+    this.m_botvalue =   500;
+    this.m_itemid   =   IT_SHELLS;
+#endif
 }
-
-#undef WITH
-#undef CONFIGURE
-#undef DEFINE
index 41e2ac831c25b1dca2e7b1a54d635cf9864eb666..84f20483e4f2902d65cc325ee8d0f0ca31d0509b 100644 (file)
@@ -4,6 +4,8 @@
 CLASS(Ammo, Pickup)
 #ifdef SVQC
     ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc)
+    ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo))
+    ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo))
 #endif
 ENDCLASS(Ammo)
 #endif
index 295ff117ede61ba415595a536af0f3942ddab511..0db9d1f70e8bf0f75344125ca0268512949763f1 100644 (file)
@@ -3,66 +3,50 @@
     #include "../../../server/t_items.qh"
 #endif
 
-#define WITH(it) this.m_##it;
-#define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id) REGISTER_ITEM(id, Armor, )
-
-DEFINE(ArmorSmall) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/item_armor_small.md3"
-    ,   sound               =   "misc/armor1.wav"
-    ,   name                =   "5 Armor"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_LOW
-    ,   itemid              =   IT_ARMOR_SHARD
-    ,   respawntime         =         GET(g_pickup_respawntime_short)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_short)
-    )
+REGISTER_ITEM(ArmorSmall, Armor) {
+    this.m_model                =   "models/items/item_armor_small.md3";
+    this.m_sound                =   "misc/armor1.wav";
+    this.m_name                 =   "5 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
+    this.m_itemid               =   IT_ARMOR_SHARD;
+    this.m_respawntime          =   GET(g_pickup_respawntime_short);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
+#endif
 }
 
-DEFINE(ArmorMedium) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/item_armor_medium.md3"
-    ,   sound               =   "misc/armor10.wav"
-    ,   name                =   "25 Armor"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_MID
-    ,   itemid              =   IT_ARMOR
-    ,   respawntime         =         GET(g_pickup_respawntime_medium)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_medium)
-    )
+REGISTER_ITEM(ArmorMedium, Armor) {
+    this.m_model                =   "models/items/item_armor_medium.md3";
+    this.m_sound                =   "misc/armor10.wav";
+    this.m_name                 =   "25 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_MID;
+    this.m_itemid               =   IT_ARMOR;
+    this.m_respawntime          =   GET(g_pickup_respawntime_medium);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_medium);
+#endif
 }
 
-DEFINE(ArmorBig) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/item_armor_big.md3"
-    ,   sound               =   "misc/armor17_5.wav"
-    ,   name                =   "50 Armor"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   20000 // FIXME: higher than BOT_PICKUP_RATING_HIGH?
-    ,   itemid              =   IT_ARMOR
-    ,   respawntime         =         GET(g_pickup_respawntime_long)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_long)
-    )
+REGISTER_ITEM(ArmorBig, Armor) {
+    this.m_model                =   "models/items/item_armor_big.md3";
+    this.m_sound                =   "misc/armor17_5.wav";
+    this.m_name                 =   "50 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   20000; // FIXME: higher than BOT_PICKUP_RATING_HIGH?
+    this.m_itemid               =   IT_ARMOR;
+    this.m_respawntime          =   GET(g_pickup_respawntime_long);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
+#endif
 }
 
-DEFINE(ArmorLarge) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/item_armor_large.md3"
-    ,   sound               =   "misc/armor25.wav"
-    ,   name                =   "100 Armor"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_HIGH
-    ,   itemid              =   IT_ARMOR
-    ,   respawntime         =         GET(g_pickup_respawntime_long)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_long)
-    )
+REGISTER_ITEM(ArmorLarge, Armor) {
+    this.m_model                =   "models/items/item_armor_large.md3";
+    this.m_sound                =   "misc/armor25.wav";
+    this.m_name                 =   "100 Armor";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_HIGH;
+    this.m_itemid               =   IT_ARMOR;
+    this.m_respawntime          =   GET(g_pickup_respawntime_long);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
+#endif
 }
-
-#undef WITH
-#undef CONFIGURE
-#undef DEFINE
index 27a9b9ecdfb14efa1b183edfd6cc2c0338bac24c..1cad2f2a9b7eee3d9c03be7e0c9021ec0de8a684 100644 (file)
@@ -1,3 +1,3 @@
 #include "buff.qh"
 
-REGISTER_ITEM(DefaultBuff, Buff);
+REGISTER_ITEM(DefaultBuff, Buff);
index bd055869094ae11c9888deae16efc14ebb7eb610..4867273a614799c8d266327edcb3bc33f7eb7a3c 100644 (file)
@@ -3,66 +3,50 @@
     #include "../../../server/t_items.qh"
 #endif
 
-#define WITH(it) this.m_##it;
-#define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id) REGISTER_ITEM(id, Health, )
-
-DEFINE(HealthSmall)  {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_h1.md3"
-    ,   sound               =   "misc/minihealth.wav"
-    ,   name                =   "5 Health"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_LOW
-    ,   itemid              =   IT_5HP
-    ,   respawntime         =         GET(g_pickup_respawntime_short)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_short)
-    )
+REGISTER_ITEM(HealthSmall, Health) {
+    this.m_model                =   "models/items/g_h1.md3";
+    this.m_sound                =   "misc/minihealth.wav";
+    this.m_name                 =   "5 Health";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
+    this.m_itemid               =   IT_5HP;
+    this.m_respawntime          =   GET(g_pickup_respawntime_short);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
+#endif
 }
 
-DEFINE(HealthMedium) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_h25.md3"
-    ,   sound               =   "misc/mediumhealth.wav"
-    ,   name                =   "25 Health"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_MID
-    ,   itemid              =   IT_25HP
-    ,   respawntime         =         GET(g_pickup_respawntime_short)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_short)
-    )
+REGISTER_ITEM(HealthMedium, Health) {
+    this.m_model                =   "models/items/g_h25.md3";
+    this.m_sound                =   "misc/mediumhealth.wav";
+    this.m_name                 =   "25 Health";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_MID;
+    this.m_itemid               =   IT_25HP;
+    this.m_respawntime          =   GET(g_pickup_respawntime_short);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
+#endif
 }
 
-DEFINE(HealthLarge) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_h50.md3"
-    ,   sound               =   "misc/mediumhealth.wav"
-    ,   name                =   "50 Health"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_MID
-    ,   itemid              =   IT_25HP
-    ,   respawntime         =         GET(g_pickup_respawntime_medium)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_medium)
-    )
+REGISTER_ITEM(HealthLarge, Health) {
+    this.m_model                =   "models/items/g_h50.md3";
+    this.m_sound                =   "misc/mediumhealth.wav";
+    this.m_name                 =   "50 Health";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_MID;
+    this.m_itemid               =   IT_25HP;
+    this.m_respawntime          =   GET(g_pickup_respawntime_medium);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_medium);
+#endif
 }
 
-DEFINE(HealthMega) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_h100.md3"
-    ,   sound               =   "misc/megahealth.wav"
-    ,   name                =   "100 Health"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_HIGH
-    ,   itemid              =   IT_HEALTH
-    ,   respawntime         =         GET(g_pickup_respawntime_long)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_long)
-    )
+REGISTER_ITEM(HealthMega, Health) {
+    this.m_model                =   "models/items/g_h100.md3";
+    this.m_sound                =   "misc/megahealth.wav";
+    this.m_name                 =   "100 Health";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_HIGH;
+    this.m_itemid               =   IT_HEALTH;
+    this.m_respawntime          =   GET(g_pickup_respawntime_long);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
+#endif
 }
-
-#undef WITH
-#undef CONFIGURE
-#undef DEFINE
index 45a256b1bbe4919876e2288a90ee9dd5b3467acc..ad4ab2d0df48bf0c95b653dd778f1c0ad882495e 100644 (file)
@@ -3,54 +3,40 @@
     #include "../../../server/constants.qh"
 #endif
 
-#define WITH(it) this.m_##it;
-#define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id) REGISTER_ITEM(id, Pickup, )
-
-DEFINE(Jetpack) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_jetpack.md3"
-    ,   name                =   "Jet pack"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_LOW
-    ,   itemflags           =   FL_POWERUP
-    ,   itemid              =   IT_JETPACK
-    ,   pickupevalfunc      =   commodity_pickupevalfunc
-    ,   respawntime         =         GET(g_pickup_respawntime_powerup)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_powerup)
-    )
+REGISTER_ITEM(Jetpack, Pickup) {
+    this.m_model                =   "models/items/g_jetpack.md3";
+    this.m_name                 =   "Jet pack";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
+    this.m_itemflags            =   FL_POWERUP;
+    this.m_itemid               =   IT_JETPACK;
+    this.m_pickupevalfunc       =   commodity_pickupevalfunc;
+    this.m_respawntime          =   GET(g_pickup_respawntime_powerup);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_powerup);
+#endif
 }
 
-DEFINE(JetpackFuel) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_fuel.md3"
-    ,   name                =   "Fuel"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_LOW
-    ,   itemid              =   IT_FUEL
-    ,   pickupevalfunc      =   commodity_pickupevalfunc
-    ,   respawntime         =         GET(g_pickup_respawntime_ammo)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_ammo)
-    )
+REGISTER_ITEM(JetpackFuel, Pickup) {
+    this.m_model                =   "models/items/g_fuel.md3";
+    this.m_name                 =   "Fuel";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
+    this.m_itemid               =   IT_FUEL;
+    this.m_pickupevalfunc       =   commodity_pickupevalfunc;
+    this.m_respawntime          =   GET(g_pickup_respawntime_ammo);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_ammo);
+#endif
 }
 
-DEFINE(JetpackRegen) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_fuelregen.md3"
-    ,   name                =   "Fuel regenerator"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_LOW
-    ,   itemflags           =   FL_POWERUP
-    ,   itemid              =   IT_FUEL_REGEN
-    ,   pickupevalfunc      =   commodity_pickupevalfunc
-    ,   respawntime         =         GET(g_pickup_respawntime_powerup)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_powerup)
-    )
+REGISTER_ITEM(JetpackRegen, Pickup) {
+    this.m_model                =   "models/items/g_fuelregen.md3";
+    this.m_name                 =   "Fuel regenerator";
+#ifdef SVQC
+    this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
+    this.m_itemflags            =   FL_POWERUP;
+    this.m_itemid               =   IT_FUEL_REGEN;
+    this.m_pickupevalfunc       =   commodity_pickupevalfunc;
+    this.m_respawntime          =   GET(g_pickup_respawntime_powerup);
+    this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_powerup);
+#endif
 }
-
-#undef WITH
-#undef CONFIGURE
-#undef DEFINE
index 86e3a7d66b88a2782ce4273f09fa73ef80c7db22..0f025aed8f5a4ab4ee0282f24343e05077922f3e 100644 (file)
@@ -1,39 +1,19 @@
 #include "powerup.qh"
 #include "../../../server/t_items.qh"
 
-#define WITH(it) this.m_##it;
-#define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id)                                                          \
-    REGISTER_ITEM(id, Ammo, LAMBDA(                                         \
-        IF(SV, CONFIGURE                                                    \
-        ,   botvalue            =   100000                                  \
-        ,   itemflags           =   FL_POWERUP                              \
-        ,   respawntime         =         GET(g_pickup_respawntime_powerup) \
-        ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_powerup) \
-        )                                                                   \
-    ))
-
-DEFINE(Strength) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_strength.md3"
-    ,   sound               =   "misc/powerup.wav"
-    ,   name                =   "Strength Powerup"
-    )
-    IF(SV, CONFIGURE
-    ,   itemid              =   IT_STRENGTH
-    )
+REGISTER_ITEM(Strength, Powerup) {
+    this.m_model    =   "models/items/g_strength.md3";
+    this.m_sound    =   "misc/powerup.wav";
+    this.m_name     =   "Strength Powerup";
+#ifdef SVQC
+    this.m_itemid   =   IT_STRENGTH;
+#endif
 }
-DEFINE(Shield) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_invincible.md3"
-    ,   sound               =   "misc/powerup_shield.wav"
-    ,   name                =   "Shield"
-    )
-    IF(SV, CONFIGURE
-    ,   itemid              =   IT_INVINCIBLE
-    )
+REGISTER_ITEM(Shield, Powerup) {
+    this.m_model    =   "models/items/g_invincible.md3";
+    this.m_sound    =   "misc/powerup_shield.wav";
+    this.m_name     =   "Shield";
+#ifdef SVQC
+    this.m_itemid   =   IT_INVINCIBLE;
+#endif
 }
-
-#undef WITH
-#undef CONFIGURE
-#undef DEFINE
index d27c1e60f62fb2562a8d86defd727917d45bd6a3..d78bd5563e1e6707f8c191bf14294d0dc0582f23 100644 (file)
@@ -1,12 +1,18 @@
+#ifdef SVQC
+    // For FL_POWERUP
+    #include "../../../server/constants.qh"
+#endif
+
 #ifndef POWERUP_H
 #define POWERUP_H
 #include "pickup.qh"
 CLASS(Powerup, Pickup)
-ENDCLASS(Powerup)
-
 #ifdef SVQC
-// For FL_POWERUP
-#include "../../../server/constants.qh"
+    ATTRIB(Powerup, m_botvalue, int, 100000)
+    ATTRIB(Powerup, m_itemflags, int, FL_POWERUP)
+    ATTRIB(Powerup, m_respawntime, float(), GET(g_pickup_respawntime_powerup))
+    ATTRIB(Powerup, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_powerup))
 #endif
+ENDCLASS(Powerup)
 
 #endif
index f2a0050e0ed77593994fa58a615710dc03189126..cd72aee3b403d761a1834f703256c99b17ca24c9 100644 (file)
@@ -8,33 +8,26 @@ float instagib_respawntimejitter_ammo = 0;
 GETTER(float, instagib_respawntime_ammo)
 GETTER(float, instagib_respawntimejitter_ammo)
 
-REGISTER_ITEM(VaporizerCells, Pickup, ) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/a_cells.md3"
-    ,   sound               =   "misc/itempickup.wav"
-    ,   name                =   "Vaporizer Ammo"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   100
-    ,   itemid              =   IT_CELLS
-    ,   respawntime         =         GET(instagib_respawntime_ammo)
-    ,   respawntimejitter   =   GET(instagib_respawntimejitter_ammo)
-    )
+REGISTER_ITEM(VaporizerCells, Ammo) {
+    this.m_model               =   "models/items/a_cells.md3";
+    this.m_sound               =   "misc/itempickup.wav";
+    this.m_name                =   "Vaporizer Ammo";
+#ifdef SVQC
+    this.m_botvalue            =   100;
+    this.m_itemid              =   IT_CELLS;
+    this.m_respawntime         =   GET(instagib_respawntime_ammo);
+    this.m_respawntimejitter   =   GET(instagib_respawntimejitter_ammo);
+#endif
 }
 
-REGISTER_ITEM(ExtraLife, Pickup, ) {
-    APPLY(CONFIGURE
-    ,   model               =   "models/items/g_h100.md3"
-    ,   sound               =   "misc/megahealth.wav"
-    ,   name                =   "Extralife"
-    )
-    IF(SV, CONFIGURE
-    ,   botvalue            =   BOT_PICKUP_RATING_HIGH
-    ,   itemflags           =   FL_POWERUP
-    ,   itemid              =   IT_NAILS
-    ,   respawntime         =         GET(g_pickup_respawntime_powerup)
-    ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_powerup)
-    )
+REGISTER_ITEM(ExtraLife, Powerup) {
+    this.m_model               =   "models/items/g_h100.md3";
+    this.m_sound               =   "misc/megahealth.wav";
+    this.m_name                =   "Extralife";
+#ifdef SVQC
+    this.m_itemid              =   IT_NAILS;
+    this.m_botvalue            =   BOT_PICKUP_RATING_HIGH;
+#endif
 }
 
 #undef WITH