From a7ab2756d63178e311c8ae0d33cd7954df0d18e6 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 6 May 2026 04:17:31 -0700 Subject: [PATCH] feat(editor): selected-NPC editor gains role flag checkboxes Adds Hostile/Quest/Vendor/Inn/Train/Bank/Auc/Repair/Flight checkboxes to the selected-NPC editor matching the template editor's set. Lets users toggle these on already-placed NPCs without removing and re-placing them. --- tools/editor/editor_ui.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/editor/editor_ui.cpp b/tools/editor/editor_ui.cpp index 00a57a20..564b6d93 100644 --- a/tools/editor/editor_ui.cpp +++ b/tools/editor/editor_ui.cpp @@ -2011,6 +2011,18 @@ void EditorUI::renderNpcPanel(EditorApp& app) { int bi2 = static_cast(sel->behavior); if (ImGui::Combo("AI##s", &bi2, beh2, 4)) sel->behavior = static_cast(bi2); + // NPC role flags — match the template editor's set so users can + // toggle these on already-placed NPCs without re-creating them. + ImGui::Checkbox("Hostile##s", &sel->hostile); + ImGui::SameLine(); ImGui::Checkbox("Quest##s", &sel->questgiver); + ImGui::SameLine(); ImGui::Checkbox("Vendor##s", &sel->vendor); + ImGui::Checkbox("Inn##s", &sel->innkeeper); + ImGui::SameLine(); ImGui::Checkbox("Train##s", &sel->trainer); + ImGui::SameLine(); ImGui::Checkbox("Bank##s", &sel->banker); + ImGui::Checkbox("Auc##s", &sel->auctioneer); + ImGui::SameLine(); ImGui::Checkbox("Repair##s", &sel->repair); + ImGui::SameLine(); ImGui::Checkbox("Flight##s", &sel->flightmaster); + // Patrol path editing if (sel->behavior == CreatureBehavior::Patrol) { ImGui::Text("Patrol Points: %zu", sel->patrolPath.size());