Don't #include server files from CSQC
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / waypoints / all.qh
1 #pragma once
2
3 #include "waypointsprites.qh"
4
5 REGISTRY(Waypoints, BITS(6))
6 #define Waypoints_from(i) _Waypoints_from(i, WP_Null)
7 REGISTER_REGISTRY(Waypoints)
8 REGISTRY_CHECK(Waypoints)
9
10 /** If you register a new waypoint, make sure to add it to all.inc */
11 #define REGISTER_WAYPOINT_(id, init) REGISTER(Waypoints, WP, id, m_id, init)
12
13 CLASS(Waypoint, Object)
14     ATTRIB(Waypoint, m_id, int, 0);
15     ATTRIB(Waypoint, netname, string);
16     ATTRIB(Waypoint, m_name, string);
17     ATTRIB(Waypoint, m_color, vector, '1 1 1');
18     ATTRIB(Waypoint, m_blink, int, 1);
19     CONSTRUCTOR(Waypoint, string _netname, string _name, vector _color, int _blink) {
20         CONSTRUCT(Waypoint);
21         this.netname = _netname;
22         this.m_name = _name;
23         this.m_color = _color;
24         this.m_blink = _blink;
25     }
26 ENDCLASS(Waypoint)
27
28 #define REGISTER_WAYPOINT(id, text, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, color, blink))
29
30 REGISTRY(RadarIcons, BITS(7))
31 #define RadarIcons_from(i) _RadarIcons_from(i, RADARICON_NONE)
32 REGISTER_REGISTRY(RadarIcons)
33 REGISTRY_CHECK(RadarIcons)
34
35 .int m_radaricon;
36 #define REGISTER_RADARICON(id, num) REGISTER(RadarIcons, RADARICON, id, m_id, new_pure(RadarIcon)) { this.m_radaricon = num; this.netname = #id; }
37
38 REGISTER_WAYPOINT(Null, "", '0 0 0', 1);
39
40 REGISTER_RADARICON(NONE,            0);
41 REGISTER_RADARICON(FLAG,            1);
42 REGISTER_RADARICON(FLAGCARRIER,     1);
43
44 REGISTER_RADARICON(HERE,            1);
45 REGISTER_RADARICON(DANGER,          1);
46
47 REGISTER_RADARICON(WAYPOINT,        1);
48 REGISTER_RADARICON(HELPME,          1);
49 REGISTER_RADARICON(CONTROLPOINT,    1);
50 REGISTER_RADARICON(GENERATOR,       1);
51 REGISTER_RADARICON(OBJECTIVE,       1);
52 REGISTER_RADARICON(DOMPOINT,        1);
53 REGISTER_RADARICON(TAGGED,          1);
54
55 REGISTER_RADARICON(Item,            1);
56 REGISTER_RADARICON(Vehicle,         1);
57 REGISTER_RADARICON(Weapon,          1);
58
59 #include "all.inc"