]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/resources/all.inc
Merge branch 'Mario/no_engine_physics' 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 // NOTE: ammo resource registration order should match ammo (item) registration order
21 // see REGISTER_ITEM calls order
22
23 REGISTER_RESOURCE(SHELLS, NEW(AmmoResource)) {
24         this.netname = "shells";
25 #ifdef GAMEQC
26         this.m_field = ammo_shells;
27 #endif
28 }
29 REGISTER_RESOURCE(BULLETS, NEW(AmmoResource)) {
30         this.netname = "bullets";
31 #ifdef GAMEQC
32         this.m_field = ammo_nails;
33 #endif
34 }
35 REGISTER_RESOURCE(ROCKETS, NEW(AmmoResource)) {
36         this.netname = "rockets";
37 #ifdef GAMEQC
38         this.m_field = ammo_rockets;
39 #endif
40 }
41 REGISTER_RESOURCE(CELLS, NEW(AmmoResource)) {
42         this.netname = "cells";
43 #ifdef GAMEQC
44         this.m_field = ammo_cells;
45 #endif
46 }
47 REGISTER_RESOURCE(PLASMA, NEW(AmmoResource)) {
48         this.netname = "plasma";
49 #ifdef GAMEQC
50         this.m_field = ammo_plasma;
51 #endif
52 #ifdef CSQC
53         this.m_hidden = true; // WIP ammo type
54 #endif
55 }
56 REGISTER_RESOURCE(FUEL, NEW(AmmoResource)) {
57         this.netname = "fuel";
58 #ifdef GAMEQC
59         this.m_field = ammo_fuel;
60 #endif
61 #ifdef CSQC
62         this.m_hidden = true; // displayed in a separate panel
63 #endif
64 }