move decorators effect right before constant

This commit is contained in:
kwaroran 2024-07-12 06:43:19 +09:00
parent 33347f1c7c
commit 3b0e07d093
1 changed files with 11 additions and 11 deletions

View File

@ -3651,17 +3651,6 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
entry.decorators = decorators;
entry.content = content;
if(decorators.includes('@@activate')){
//activate in any case
activatedNow.add(entry);
continue;
}
if(decorators.includes('@@dont_activate')){
//deactivate in any case if @@activate is not present
continue;
}
// Check if this entry applies to the character or if it's excluded
if (entry.characterFilter && entry.characterFilter?.names?.length > 0) {
const nameIncluded = entry.characterFilter.names.includes(getCharaFilename());
@ -3725,6 +3714,17 @@ async function checkWorldInfo(chat, maxContext, isDryRun) {
continue;
}
if(decorators.includes('@@activate')){
//activate in any case
activatedNow.add(entry);
continue;
}
if(decorators.includes('@@dont_activate')){
//deactivate in any case if @@activate is not present
continue;
}
if (entry.constant || buffer.isExternallyActivated(entry) || isSticky) {
activatedNow.add(entry);
continue;