From aac854c8ad05d8b49bd8a05788e86f1a0c248585 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 5 May 2026 12:05:00 -0700 Subject: [PATCH] feat: client scans and logs available custom zones at startup - Renderer::initializeRenderers() now scans custom_zones/ and output/ for zone.json manifests on first initialization - Logs all discovered custom zones with name, directory, and NPC/quest availability indicators - One-time scan (cached after first run) - Foundation for custom zone selection menu in client UI Client open format support: - FULL: WOT/WHM terrain, PNG textures, WOM models (load + render) - DETECT: zone.json (scanned at startup), WOB buildings, JSON DBC --- src/rendering/renderer.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/rendering/renderer.cpp b/src/rendering/renderer.cpp index 3864ae1e..019fe65d 100644 --- a/src/rendering/renderer.cpp +++ b/src/rendering/renderer.cpp @@ -3,6 +3,7 @@ #include "rendering/camera_controller.hpp" #include "rendering/terrain_renderer.hpp" #include "rendering/terrain_manager.hpp" +#include "pipeline/custom_zone_discovery.hpp" #include "rendering/performance_hud.hpp" #include "rendering/water_renderer.hpp" #include "rendering/skybox.hpp" @@ -1885,6 +1886,22 @@ bool Renderer::initializeRenderers(pipeline::AssetManager* assetManager, const s LOG_INFO("Initializing renderers for map: ", mapName); + // Scan for custom zones on first initialization + static bool customZonesScanned = false; + if (!customZonesScanned) { + customZonesScanned = true; + auto customZones = pipeline::CustomZoneDiscovery::scan({"custom_zones", "output"}); + if (!customZones.empty()) { + LOG_INFO("=== Custom Zones Available ==="); + for (const auto& z : customZones) { + LOG_INFO(" ", z.name, " (", z.directory, ")", + z.hasCreatures ? " [NPCs]" : "", + z.hasQuests ? " [Quests]" : ""); + } + LOG_INFO("=============================="); + } + } + // Create terrain renderer if not already created if (!terrainRenderer) { terrainRenderer = std::make_unique();