This commit is contained in:
libccy 2016-07-29 01:12:38 +08:00
parent caff7c78f8
commit 4860981999
2 changed files with 44 additions and 10 deletions

View File

@ -22477,7 +22477,9 @@
confirmcontainer.style.display='none'; confirmcontainer.style.display='none';
container.code='card='+get.stringify(lib.card[selectname.value]); container.code='card='+get.stringify(lib.card[selectname.value]);
codeButton.onclick.call(codeButton); codeButton.onclick.call(codeButton);
newCard.querySelector('input.new_description').value=lib.translate[selectname.value+'_info']; if(lib.translate[selectname.value+'_info']){
newCard.querySelector('input.new_description').value=lib.translate[selectname.value+'_info'];
}
} }
var citecancel=document.createElement('button'); var citecancel=document.createElement('button');
@ -22968,26 +22970,46 @@
} }
return a>b?1:-1; return a>b?1:-1;
}); });
list.push(['others','其它']);
var list2=[]; var list2=[];
var skills=lib.character[list[0][0]][3]; var skills=lib.character[list[0][0]][3];
for(var i=0;i<skills.length;i++){ for(var i=0;i<skills.length;i++){
list2.push([skills[i],lib.translate[skills[i]]]); list2.push([skills[i],lib.translate[skills[i]]]);
} }
var selectname=ui.create.selectlist(list,list[0],commandline); var selectname=ui.create.selectlist(list,list[0],commandline);
var list3=[];
for(var i in lib.skill){
if(i!='global'&&!get.emptyobj(lib.skill[i])&&!lib.skilllist.contains(i)){
list3.push(i);
}
}
selectname.onchange=function(){ selectname.onchange=function(){
var skills=lib.character[this.value][3]; var skills;
skillopt.innerHTML=''; skillopt.innerHTML='';
for(var i=0;i<skills.length;i++){ if(this.value=='others'){
var option=document.createElement('option'); skills=list3;
option.value=skills[i]; for(var i=0;i<skills.length;i++){
option.innerHTML=lib.translate[skills[i]]; var option=document.createElement('option');
skillopt.appendChild(option); option.value=skills[i];
} option.innerHTML=skills[i];
skillopt.appendChild(option);
}
}
else{
skills=lib.character[this.value][3];
for(var i=0;i<skills.length;i++){
var option=document.createElement('option');
option.value=skills[i];
option.innerHTML=lib.translate[skills[i]];
skillopt.appendChild(option);
}
}
}; };
selectname.style.display='none'; selectname.style.display='none';
selectname.style.maxWidth='80px'; selectname.style.maxWidth='80px';
var skillopt=ui.create.selectlist(list2,list2[0],commandline); var skillopt=ui.create.selectlist(list2,list2[0],commandline);
skillopt.style.display='none'; skillopt.style.display='none';
skillopt.style.maxWidth='60px';
var addSkillButton=document.createElement('button'); var addSkillButton=document.createElement('button');
addSkillButton.style.display='none'; addSkillButton.style.display='none';
addSkillButton.innerHTML='引用'; addSkillButton.innerHTML='引用';
@ -23001,7 +23023,9 @@
cancelSkillButton.style.display='none'; cancelSkillButton.style.display='none';
container.code='skill='+get.stringify(lib.skill[skillopt.value]); container.code='skill='+get.stringify(lib.skill[skillopt.value]);
editbutton.onclick.call(editbutton); editbutton.onclick.call(editbutton);
newSkill.querySelector('input.new_description').value=lib.translate[skillopt.value+'_info']; if(lib.translate[skillopt.value+'_info']){
newSkill.querySelector('input.new_description').value=lib.translate[skillopt.value+'_info'];
}
} }
var cancelSkillButton=document.createElement('button'); var cancelSkillButton=document.createElement('button');
cancelSkillButton.style.display='none'; cancelSkillButton.style.display='none';
@ -28724,6 +28748,16 @@
else{ else{
if(typeof obj=='function'){ if(typeof obj=='function'){
str=obj.toString(); str=obj.toString();
str=str.replace(/\t/g,' ');
var i=str.lastIndexOf('\n');
var num=0;
for(var j=i+1;j<str.length&&str[j]==' ';j++){
num++;
}
num=Math.floor(num/4);
for(i=0;i<num-level;i++){
str=str.replace(/\n /g,'\n');
}
} }
else{ else{
try{ try{

View File

@ -2,7 +2,7 @@ window.noname_update={
version:'1.8.19.5', version:'1.8.19.5',
changeLog:[ changeLog:[
'***注意:更新后将无法使用或导出自定义武将,请自行备份***', '***注意:更新后将无法使用或导出自定义武将,请自行备份***',
'扩展代码编辑格式改动(见默认代码,现有代码不用改)', '扩展工具代码格式改动(见默认代码,现有代码不用改)',
'修bug', '修bug',
], ],
files:{ files:{