1 // ==========================
2 // Balance Config Generator
3 // ==========================
5 void Dump_Weapon_Settings(void);
7 float wep_config_alsoprint;
9 #define MAX_WEP_CONFIG 256
10 float WEP_CONFIG_COUNT;
11 string wep_config_queue[MAX_WEP_CONFIG];
13 #define WEP_CONFIG_QUEUE(a) { \
14 wep_config_queue[WEP_CONFIG_COUNT] = a; \
17 #define WEP_CONFIG_WRITETOFILE(a) { \
18 fputs(wep_config_file, a); \
19 if(wep_config_alsoprint) { print(a); } }
21 #define WEP_CONFIG_WRITE_CVARS(weapon,mode,name) \
23 { WEP_CONFIG_QUEUE(sprintf( \
24 "set g_balance_%s_primary_%s %g\n", \
27 autocvar_g_balance_##weapon##_primary_##name)) } \
30 { WEP_CONFIG_QUEUE(sprintf("set g_balance_%s_secondary_%s %g\n", \
33 autocvar_g_balance_##weapon##_secondary_##name)) } \
36 { WEP_CONFIG_QUEUE(sprintf("set g_balance_%s_primary_%s %g\n", \
39 autocvar_g_balance_##weapon##_primary_##name)) } \
40 { WEP_CONFIG_QUEUE(sprintf("set g_balance_%s_secondary_%s %g\n", \
43 autocvar_g_balance_##weapon##_secondary_##name)) } \
46 { WEP_CONFIG_QUEUE(sprintf("set g_balance_%s_%s %g\n", \
49 autocvar_g_balance_##weapon##_##name)) } \
52 // WEAPONTODO: remove prop
53 #define WEP_CONFIG_WRITE_PROPS(weapon,name) \
54 { WEP_CONFIG_QUEUE(sprintf("set g_balance_%s_%s %g\n", \
57 autocvar_g_balance_##weapon##_##name)) }
59 #define WEP_CONFIG_SETTINGS(wepsettings) \
60 #define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name) \
61 #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,name) \