#pragma once

#ifdef SVQC
// ==========================
//  Balance Config Generator
// ==========================

void Dump_Weapon_Settings();
int wep_config_file;
bool wep_config_alsoprint;

int WEP_CONFIG_COUNT;
void W_Config_Queue(string setting);

#define WEP_CONFIG_WRITE_CVARS(wepname, name, T) WEP_CONFIG_WRITE_PROPS_##T(wepname, name)

#define WEP_CONFIG_WRITE_PROPS_string(wepname, name) { \
	W_Config_Queue( \
		sprintf("set g_balance_%s_%s \"%s\"\n", #wepname, #name, \
		cvar_string(sprintf("g_balance_%s_%s", #wepname, #name)))); \
}

#define WEP_CONFIG_WRITE_PROPS_float(wepname, name) { \
	W_Config_Queue( \
		sprintf("set g_balance_%s_%s %g\n", #wepname, #name, \
		cvar(sprintf("g_balance_%s_%s", #wepname, #name)))); \
}

#endif
