From 3b85f9f8cfe4cad1de61ee61a7bb41f13a400fb1 Mon Sep 17 00:00:00 2001 From: Alexei Dobrohotov Date: Sun, 9 Jul 2023 00:59:12 +0300 Subject: [PATCH] Autocomplete ESM4::Cell editor IDs --- apps/openmw/mwgui/console.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 2532a676e5..0315bdc385 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -121,14 +121,20 @@ namespace MWGui ids.clear(); } - // exterior cell names aren't technically identifiers, but since the COC function accepts them, - // we should list them too + // exterior cell names and editor IDs aren't technically identifiers, + // but since the COC function accepts them, we should list them too for (auto it = esmStore.get().extBegin(); it != esmStore.get().extEnd(); ++it) { if (!it->mName.empty()) mNames.push_back(it->mName); } + for (const auto& cell : esmStore.get()) + { + if (!cell.mEditorId.empty()) + mNames.push_back(cell.mEditorId); + } + // sort std::sort(mNames.begin(), mNames.end());