]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/ammo.qc
Adjust item definition syntax
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / ammo.qc
index 032fcc3feaaca2c43187d1815d0691f92241c12a..276e6bbe6310d1c083ea28669ae82602e24a203a 100644 (file)
@@ -5,65 +5,64 @@
 
 #define WITH(it) this.m_##it;
 #define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
-#define DEFINE(id, ...)                                                 \
+#define DEFINE(id)                                                      \
     REGISTER_ITEM(id, Ammo, LAMBDA(                                     \
         IF(SV, CONFIGURE                                                \
         ,   respawntime         =       GET(g_pickup_respawntime_ammo)  \
         ,   respawntimejitter   = GET(g_pickup_respawntimejitter_ammo)  \
         )                                                               \
-        UNWORDS(__VA_ARGS__)                                            \
     ))
 
-DEFINE(Bullets
-    ,APPLY(CONFIGURE
+DEFINE(Bullets) {
+    APPLY(CONFIGURE
     ,   model               =   "models/items/a_bullets.mdl"
     ,   name                =   "bullets"
     )
-    ,IF(SV, CONFIGURE
+    IF(SV, CONFIGURE
     ,   botvalue            =   2000
     ,   itemid              =   IT_NAILS
     )
-)
-DEFINE(Cells
-    ,APPLY(CONFIGURE
+}
+DEFINE(Cells) {
+    APPLY(CONFIGURE
     ,   model               =   "models/items/a_cells.md3"
     ,   name                =   "cells"
     )
-    ,IF(SV, CONFIGURE
+    IF(SV, CONFIGURE
     ,   botvalue            =   2000
     ,   itemid              =   IT_CELLS
     )
-)
-DEFINE(Plasma
-    ,APPLY(CONFIGURE
+}
+DEFINE(Plasma) {
+    APPLY(CONFIGURE
     ,   model               =   "models/items/a_cells.md3"
     ,   name                =   "plasma"
     )
-    ,IF(SV, CONFIGURE
+    IF(SV, CONFIGURE
     ,   botvalue            =   2000
     ,   itemid              =   IT_PLASMA
     )
-)
-DEFINE(Rockets
-    ,APPLY(CONFIGURE
+}
+DEFINE(Rockets) {
+    APPLY(CONFIGURE
     ,   model               =   "models/items/a_rockets.md3"
     ,   name                =   "rockets"
     )
-    ,IF(SV, CONFIGURE
+    IF(SV, CONFIGURE
     ,   botvalue            =   3000
     ,   itemid              =   IT_ROCKETS
     )
-)
-DEFINE(Shells
-    ,APPLY(CONFIGURE
+}
+DEFINE(Shells) {
+    APPLY(CONFIGURE
     ,   model               =   "models/items/a_shells.md3"
     ,   name                =   "shells"
     )
-    ,IF(SV, CONFIGURE
+    IF(SV, CONFIGURE
     ,   botvalue            =   500
     ,   itemid              =   IT_SHELLS
     )
-)
+}
 
 #undef WITH
 #undef CONFIGURE