refactor: Add checking in createBaseV3 function
This commit is contained in:
@@ -848,31 +848,35 @@ export function createBaseV3(char:character){
|
|||||||
ext: string
|
ext: string
|
||||||
}> = structuredClone(char.ccAssets ?? [])
|
}> = structuredClone(char.ccAssets ?? [])
|
||||||
|
|
||||||
for(const asset of char.additionalAssets){
|
if(char.additionalAssets){
|
||||||
assets.push({
|
for(const asset of char.additionalAssets){
|
||||||
type: 'x-risu-asset',
|
assets.push({
|
||||||
uri: asset[1],
|
type: 'x-risu-asset',
|
||||||
name: asset[0],
|
uri: asset[1],
|
||||||
ext: asset[2] || 'unknown'
|
name: asset[0],
|
||||||
})
|
ext: asset[2] || 'unknown'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(const asset of char.emotionImages){
|
if(char.emotionImages){
|
||||||
|
for(const asset of char.emotionImages){
|
||||||
|
assets.push({
|
||||||
|
type: 'emotion',
|
||||||
|
uri: asset[1],
|
||||||
|
name: asset[0],
|
||||||
|
ext: 'unknown'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
assets.push({
|
assets.push({
|
||||||
type: 'emotion',
|
type: 'icon',
|
||||||
uri: asset[1],
|
uri: 'ccdefault:',
|
||||||
name: asset[0],
|
name: 'main',
|
||||||
ext: 'unknown'
|
ext: 'png'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
assets.push({
|
|
||||||
type: 'icon',
|
|
||||||
uri: 'ccdefault:',
|
|
||||||
name: 'main',
|
|
||||||
ext: 'png'
|
|
||||||
})
|
|
||||||
|
|
||||||
for(const lore of char.globalLore){
|
for(const lore of char.globalLore){
|
||||||
let ext:{
|
let ext:{
|
||||||
risu_case_sensitive?: boolean;
|
risu_case_sensitive?: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user