Add emotionlist and assetlist functions to parser.ts
This commit is contained in:
@@ -682,6 +682,24 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
const chat = selchar.chats[selchar.chatPage]
|
const chat = selchar.chats[selchar.chatPage]
|
||||||
return chat.message.length - 1
|
return chat.message.length - 1
|
||||||
}
|
}
|
||||||
|
case 'emotionlist':{
|
||||||
|
const selchar = db.characters[get(selectedCharID)]
|
||||||
|
if(!selchar){
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return selchar.emotionImages?.map((f) => {
|
||||||
|
return f[0]
|
||||||
|
})?.join('§') ?? ''
|
||||||
|
}
|
||||||
|
case 'assetlist':{
|
||||||
|
const selchar = db.characters[get(selectedCharID)]
|
||||||
|
if(!selchar || selchar.type === 'group'){
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return selchar.additionalAssets?.map((f) => {
|
||||||
|
return f[0]
|
||||||
|
})?.join('§') ?? ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const arra = p1.split("::")
|
const arra = p1.split("::")
|
||||||
if(arra.length > 1){
|
if(arra.length > 1){
|
||||||
|
|||||||
Reference in New Issue
Block a user