9#define get_turretinfo(i) REGISTRY_GET(Turrets, i)
13#define TR_PROPS_COMMON(P, class, prefix) \
14 P(class, prefix, aim_firetolerance_dist, float) \
15 P(class, prefix, aim_maxpitch, float) \
16 P(class, prefix, aim_maxrot, float) \
17 P(class, prefix, aim_speed, float) \
18 P(class, prefix, ammo_max, float) \
19 P(class, prefix, ammo_recharge, float) \
20 P(class, prefix, health, float) \
21 P(class, prefix, respawntime, float) \
22 P(class, prefix, shot_dmg, float) \
23 P(class, prefix, shot_force, float) \
24 P(class, prefix, shot_radius, float) \
25 P(class, prefix, shot_refire, float) \
26 P(class, prefix, shot_speed, float) \
27 P(class, prefix, shot_spread, float) \
28 P(class, prefix, shot_volly, float) \
29 P(class, prefix, shot_volly_refire, float) \
30 P(class, prefix, target_range, float) \
31 P(class, prefix, target_range_min, float) \
32 P(class, prefix, target_range_optimal, float) \
33 P(class, prefix, target_select_anglebias, float) \
34 P(class, prefix, target_select_missilebias, float) \
35 P(class, prefix, target_select_playerbias, float) \
36 P(class, prefix, target_select_rangebias, float) \
37 P(class, prefix, target_select_samebias, float) \
38 P(class, prefix, track_accel_pitch, float) \
39 P(class, prefix, track_accel_rot, float) \
40 P(class, prefix, track_blendrate, float) \
41 P(class, prefix, track_type, float) \
44#define TR_PROPS(L, class, prefix) \
45 L(TR_CONFIG_BEGIN, TR_CONFIG, TR_CONFIG_END, class, prefix) \
48#define TR_CONFIG(class, turname, fld, T) _TR_CONFIG(class, fld, T, turname)
50 #define TR_CONFIG_BEGIN(class) METHOD(class, tr_config, void(class this)) {
51 #define _TR_CONFIG(class, fld, T, turname) if (#turname == this.netname) TUR_CONFIG_WRITE_CVARS(turname, fld, T);
52 #define TR_CONFIG_END() }
54 #define TR_CONFIG_BEGIN(class)
55 #define _TR_CONFIG(class, fld, T, turname)
56 #define TR_CONFIG_END()
59#define DEFAULT_FILENAME "turrets_dump.cfg"
70 string filename =
argv(1);
77 else if(filename ==
"-")
87 LOG_INFOF(
"Dumping turrets... File located in ^2data/data/%s^7.", filename);
94 LOG_INFOF(
"^1Error: ^7Could not open file '%s'!", filename);
97 LOG_INFO(
"Turrets dump command only works with sv_cmd.");
107 LOG_HELP(
" if supplied with '-' output to console as well as default,");
108 LOG_HELP(
" if left blank, it will only write to default.");
113#undef DEFAULT_FILENAME
117#define TUR_LAST (REGISTRY_COUNT(Turrets) - 1)
119#define REGISTER_TURRET(id, inst) REGISTER(Turrets, TUR, id, m_id, inst)
127#include "turret/_mod.qh"
ATTRIB(Turret, m_icon, string)
icon
const int CMD_REQUEST_COMMAND
const int CMD_REQUEST_USAGE
#define GENERIC_COMMAND(id, description, menubased)
#define GetProgramCommandPrefix()
#define REGISTER_REGISTRY(id)
#define REGISTRY(id, max)
Declare a new registry.
#define REGISTRY_CHECK(id)
#define REGISTRY_DEFINE_GET(id, null)
#define REGISTER_TURRET(id, inst)
void Dump_Turret_Settings()
float tur_config_alsoprint