diff --git a/game/game.js b/game/game.js index dcebda4a5..3eb4604cf 100644 --- a/game/game.js +++ b/game/game.js @@ -33694,12 +33694,10 @@ }, importExtension:gnc.async(function*(data,finishLoad,exportext,pkg){ //by 来瓶可乐加冰 - if(!window.JSZip){ - lib.init.js(lib.assetURL+'game','jszip',function(){ - game.importExtension(data,finishLoad,exportext,pkg); - }); - } - else if(get.objtype(data)=='object'){ + if(!window.JSZip) + yield new Promise((resolve,reject)=>lib.init.js(`${lib.assetURL}game`,"jszip",resolve,reject)); + + if(get.objtype(data)=='object'){ //导出 var zip=new JSZip(); var filelist=[]; @@ -33807,6 +33805,8 @@ if(str===""||undefined) throw('你导入的不是扩展!请选择正确的文件'); _status.importingExtension=true; eval(str); + yield Promise.allSettled(_status.extensionLoading); + delete _status.extensionLoading; _status.importingExtension=false; if(!game.importedPack) throw('err'); var extname=game.importedPack.name;