Merge pull request #1086 from universe-st/PR-Branch

修复通过“自由选将”筛选武将包时,无法筛选到扩展武将的BUG
This commit is contained in:
Spmario233 2024-03-16 20:32:56 +08:00 committed by GitHub
commit 3105c952d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 6 deletions

View File

@ -1411,13 +1411,14 @@ export class Create extends Uninstantable {
var packlist = [];
for (var i = 0; i < lib.config.all.characters.length; i++) {
if (!lib.config.characters.includes(lib.config.all.characters[i])) continue;
packlist.push(lib.config.all.characters[i]);
}
for (var i in lib.characterPack) {
if (lib.config.characters.includes(i) && !lib.config.all.characters.includes(i)) {
packlist.push(i);
}
packlist.add(lib.config.all.characters[i]);
}
Object.keys(lib.characterPack).filter(key=>{
if(key.indexOf('mode_extension')!=0)return false;
const extName = key.slice(15);
//if (!game.hasExtension(extName) || !game.hasExtensionLoaded(extName)) return false;
return lib.config[`extension_${extName}_characters_enable`] === true;
}).forEach(key=>packlist.add(key));
for (var i = 0; i < packlist.length; i++) {
var span = document.createElement('div');
span.style.display = 'inline-block';