feat: change origin import character function.

This commit is contained in:
Rintim 2024-04-22 20:58:09 +08:00
parent 9bb432062d
commit a943d43409
No known key found for this signature in database
GPG Key ID: BE9E1EA615BACFCF
1 changed files with 7 additions and 4 deletions

View File

@ -11,10 +11,13 @@ export const importCardPack = generateImportFunction("card", (name) => `../../ca
* @param {string} name - 武将包名
* @returns {Promise<void>}
*/
export const importCharacterPack = generateImportFunction(
"character",
(name) => `../../character/${name}.js`
);
export const importCharacterPack = generateImportFunction("character", (name) => {
const alreadyModernCharacterPack = ["key"];
return alreadyModernCharacterPack.includes(name)
? `../../character/${name}/index.js`
: `../../character/${name}.js`;
});
/**
* @param {string} name - 扩展名