[feat] silly world info & agn memory book support

This commit is contained in:
kwaroran
2023-06-23 22:43:58 +09:00
parent 281e0bec63
commit f0a66a926d

View File

@@ -200,19 +200,26 @@ export async function importLoreBook(mode:'global'|'local'|'sglobal'){
comment:string comment:string
content:string content:string
order:number order:number
constant:boolean constant:boolean,
name:string,
keywords:string[],
priority:number
entry:string
secondary_keys:string[]
selective:boolean
}} = importedlore.entries }} = importedlore.entries
for(const key in entries){ for(const key in entries){
const currentLore = entries[key] const currentLore = entries[key]
lore.push({ lore.push({
key: currentLore.key.join(', '), key: currentLore.key ? currentLore.key.join(', ') :
insertorder: currentLore.order, currentLore.keywords ? currentLore.keywords.join(', ') : '',
comment: currentLore.comment.length < 1 ? 'Unnamed Imported Lore' : currentLore.comment, insertorder: currentLore.order || currentLore.priority || 0,
content: currentLore.content, comment: currentLore.comment || currentLore.name || '',
content: currentLore.content || currentLore.entry || '',
mode: "normal", mode: "normal",
alwaysActive: currentLore.constant, alwaysActive: currentLore.constant ?? false,
secondkey: "", secondkey: currentLore.secondary_keys ? currentLore.secondary_keys.join(', ') : "",
selective: false selective: currentLore.selective ?? false
}) })
} }
} }