From 71f0270a1f4c563ac9fad3423acdc6d6b8d9d4d7 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Thu, 14 Dec 2023 18:14:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E9=87=8D=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 48 ++++++------------------------------------------ 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/game/game.js b/game/game.js index 542d2eff8..59fadf260 100644 --- a/game/game.js +++ b/game/game.js @@ -37688,30 +37688,12 @@ new Promise(resolve=>{ let audioInfo=info.audio; if(info.audioname2){ - if(player.name&&info.audioname2[player.name]) audioInfo=info.audioname2[player.name]; - else if(player.name1&&info.audioname2[player.name1]) audioInfo=info.audioname2[player.name1]; - else if(player.name2&&info.audioname2[player.name2]) audioInfo=info.audioname2[player.name2]; + if(info.audioname2[player.name]) audioInfo=info.audioname2[player.name]; + else if(info.audioname2[player.name1]) audioInfo=info.audioname2[player.name1]; + else if(info.audioname2[player.name2]) audioInfo=info.audioname2[player.name2]; else if(player.tempname){ const name=player.tempname.find(i=>info.audioname2[i]); if(name) audioInfo=info.audioname2[name]; - else if(player.name&&get.character(player.name)&&get.character(player.name)[4]&&get.character(player.name)[4].some(tag=>tag.startsWith('tempname:'))){ - const list=get.character(player.name)[4].find(tag=>tag.startsWith('tempname:')); - list=list.split(':').slice(1); - const name=list.find(i=>info.audioname2[i]); - if(name) audioInfo=info.audioname2[name]; - else if(player.name1&&get.character(player.name1)&&get.character(player.name1)[4]&&get.character(player.name1)[4].some(tag=>tag.startsWith('tempname:'))){ - const list=get.character(player.name1)[4].find(tag=>tag.startsWith('tempname:')); - list=list.split(':').slice(1); - const name=list.find(i=>info.audioname2[i]); - if(name) audioInfo=info.audioname2[name]; - else if(player.name2&&get.character(player.name2)&&get.character(player.name2)[4]&&get.character(player.name2)[4].some(tag=>tag.startsWith('tempname:'))){ - const list=get.character(player.name2)[4].find(tag=>tag.startsWith('tempname:')); - list=list.split(':').slice(1); - const name=list.find(i=>info.audioname2[i]); - if(name) audioInfo=info.audioname2[name]; - } - } - } } } if(typeof audioInfo=='function') audioInfo=audioInfo(player); @@ -37754,30 +37736,12 @@ new Promise(resolve=>{ let list=audioInfo.match(/(?:(.*):|^)(true|\d+)(?::(.*)|$)/); if(list&&list[2]){ let _audioname=''; - if(player.name&&audioname.includes(player.name)) _audioname=`_${player.name}`; - else if(player.name1&&audioname.includes(player.name1)) _audioname=`_${player.name1}`; - else if(player.name2&&audioname.includes(player.name2)) _audioname=`_${player.name2}`; + if(audioname.includes(player.name)) _audioname=`_${player.name}`; + else if(audioname.includes(player.name1)) _audioname=`_${player.name1}`; + else if(audioname.includes(player.name2)) _audioname=`_${player.name2}`; else if(player.tempname){ const name=player.tempname.find(i=>audioname.includes(i)); if(name) _audioname=`_${name}`; - else if(player.name&&get.character(player.name)&&get.character(player.name)[4]&&get.character(player.name)[4].some(tag=>tag.startsWith('tempname:'))){ - const list=get.character(player.name)[4].find(tag=>tag.startsWith('tempname:')); - list=list.split(':').slice(1); - const name=list.find(i=>audioname.includes(i)); - if(name) _audioname=`_${name}`; - else if(player.name1&&get.character(player.name1)&&get.character(player.name1)[4]&&get.character(player.name1)[4].some(tag=>tag.startsWith('tempname:'))){ - const list=get.character(player.name1)[4].find(tag=>tag.startsWith('tempname:')); - list=list.split(':').slice(1); - const name=list.find(i=>audioname.includes(i)); - if(name) _audioname=`_${name}`; - else if(player.name2&&get.character(player.name2)&&get.character(player.name2)[4]&&get.character(player.name2)[4].some(tag=>tag.startsWith('tempname:'))){ - const list=get.character(player.name2)[4].find(tag=>tag.startsWith('tempname:')); - list=list.split(':').slice(1); - const name=list.find(i=>audioname.includes(i)); - if(name) _audioname=`_${name}`; - } - } - } } list=list.slice(1);//[路径,number/true,格式]