refactor: Add checking in createBaseV3 function
This commit is contained in:
@@ -848,6 +848,7 @@ export function createBaseV3(char:character){
|
|||||||
ext: string
|
ext: string
|
||||||
}> = structuredClone(char.ccAssets ?? [])
|
}> = structuredClone(char.ccAssets ?? [])
|
||||||
|
|
||||||
|
if(char.additionalAssets){
|
||||||
for(const asset of char.additionalAssets){
|
for(const asset of char.additionalAssets){
|
||||||
assets.push({
|
assets.push({
|
||||||
type: 'x-risu-asset',
|
type: 'x-risu-asset',
|
||||||
@@ -856,7 +857,9 @@ export function createBaseV3(char:character){
|
|||||||
ext: asset[2] || 'unknown'
|
ext: asset[2] || 'unknown'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(char.emotionImages){
|
||||||
for(const asset of char.emotionImages){
|
for(const asset of char.emotionImages){
|
||||||
assets.push({
|
assets.push({
|
||||||
type: 'emotion',
|
type: 'emotion',
|
||||||
@@ -872,6 +875,7 @@ export function createBaseV3(char:character){
|
|||||||
name: 'main',
|
name: 'main',
|
||||||
ext: 'png'
|
ext: 'png'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
for(const lore of char.globalLore){
|
for(const lore of char.globalLore){
|
||||||
let ext:{
|
let ext:{
|
||||||
|
|||||||
Reference in New Issue
Block a user