// -----------------------------------------------------------------------------
// config.cpp
// -----------------------------------------------------------------------------
// Implementation of the shared runtime configuration. The aim bone selection
// follows the original cheat: Head -> Chest -> Stomach -> Random modes all
// resolve to their respective bone indices; the random mode picks a random
// bone at aim time (handled by the flickshot feature itself).
// -----------------------------------------------------------------------------

#include "config.h"

namespace cfg {

int Config::GetAimBone() const
{
	switch (aimMode) {
		case AimMode::Head:    return boneHead;
		case AimMode::Chest:   return boneChest;
		case AimMode::Stomach: return boneStomach;
		case AimMode::Random:  return boneHead;
		case AimMode::Off:     return -1;
		default:               return -1;
	}
}

const char* Config::GetAimModeName() const
{
	switch (aimMode) {
		case AimMode::Head:    return u8"头部";
		case AimMode::Chest:   return u8"胸口";
		case AimMode::Stomach: return u8"腹部";
		case AimMode::Random:  return u8"随机";
		case AimMode::Off:     return u8"关闭";
		default:               return u8"关闭";
	}
}

const char* Config::GetGlowLevelName() const
{
	switch (glowLevel) {
		case GlowLevel::All:   return u8"全部";
		case GlowLevel::Enemy: return u8"敌人";
		case GlowLevel::Team:  return u8"队友";
		case GlowLevel::Off:   return u8"关闭";
		default:               return u8"关闭";
	}
}

// The single runtime configuration instance shared by all modules.
Config g_config;

} // namespace cfg
