Merge pull request #741 from story-x/master

update : 星铁支持face-q
This commit is contained in:
Aluxes 2024-05-15 15:19:53 +08:00 committed by GitHub
commit a4d5561a14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,10 +128,15 @@ const CharImg = {
let fileType = 'webp'
const nPath = `/meta-sr/character/${name}/`
let imgs = {}
let add = (key, path) => {
let add = (key, path, path2) => {
if (path2 && fs.existsSync(`${rPath}/${nPath}/${path2}.${fileType}`)) {
imgs[key] = `${nPath}${path2}.${fileType}`
} else {
imgs[key] = `${nPath}${path}.${fileType}`
}
}
add('face', 'imgs/face')
add('qFace', 'imgs/face', 'imgs/face-q')
add('splash', 'imgs/splash')
add('preview', 'imgs/preview')
for (let i = 1; i <= 3; i++) {