Simplify logic of disabling the WI entry

This commit is contained in:
SillyLossy
2023-05-01 17:43:27 +03:00
parent 7b9e042589
commit 5144ae2220

View File

@@ -477,15 +477,15 @@ function checkWorldInfo(chat) {
let activatedNow = new Set(); let activatedNow = new Set();
for (let entry of sortedEntries) { for (let entry of sortedEntries) {
if (allActivatedEntries.has(entry.uid) && entry.disable == false) { if (allActivatedEntries.has(entry.uid) || entry.disable == true) {
continue; continue;
} }
if (entry.constant && entry.disable == false) { if (entry.constant) {
activatedNow.add(entry.uid); activatedNow.add(entry.uid);
} }
if (Array.isArray(entry.key) && entry.key.length && entry.disable == false) { if (Array.isArray(entry.key) && entry.key.length) {
primary: for (let key of entry.key) { primary: for (let key of entry.key) {
if (key && textToScan.includes(key.trim().toLowerCase())) { if (key && textToScan.includes(key.trim().toLowerCase())) {
if ( if (