Merge pull request #423 from lieren2023/lieren2023-patch-28

新增显示角色性别和显示角色势力开关
This commit is contained in:
Spmario233 2023-09-29 23:57:42 +08:00 committed by GitHub
commit 05e44cb1f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 4 deletions

View File

@ -3856,6 +3856,18 @@
}
}
},
show_sex:{
name:'显示角色性别',
intro:'在角色的右键菜单中显示角色性别',
init:true,
unfrequent:true
},
show_group:{
name:'显示角色势力',
intro:'在角色的右键菜单中显示角色势力',
init:true,
unfrequent:true
},
show_replay:{
name:'显示重来按钮',
init:false,
@ -58198,9 +58210,9 @@
}
let capt=get.translation(node.name);
const characterInfo=get.character(node.name),sex=node.sex||characterInfo[0];
if(sex) capt+=`  ${sex=='none'?'无':get.translation(sex)}`;
if(sex&&lib.config.show_sex) capt+=`  ${sex=='none'?'无':get.translation(sex)}`;
const group=lib.group.includes(node.group)?node.group:characterInfo[1];
if(group) capt+=`  ${get.translation(group)}`;
if(group&&lib.config.show_group) capt+=`  ${get.translation(group)}`;
uiintro.add(capt);
if(lib.characterTitle[node.name]){
@ -58909,9 +58921,9 @@
let capt=get.translation(character);
if(characterInfo){
const infoSex=characterInfo[0];
if(infoSex) capt+=`  ${infoSex=='none'?'无':lib.translate[infoSex]}`;
if(infoSex&&lib.config.show_sex) capt+=`  ${infoSex=='none'?'无':lib.translate[infoSex]}`;
const infoGroup=characterInfo[1];
if(infoGroup){
if(infoGroup&&lib.config.show_group){
const group=get.is.double(character,true);
if(group) capt+=`  ${group.map(value=>get.translation(value)).join('/')}`;
else capt+=`  ${lib.translate[infoGroup]}`;