import configparser
import json
from dataclasses import dataclass, asdict, field
from typing import Tuple, Dict, Any, List
from enum import Enum
import os

class TrackingMode(Enum):
    STATIC = "StaticTracking"
    DYNAMIC = "DynamicTracking"
    PREDICTIVE = "PredictiveTracking"

class WeaponType(Enum):
    RIFLE = "Rifle"
    SNIPER = "Sniper"
    SMG = "SMG"
    SHOTGUN = "Shotgun"
    PISTOL = "Pistol"
    ALL = "All"

@dataclass
class TargetLockSettings:
    """目标锁定设置"""
    auto_aim_max_range: float = 999.0
    head_lock_trigger_probability: float = 1.0  # MAX = 1.0
    lock_response_delay: float = 0.01
    max_simultaneous_locks: int = 1
    auto_relock_after_target_loss: bool = True
    penetrate_obstacles_locking: bool = True
    long_range_locking: bool = True
    lock_stabilization_strength: float = 1.0
    below_50_percent_priority_bonus: float = 1.0
    lock_visual_marker: str = "RedCrosshair+OutlineHighlight"
    lock_sound_prompt: bool = True
    false_lock_exclusion_threshold: float = 1.5

@dataclass
class AimCalibration:
    """瞄准校准设置"""
    aim_calibration_factor: float = 1.0
    operation_accuracy: float = 1.0
    aim_base_range: float = 1.0
    all_weapon_adaptation: float = 1.0
    distance_aim_strength: float = 1.0
    weapon_tracking_mode: int = 1
    moving_target_calibration: float = 1.0
    target_aim_speed: float = 1.0
    aim_tracking_mode: str = "DynamicTracking"

@dataclass
class AdvancedCalibration:
    """高级校准设置"""
    dynamic_sensitivity: float我来帮你将这些配置转换成专业的Python配置文件格式，支持服务器直接读取和使用：

## 方案一：专业的配置类系统

