From 5ac0390446eb60fa5c795c02822af2e97f9b84ef Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:03:55 +0300 Subject: [PATCH] Fix naming convention for LB extension fields --- public/scripts/world-info.js | 7 ++++--- src/endpoints/characters.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 209573ab7..79e076fb3 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -992,6 +992,7 @@ const originalDataKeyMap = { 'scanDepth': 'extensions.scan_depth', 'automationId': 'extensions.automation_id', 'vectorized': 'extensions.vectorized', + 'groupOverride': 'extensions.group_override', }; function setOriginalDataValue(data, uid, key, value) { @@ -1339,7 +1340,7 @@ function getWorldEntry(name, data, entry) { setTimeout(() => createEntryInputAutocomplete(groupInput, getInclusionGroupCallback(data)), 1); // inclusion priority - const groupOverrideInput = template.find('input[name="groupPrio"]'); + const groupOverrideInput = template.find('input[name="groupOverride"]'); groupOverrideInput.data('uid', entry.uid); groupOverrideInput.on('input', function () { const uid = $(this).data('uid'); @@ -2431,7 +2432,7 @@ function filterByInclusionGroups(newEntries, allActivatedEntries) { } if (logging) console.debug(`Removing loser from inclusion group '${entry.group}' entry '${entry.uid}'`, entry); - removeEntry(entry) + removeEntry(entry); } } @@ -2627,7 +2628,7 @@ function convertCharacterBook(characterBook) { depth: entry.extensions?.depth ?? DEFAULT_DEPTH, selectiveLogic: entry.extensions?.selectiveLogic ?? world_info_logic.AND_ANY, group: entry.extensions?.group ?? '', - groupOverride: entry.extensions?.groupOverride ?? false, + groupOverride: entry.extensions?.group_override ?? false, scanDepth: entry.extensions?.scan_depth ?? null, caseSensitive: entry.extensions?.case_sensitive ?? null, matchWholeWords: entry.extensions?.match_whole_words ?? null, diff --git a/src/endpoints/characters.js b/src/endpoints/characters.js index 23a069024..cb06e2279 100644 --- a/src/endpoints/characters.js +++ b/src/endpoints/characters.js @@ -433,7 +433,7 @@ function convertWorldInfoToCharacterBook(name, entries) { depth: entry.depth ?? 4, selectiveLogic: entry.selectiveLogic ?? 0, group: entry.group ?? '', - groupOverride: entry.groupOverride ?? false, + group_override: entry.groupOverride ?? false, prevent_recursion: entry.preventRecursion ?? false, scan_depth: entry.scanDepth ?? null, match_whole_words: entry.matchWholeWords ?? null,