]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/instagib/items.qh
Add a wrapper for item sounds, so they can be easily replaced like weapon sounds...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / items.qh
1 #pragma once
2
3 #include <common/items/_mod.qh>
4 #include <common/items/item/ammo.qh>
5 #include <common/items/item/powerup.qh>
6
7 float instagib_respawntime_ammo = 45;
8 float instagib_respawntimejitter_ammo = 0;
9 GETTER(float, instagib_respawntime_ammo)
10 GETTER(float, instagib_respawntimejitter_ammo)
11
12 #ifdef GAMEQC
13 MODEL(VaporizerCells_ITEM, Item_Model("a_cells.md3"));
14 SOUND(VaporizerCells, Item_Sound("itempickup"));
15 #endif
16
17 REGISTER_ITEM(VaporizerCells, Ammo) {
18 #ifdef GAMEQC
19     this.m_model                =   MDL_VaporizerCells_ITEM;
20     this.m_sound                =   SND_VaporizerCells;
21 #endif
22     this.m_name                 =   "Vaporizer Ammo";
23     this.m_icon                 =   "ammo_supercells";
24 #ifdef SVQC
25     this.m_botvalue             =   100;
26     this.m_itemid               =   IT_CELLS;
27     this.m_respawntime          =   GET(instagib_respawntime_ammo);
28     this.m_respawntimejitter    =   GET(instagib_respawntimejitter_ammo);
29 #endif
30 }
31
32 #ifdef GAMEQC
33 MODEL(ExtraLife_ITEM, Item_Model("g_h100.md3"));
34 SOUND(ExtraLife, Item_Sound("megahealth"));
35 #endif
36
37 REGISTER_ITEM(ExtraLife, Powerup) {
38 #ifdef GAMEQC
39     this.m_model                =   MDL_ExtraLife_ITEM;
40     this.m_sound                =   SND_ExtraLife;
41 #endif
42     this.m_name                 =   "Extra life";
43     this.m_icon                 =   "item_mega_health";
44     this.m_color                =   '1 0 0';
45     this.m_waypoint             =   _("Extra life");
46     this.m_waypointblink        =   2;
47     this.m_itemid               =   IT_NAILS;
48 }
49
50 #ifdef GAMEQC
51 MODEL(Invisibility_ITEM, Item_Model("g_strength.md3"));
52 SOUND(Invisibility, Item_Sound("powerup"));
53 #endif
54
55 REGISTER_ITEM(Invisibility, Powerup) {
56 #ifdef GAMEQC
57     this.m_model            =   MDL_Invisibility_ITEM;
58     this.m_sound            =   SND_Invisibility;
59 #endif
60     this.m_name             =   "Invisibility";
61     this.m_icon             =   "strength";
62     this.m_color            =   '0 0 1';
63     this.m_waypoint         =   _("Invisibility");
64     this.m_waypointblink    =   2;
65     this.m_itemid           =   IT_STRENGTH;
66 }
67
68 #ifdef GAMEQC
69 MODEL(Speed_ITEM, Item_Model("g_invincible.md3"));
70 SOUND(Speed, Item_Sound("powerup_shield"));
71 #endif
72
73 REGISTER_ITEM(Speed, Powerup) {
74 #ifdef GAMEQC
75     this.m_model            =   MDL_Speed_ITEM;
76     this.m_sound            =   SND_Speed;
77 #endif
78     this.m_name             =   "Speed";
79     this.m_icon             =   "shield";
80     this.m_color            =   '1 0 1';
81     this.m_waypoint         =   _("Speed");
82     this.m_waypointblink    =   2;
83     this.m_itemid           =   IT_INVINCIBLE;
84 }