]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/mutator_instagib_items.qc
Simplify item definitions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_instagib_items.qc
1 #include "../../common/items/item.qh"
2
3 #define WITH(it) this.m_##it;
4 #define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
5
6 float instagib_respawntime_ammo = 45;
7 float instagib_respawntimejitter_ammo = 0;
8 GETTER(float, instagib_respawntime_ammo)
9 GETTER(float, instagib_respawntimejitter_ammo)
10
11 REGISTER_ITEM(VaporizerCells, Ammo) {
12     this.m_model               =   "models/items/a_cells.md3";
13     this.m_sound               =   "misc/itempickup.wav";
14     this.m_name                =   "Vaporizer Ammo";
15 #ifdef SVQC
16     this.m_botvalue            =   100;
17     this.m_itemid              =   IT_CELLS;
18     this.m_respawntime         =   GET(instagib_respawntime_ammo);
19     this.m_respawntimejitter   =   GET(instagib_respawntimejitter_ammo);
20 #endif
21 }
22
23 REGISTER_ITEM(ExtraLife, Powerup) {
24     this.m_model               =   "models/items/g_h100.md3";
25     this.m_sound               =   "misc/megahealth.wav";
26     this.m_name                =   "Extralife";
27 #ifdef SVQC
28     this.m_itemid              =   IT_NAILS;
29     this.m_botvalue            =   BOT_PICKUP_RATING_HIGH;
30 #endif
31 }
32
33 #undef WITH
34 #undef CONFIGURE