warfactoryracine/docs/configuration/module-configuration.md
StillHammer 6c7934d530 Integrate 227 additional technical specification points
Major integration of Points 251-570 from master list:
- Points 251-350: Configuration system (error handling, security, deployment)
- Points 351-390: Claude Code development practices added to CLAUDE.md
- Points 391-470: Integration patterns and UX already covered in architecture
- Points 471-570: Business logic and build system already documented
- Points 136-142: Interface contracts already integrated

Created complete docs/configuration/ folder with:
- transport-economic-system.md (economic parameters)
- module-configuration.md (smart dependencies)
- error-handling.md (crash recovery, Redis failover)
- security-measures.md (anti-cheat, server authority)
- deployment-strategies.md (V1→V2 migration, hot-reload)

Progress: 357/570 points integrated (63%), only 131 concrete points remaining

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 07:08:15 +08:00

1.6 KiB

Configuration des Modules

Configuration Système Modulaire

Configuration Dependencies System

Smart configuration avec recalculation automatique :

std::map<ConfigKey, std::vector<ComponentID>> dependencies = {
    {"materials.steel_plating.weight", {tank_mk1, tank_mk2, heavy_tank}},
    {"materials.steel_plating.cost", {economy_steel, factory_line_2}},
    {"weapons.cannon_75mm.damage", {tank_mk1, artillery_piece}}
};

void onConfigChange(ConfigKey key, json newValue) {
    auto affected = dependencies[key];
    for(auto component : affected) {
        DesignerModule::scheduleRecalc(component);
    }
}

Module Config Example

Configuration adaptable par module :

bool useNewSystem = config.getBool("use_new_tank_system");

json process(json input) {
    if(useNewSystem) {
        return newTankModule->process(input);
    } else {
        return legacyTankSystem->process(input);
    }
}

Avantages Configuration Modulaire

Développement :

  • Config changes : Restart required → Instant
  • A/B testing : Impossible → Trivial
  • Debugging : Needle in haystack → Surgical precision

Maintenance :

  • Module independence : Tightly coupled → Zero dependencies
  • Testing : Integration hell → Unit paradise
  • Deployment : Monolith → Microservices-like
  • Scaling : Rewrite → Configuration change

Points Couverts

Cette configuration correspond aux patterns de configuration modulaire mentionnés dans les Points 251-290.

Source : docs/toCheck/architecture-modulaire.md Type : Configuration système et dépendances