Merge branch 'z411/ca-prevent-observer' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / resources / all.inc
1 REGISTER_RESOURCE(HEALTH, NEW(Resource)) {
2         this.netname = "health";
3 #ifdef GAMEQC
4         this.m_field = health;
5 #endif
6 }
7 REGISTER_RESOURCE(ARMOR, NEW(Resource)) {
8         this.netname = "armor";
9 #ifdef GAMEQC
10         this.m_field = armorvalue;
11 #endif
12 }
13
14 CLASS(AmmoResource, Resource)
15 #ifdef CSQC
16         ATTRIB(AmmoResource, m_hidden, bool, false);
17 #endif
18 ENDCLASS(AmmoResource)
19
20 REGISTER_RESOURCE(SHELLS, NEW(AmmoResource)) {
21         this.netname = "shells";
22 #ifdef GAMEQC
23         this.m_field = ammo_shells;
24 #endif
25 }
26 REGISTER_RESOURCE(BULLETS, NEW(AmmoResource)) {
27         this.netname = "bullets";
28 #ifdef GAMEQC
29         this.m_field = ammo_nails;
30 #endif
31 }
32 REGISTER_RESOURCE(ROCKETS, NEW(AmmoResource)) {
33         this.netname = "rockets";
34 #ifdef GAMEQC
35         this.m_field = ammo_rockets;
36 #endif
37 }
38 REGISTER_RESOURCE(CELLS, NEW(AmmoResource)) {
39         this.netname = "cells";
40 #ifdef GAMEQC
41         this.m_field = ammo_cells;
42 #endif
43 }
44 REGISTER_RESOURCE(PLASMA, NEW(AmmoResource)) {
45         this.netname = "plasma";
46 #ifdef GAMEQC
47         this.m_field = ammo_plasma;
48 #endif
49 #ifdef CSQC
50         this.m_hidden = true; // WIP ammo type
51 #endif
52 }
53 REGISTER_RESOURCE(FUEL, NEW(AmmoResource)) {
54         this.netname = "fuel";
55 #ifdef GAMEQC
56         this.m_field = ammo_fuel;
57 #endif
58 #ifdef CSQC
59         this.m_hidden = true; // displayed in a separate panel
60 #endif
61 }