From fcd016730a36e20db937e37fe36210f1d983e8f0 Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 8 Apr 2017 14:01:07 +0800 Subject: [PATCH] 1 --- game/config.js | 10 ++-- game/game.js | 158 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 129 insertions(+), 39 deletions(-) diff --git a/game/config.js b/game/config.js index e96650f17..c13e0f8fc 100644 --- a/game/config.js +++ b/game/config.js @@ -4,11 +4,11 @@ window.config={ 'caocao','simayi','guanyu','zhangfei','zhaoyun','ganning','lvmeng','lvbu'], forbidversus:['swd_kangnalishi'], forbidstone:['zhugedan','pal_xuanxiao','hs_malfurion','lusu','chenlin','hs_siwangzhiyi', - 'gjqt_bailitusu','yuanshao','swd_anka','swd_nicole','daqiao','re_daqiao','hs_xuanzhuanjijia', - 'zhuran','huatuo','swd_tuwei','hs_guldan','wangyi','caoang','swd_guyue','swd_rongshuang', - 'swd_jiangziya','guojia','re_guojia','shen_caocao','swd_qiner','caopi','hs_yngvar','guansuo', - 'gjqt_aruan','swd_hanluo','hs_anduin','swd_huanglei','yxs_yujix','yxs_luzhishen','swd_muyun', - 'ow_tianshi'], + 'gjqt_bailitusu','yuanshao','swd_anka','swd_nicole','daqiao','re_daqiao','hs_xuanzhuanjijia', + 'zhuran','huatuo','swd_tuwei','hs_guldan','wangyi','caoang','swd_guyue','swd_rongshuang', + 'swd_jiangziya','guojia','re_guojia','shen_caocao','swd_qiner','caopi','hs_yngvar','guansuo', + 'gjqt_aruan','swd_hanluo','hs_anduin','swd_huanglei','yxs_yujix','yxs_luzhishen','swd_muyun','ow_tianshi' + ], replacecharacter:{ zhangjiao:'sp_zhangjiao', caocao:'re_caocao', diff --git a/game/game.js b/game/game.js index 7181a41d9..90caadb81 100644 --- a/game/game.js +++ b/game/game.js @@ -6206,7 +6206,7 @@ game.saveConfigValue('brokenFile'); if(!lib.node.http) lib.node.http=require('http'); if(!lib.node.https) lib.node.https=require('https'); - var request = (url.indexOf('https')==0?lib.node.https:lib.node.http).get(url, function(response) { + var request = (url.indexOf('https')==0?lib.node.https:lib.node.http).get(encodeURI(url), function(response) { var stream=response.pipe(file); stream.on('finish',function(){ lib.config.brokenFile.remove(folder); @@ -19988,6 +19988,9 @@ }, checkFileList:function(updates,proceed){ var n=updates.length; + if(!n){ + proceed(); + } for(var i=0;i('+list[i][4]+')',node); - ui.create.div('.text',list[i][2],node); - if(list[i][5]){ - ui.create.div('.text','网盘链接',node,function(){ + ui.create.div('.caption',list[i].name,node); + ui.create.div('.text.author','作者:'+list[i].author+'('+list[i].size+')',node); + ui.create.div('.text',list[i].intro,node); + if(list[i].netdisk){ + var linknode=ui.create.div('.text',node); + ui.create.node('span.hrefnode','网盘链接',function(){ game.open(this.link); - }).link=list[i][5]; + },linknode).link=list[i].netdisk; + if(list[i].forum){ + ui.create.node('span',linknode).style.marginRight='10px'; + ui.create.node('span.hrefnode','参与讨论',function(){ + game.open(this.link); + },linknode).link=list[i].forum; + } } var download=ui.create.div('.menubutton.text.active','下载扩展',node.firstChild); if(game.download){ download.listen(downloadExtension); - if(lib.config.extensions.contains(list[i][0])){ + if(lib.config.extensions.contains(list[i].name)){ download.classList.remove('active'); - if(lib.config['extension_'+list[i][0]+'_version']!=list[i][3]){ + if(lib.config['extension_'+list[i].name+'_version']!=list[i].version){ download.innerHTML='更新扩展'; download.classList.add('highlight'); } @@ -31291,7 +31337,6 @@ } } download.info=list[i]; - download.filename=i; } else{ var a=ui.create.node('a',download); @@ -37381,7 +37426,7 @@ } } for(var i=0;i1){ + for(var i=0;i