Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.inc
Go to the documentation of this file.
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
ATTRIB
(
AmmoResource
,
m_color
,
vector
,
'1 1 1'
);
19
ENDCLASS
(
AmmoResource
)
20
21
// NOTE: ammo resource registration order should match ammo (item) registration order
22
// see REGISTER_ITEM calls order
23
// ALSO make sure m_name and m_icon fields match ammo item registries
24
25
REGISTER_RESOURCE
(SHELLS,
NEW
(
AmmoResource
)) {
26
this.
netname
=
"shells"
;
27
#ifdef GAMEQC
28
this.m_field =
ammo_shells
;
29
#endif
30
this.
m_name
= _(
"Shells"
);
31
this.m_icon =
"ammo_shells"
;
32
this.m_color =
'0.604 0.647 0.671'
;
33
}
34
REGISTER_RESOURCE
(BULLETS,
NEW
(
AmmoResource
)) {
35
this.
netname
=
"bullets"
;
36
#ifdef GAMEQC
37
this.m_field =
ammo_nails
;
38
#endif
39
this.
m_name
= _(
"Bullets"
);
40
this.m_icon =
"ammo_bullets"
;
41
this.m_color =
'0.678 0.941 0.522'
;
42
}
43
REGISTER_RESOURCE
(ROCKETS,
NEW
(
AmmoResource
)) {
44
this.
netname
=
"rockets"
;
45
#ifdef GAMEQC
46
this.m_field =
ammo_rockets
;
47
#endif
48
this.
m_name
= _(
"Rockets"
);
49
this.m_icon =
"ammo_rockets"
;
50
this.m_color =
'0.918 0.686 0.525'
;
51
}
52
REGISTER_RESOURCE
(CELLS,
NEW
(
AmmoResource
)) {
53
this.
netname
=
"cells"
;
54
#ifdef GAMEQC
55
this.m_field =
ammo_cells
;
56
#endif
57
this.
m_name
= _(
"Cells"
);
58
this.m_icon =
"ammo_cells"
;
59
this.m_color =
'0.545 0.882 0.969'
;
60
}
61
REGISTER_RESOURCE
(FUEL,
NEW
(
AmmoResource
)) {
62
this.
netname
=
"fuel"
;
63
#ifdef GAMEQC
64
this.m_field =
ammo_fuel
;
65
#endif
66
this.
m_name
= _(
"Fuel"
);
67
this.m_icon =
"ammo_fuel"
;
68
this.m_color =
'0.984 0.878 0.506'
;
69
#ifdef CSQC
70
this.
m_hidden
=
true
;
// displayed in a separate panel
71
#endif
72
}
AmmoResource
Definition
all.inc:14
AmmoResource::m_hidden
bool m_hidden
Definition
all.inc:16
AmmoResource::m_color
vector m_color
Definition
all.inc:18
Resource
Definition
resources.qh:26
netname
string netname
Definition
powerups.qc:20
m_name
string m_name
Definition
scores.qh:142
m_hidden
bool m_hidden
Definition
guide.qh:29
NEW
#define NEW(cname,...)
Definition
oo.qh:117
CLASS
#define CLASS(...)
Definition
oo.qh:145
ENDCLASS
#define ENDCLASS(cname)
Definition
oo.qh:281
ATTRIB
#define ATTRIB(...)
Definition
oo.qh:148
ammo_nails
int ammo_nails
Definition
resources.qh:16
ammo_fuel
const int ammo_fuel
Definition
resources.qh:20
REGISTER_RESOURCE
#define REGISTER_RESOURCE(id, inst)
Definition
resources.qh:35
ammo_cells
int ammo_cells
Definition
resources.qh:18
health
float health
Legacy fields for the resources. To be removed.
Definition
resources.qh:9
ammo_shells
int ammo_shells
Definition
resources.qh:15
armorvalue
float armorvalue
Definition
resources.qh:10
ammo_rockets
int ammo_rockets
Definition
resources.qh:17
vector
vector
Definition
self.qh:92
common
resources
all.inc
Generated on
for Xonotic QuakeC by
1.14.0