refactor: Add checking in createBaseV3 function

This commit is contained in:
kwaroran
2024-05-28 22:56:38 +09:00
parent 005c81a582
commit d0cc9f8cdd

View File

@@ -848,6 +848,7 @@ export function createBaseV3(char:character){
ext: string
}> = structuredClone(char.ccAssets ?? [])
if(char.additionalAssets){
for(const asset of char.additionalAssets){
assets.push({
type: 'x-risu-asset',
@@ -856,7 +857,9 @@ export function createBaseV3(char:character){
ext: asset[2] || 'unknown'
})
}
}
if(char.emotionImages){
for(const asset of char.emotionImages){
assets.push({
type: 'emotion',
@@ -872,6 +875,7 @@ export function createBaseV3(char:character){
name: 'main',
ext: 'png'
})
}
for(const lore of char.globalLore){
let ext:{