1 REGISTER_RESOURCE(HEALTH, NEW(Resource)) {
2 this.netname = "health";
7 REGISTER_RESOURCE(ARMOR, NEW(Resource)) {
8 this.netname = "armor";
10 this.m_field = armorvalue;
14 CLASS(AmmoResource, Resource)
16 ATTRIB(AmmoResource, m_hidden, bool, false);
18 ENDCLASS(AmmoResource)
20 // NOTE: ammo resource registration order should match ammo (item) registration order
21 // see REGISTER_ITEM calls order
23 REGISTER_RESOURCE(SHELLS, NEW(AmmoResource)) {
24 this.netname = "shells";
26 this.m_field = ammo_shells;
29 REGISTER_RESOURCE(BULLETS, NEW(AmmoResource)) {
30 this.netname = "bullets";
32 this.m_field = ammo_nails;
35 REGISTER_RESOURCE(ROCKETS, NEW(AmmoResource)) {
36 this.netname = "rockets";
38 this.m_field = ammo_rockets;
41 REGISTER_RESOURCE(CELLS, NEW(AmmoResource)) {
42 this.netname = "cells";
44 this.m_field = ammo_cells;
47 REGISTER_RESOURCE(PLASMA, NEW(AmmoResource)) {
48 this.netname = "plasma";
50 this.m_field = ammo_plasma;
53 this.m_hidden = true; // WIP ammo type
56 REGISTER_RESOURCE(FUEL, NEW(AmmoResource)) {
57 this.netname = "fuel";
59 this.m_field = ammo_fuel;
62 this.m_hidden = true; // displayed in a separate panel