]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/ammo.qh
Remove _all indirection
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / ammo.qh
1 #pragma once
2
3 #include "pickup.qh"
4 CLASS(Ammo, Pickup)
5 #ifdef SVQC
6     ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc);
7     ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo));
8     ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo));
9 #endif
10 ENDCLASS(Ammo)
11
12 #ifdef SVQC
13     #include <common/t_items.qh>
14 #endif
15
16 #ifndef MENUQC
17 MODEL(Bullets_ITEM, Item_Model("a_bullets.mdl"));
18 #endif
19
20 REGISTER_ITEM(Bullets, Ammo) {
21 #ifndef MENUQC
22     this.m_model    =   MDL_Bullets_ITEM;
23 #endif
24     this.m_name     =   "bullets";
25     this.m_icon     =   "ammo_bullets";
26 #ifdef SVQC
27     this.m_botvalue =   2000;
28     this.m_itemid   =   IT_NAILS;
29 #endif
30 }
31
32 #ifndef MENUQC
33 MODEL(Cells_ITEM, Item_Model("a_cells.md3"));
34 #endif
35
36 REGISTER_ITEM(Cells, Ammo) {
37 #ifndef MENUQC
38     this.m_model    =   MDL_Cells_ITEM;
39 #endif
40     this.m_name     =   "cells";
41     this.m_icon     =   "ammo_cells";
42 #ifdef SVQC
43     this.m_botvalue =   2000;
44     this.m_itemid   =   IT_CELLS;
45 #endif
46 }
47
48 #ifndef MENUQC
49 MODEL(Plasma_ITEM, Item_Model("a_cells.md3"));
50 #endif
51
52 REGISTER_ITEM(Plasma, Ammo) {
53 #ifndef MENUQC
54     this.m_model    =   MDL_Plasma_ITEM;
55 #endif
56     this.m_name     =   "plasma";
57     this.m_icon     =   "ammo_plasma";
58 #ifdef SVQC
59     this.m_botvalue =   2000;
60     this.m_itemid   =   IT_PLASMA;
61 #endif
62 }
63
64 #ifndef MENUQC
65 MODEL(Rockets_ITEM, Item_Model("a_rockets.md3"));
66 #endif
67
68 REGISTER_ITEM(Rockets, Ammo) {
69 #ifndef MENUQC
70     this.m_model    =   MDL_Rockets_ITEM;
71 #endif
72     this.m_name     =   "rockets";
73     this.m_icon     =   "ammo_rockets";
74 #ifdef SVQC
75     this.m_botvalue =   3000;
76     this.m_itemid   =   IT_ROCKETS;
77 #endif
78 }
79
80 #ifndef MENUQC
81 MODEL(Shells_ITEM, Item_Model("a_shells.md3"));
82 #endif
83
84 REGISTER_ITEM(Shells, Ammo) {
85 #ifndef MENUQC
86     this.m_model    =   MDL_Shells_ITEM;
87 #endif
88     this.m_name     =   "shells";
89     this.m_icon     =   "ammo_shells";
90 #ifdef SVQC
91     this.m_botvalue =   500;
92     this.m_itemid   =   IT_SHELLS;
93 #endif
94 }