From 469f046db55a4fab2e94699a10ae30d88b3bd300 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 6 May 2026 02:41:23 -0700 Subject: [PATCH] feat(editor): NPC list shows hostile/friendly/questgiver/vendor counts Helps users see at-a-glance the makeup of their zone's creature pop without having to scroll the list looking at each entry's flags. --- tools/editor/editor_ui.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_ui.cpp b/tools/editor/editor_ui.cpp index fdfcdc8b..ca22ad1c 100644 --- a/tools/editor/editor_ui.cpp +++ b/tools/editor/editor_ui.cpp @@ -1925,7 +1925,17 @@ void EditorUI::renderNpcPanel(EditorApp& app) { // ---- Spawned list ---- if (ImGui::CollapsingHeader("Spawned Creatures", ImGuiTreeNodeFlags_DefaultOpen)) { static char spawnFilter[128] = ""; - ImGui::Text("%zu placed (double-click to fly to)", spawner.spawnCount()); + // Count hostile / friendly / quest givers / vendors + size_t hostile = 0, friendly = 0, qg = 0, vend = 0; + for (const auto& s : spawner.getSpawns()) { + if (s.hostile) hostile++; else friendly++; + if (s.questgiver) qg++; + if (s.vendor) vend++; + } + ImGui::Text("%zu placed", spawner.spawnCount()); + ImGui::TextDisabled("Hostile: %zu Friendly: %zu Q-givers: %zu Vendors: %zu", + hostile, friendly, qg, vend); + ImGui::TextDisabled("Double-click an entry to fly to it"); ImGui::SetNextItemWidth(-1); ImGui::InputTextWithHint("##spawnfilter", "Filter by name...", spawnFilter, sizeof(spawnFilter)); std::string filterLower(spawnFilter);