This commit is contained in:
libccy 2016-08-06 17:58:43 +08:00
parent b786eef3ea
commit f47dff8e38
9 changed files with 49 additions and 34 deletions

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[ window.noname_asset_list=[
'1.8.15', '1.8.16',
'image/background/huangtian_bg.jpg', 'image/background/huangtian_bg.jpg',
'image/background/shengshi_bg.jpg', 'image/background/shengshi_bg.jpg',
'image/background/xueji_bg.jpg', 'image/background/xueji_bg.jpg',
@ -672,9 +672,11 @@ window.noname_asset_list=[
'image/character/sp_dongzhuo.jpg', 'image/character/sp_dongzhuo.jpg',
'image/character/sp_ganning.jpg', 'image/character/sp_ganning.jpg',
'image/character/sp_jiangwei.jpg', 'image/character/sp_jiangwei.jpg',
'image/character/sp_jiaxu.jpg',
'image/character/sp_lvmeng.jpg', 'image/character/sp_lvmeng.jpg',
'image/character/sp_machao.jpg', 'image/character/sp_machao.jpg',
'image/character/sp_pangtong.jpg', 'image/character/sp_pangtong.jpg',
'image/character/sp_pangde.jpg',
'image/character/sp_sunshangxiang.jpg', 'image/character/sp_sunshangxiang.jpg',
'image/character/sp_xiahoudun.jpg', 'image/character/sp_xiahoudun.jpg',
'image/character/sp_zhangfei.jpg', 'image/character/sp_zhangfei.jpg',
@ -2373,7 +2375,7 @@ window.noname_skin_list={
jiangqing:1, jiangqing:1,
jiangwei:4, jiangwei:4,
jianyong:2, jianyong:2,
jiaxu:4, jiaxu:3,
jsp_zhaoyun:1, jsp_zhaoyun:1,
kongrong:1, kongrong:1,
liaohua:2, liaohua:2,
@ -2393,7 +2395,7 @@ window.noname_skin_list={
maliang:1, maliang:1,
manchong:3, manchong:3,
mifuren:1, mifuren:1,
pangde:2, pangde:1,
pangtong:2, pangtong:2,
panzhangmazhong:2, panzhangmazhong:2,
re_caocao:2, re_caocao:2,

View File

@ -58,6 +58,7 @@
configprefix:'noname_0.9_', configprefix:'noname_0.9_',
versionOL:12, versionOL:12,
updateURL:localStorage.getItem('noname_update_url')||'http://websha.cn/', updateURL:localStorage.getItem('noname_update_url')||'http://websha.cn/',
devURL:'https://raw.githubusercontent.com/libccy/noname/master/',
assetURL:'', assetURL:'',
hallURL:'websha.cn', hallURL:'websha.cn',
changeLog:[], changeLog:[],
@ -146,7 +147,7 @@
name:'通用', name:'通用',
config:{ config:{
cheat:{ cheat:{
name:'控制台命令', name:'开发者模式',
init:false, init:false,
onclick:function(bool){ onclick:function(bool){
game.saveConfig('cheat',bool); game.saveConfig('cheat',bool);
@ -23824,24 +23825,33 @@
localStorage.setItem('noname_update_url',lib.updateURL); localStorage.setItem('noname_update_url',lib.updateURL);
} }
var button1,button2; var button1,button2,button3;
var span1,includeskin; var span1,includeskin;
game.checkForUpdate=function(forcecheck){ game.checkForUpdate=function(forcecheck,dev){
if(button1.disabled){ if(!dev&&button1.disabled){
return;
}
else if(dev&&button3.disabled){
return; return;
} }
else if(!game.download){ else if(!game.download){
alert('此版本不支持游戏内更新,请手动更新'); alert('此版本不支持游戏内更新,请手动更新');
return; return;
}
else{
if(dev){
button3.innerHTML='正在检查更新';
button3.disabled=true;
} }
else{ else{
button1.innerHTML='正在检查更新'; button1.innerHTML='正在检查更新';
button1.disabled=true; button1.disabled=true;
}
var goupdate=function(files){ var goupdate=function(files,update){
if(game.download){ if(game.download){
var script=lib.init.js(lib.updateURL,'game/source',function(){ var script=lib.init.js(dev?lib.devURL:lib.updateURL,'game/source',function(){
script.remove(); script.remove();
var updates=window.noname_source_list; var updates=window.noname_source_list;
delete window.noname_source_list; delete window.noname_source_list;
@ -23853,6 +23863,9 @@
if(updates[i].indexOf('theme/')==0&&updates[i].indexOf('style.css')==-1){ if(updates[i].indexOf('theme/')==0&&updates[i].indexOf('style.css')==-1){
updates.splice(i--,1); updates.splice(i--,1);
} }
else if(updates[i].indexOf('node_modules/')==0&&!update.node){
updates.splice(i--,1);
}
} }
if(!ui.arena.classList.contains('menupaused')){ if(!ui.arena.classList.contains('menupaused')){
@ -23861,6 +23874,7 @@
} }
var p=button1.parentNode; var p=button1.parentNode;
button1.remove(); button1.remove();
button3.remove();
var span=document.createElement('span'); var span=document.createElement('span');
var n1=0; var n1=0;
var n2=updates.length; var n2=updates.length;
@ -23910,6 +23924,8 @@
var script=lib.init.js(lib.updateURL,'game/update',function(){ var script=lib.init.js(lib.updateURL,'game/update',function(){
button1.disabled=false; button1.disabled=false;
button1.innerHTML='检查游戏更新'; button1.innerHTML='检查游戏更新';
button3.disabled=false;
button3.innerHTML='更新到开发版';
script.remove(); script.remove();
var update=window.noname_update; var update=window.noname_update;
delete window.noname_update; delete window.noname_update;
@ -23948,7 +23964,7 @@
str2, str2,
function(index){ function(index){
if(index==1){ if(index==1){
goupdate(files); goupdate(files,update);
} }
}, },
str, str,
@ -23957,7 +23973,7 @@
} }
else{ else{
if(confirm(str)){ if(confirm(str)){
goupdate(files); goupdate(files,update);
} }
} }
} }
@ -23971,6 +23987,8 @@
alert('连接失败'); alert('连接失败');
button1.disabled=false; button1.disabled=false;
button1.innerHTML='检查游戏更新'; button1.innerHTML='检查游戏更新';
button3.disabled=false;
button3.innerHTML='更新到开发版';
script.remove(); script.remove();
}); });
} }
@ -24061,6 +24079,17 @@
button1.innerHTML='检查游戏更新'; button1.innerHTML='检查游戏更新';
button1.onclick=game.checkForUpdate; button1.onclick=game.checkForUpdate;
li1.lastChild.appendChild(button1); li1.lastChild.appendChild(button1);
button3=document.createElement('button');
button3.innerHTML='更新到开发版';
button3.style.marginLeft='5px';
button3.onclick=function(){
game.checkForUpdate(null,true);
};
if(lib.config.cheat){
li1.lastChild.appendChild(button3);
}
button2=document.createElement('button'); button2=document.createElement('button');
button2.innerHTML='检查素材更新'; button2.innerHTML='检查素材更新';
button2.onclick=game.checkForAssetUpdate; button2.onclick=game.checkForAssetUpdate;

View File

@ -1,29 +1,13 @@
window.noname_update={ window.noname_update={
version:'1.8.19.7', version:'1.8.20',
changeLog:[ changeLog:[
'修bug', '新武将',
'扩展工具改进',
], ],
files:{ files:{
global:[ global:[
'game/game.js', 'game/game.js',
'game/asset.js',
], ],
'1.8.19.6':[], '1.8.19.7':[],
'1.8.19.5':[
'character/hearth.js',
'character/swd.js',
'character/ow.js',
'character/sp.js',
'character/shenhua.js',
'character/yxs.js',
'character/xianjian.js',
'character/rank.js',
'card/swd.js',
'card/hearth.js',
'layout/default/menu.css',
'layout/default/layout.css',
'layout/mobile/layout.css',
'layout/newlayout/global.css',
],
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB