From 06f9198dacf658d377b9966ef2473ccc7b15df45 Mon Sep 17 00:00:00 2001 From: lieren2023 <131325076+lieren2023@users.noreply.github.com> Date: Sun, 19 May 2024 19:36:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=8D=E7=94=9F=E6=8A=80=E8=83=BD=E5=8F=B0?= =?UTF-8?q?=E8=AF=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/ui/click/index.js | 69 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/noname/ui/click/index.js b/noname/ui/click/index.js index 5f57cd088..1ff13697a 100644 --- a/noname/ui/click/index.js +++ b/noname/ui/click/index.js @@ -3366,6 +3366,21 @@ export class Click { const voiceMap = game.parseSkillText(skill, name, null, true); if(voiceMap.length) skillAudioMap.set(skill, voiceMap); }); + const derivationSkillAudioMap = new Map(); + nameinfo.skills.forEach(skill => { + var info = get.info(skill); + if(info.derivation) { + var derivation = info.derivation; + if(typeof derivation == 'string') { + derivation = [derivation]; + } + for(var i=0; i 0) { const eleHr = document.createElement("hr"); eleHr.style.marginTop = "11px"; @@ -3391,6 +3406,27 @@ export class Click { }); }); } + if (derivationSkillAudioMap.size > 0) { + const derivationSkillNameSpan = document.createElement("span"); + derivationSkillNameSpan.style.lineHeight = "1.7"; + derivationSkillNameSpan.innerHTML = `• 衍生技能台词
`; + intro.appendChild(derivationSkillNameSpan); + derivationSkillAudioMap.forEach((texts, skill) => { + const derivationSkillNameSpan1 = document.createElement("span"), + derivationSkillNameSpanStyle1 = derivationSkillNameSpan1.style; + derivationSkillNameSpanStyle1.fontWeight = "bold"; + derivationSkillNameSpanStyle1.fontSize = "15.7px"; + derivationSkillNameSpanStyle1.lineHeight = "1.4"; + derivationSkillNameSpan1.innerHTML = `${get.translation(skill)}
`; + intro.appendChild(derivationSkillNameSpan1); + texts.forEach((text, index) => { + const derivationSkillTextSpan = document.createElement("span"); + derivationSkillTextSpan.style.fontSize = "15.2px"; + derivationSkillTextSpan.innerHTML = `${texts.length > 1 ? `${index + 1}. ` : ""}${text}
`; + intro.appendChild(derivationSkillTextSpan); + }); + }); + } if (dieAudios.length > 0) { const skillNameSpan2 = document.createElement("span"), skillNameSpanStyle2 = skillNameSpan2.style; @@ -3683,6 +3719,21 @@ export class Click { const voiceMap = game.parseSkillText(skill, name, null, true); if(voiceMap.length) skillAudioMap.set(skill, voiceMap); }); + const derivationSkillAudioMap = new Map(); + nameInfo.skills.forEach(skill => { + var info = get.info(skill); + if(info.derivation) { + var derivation = info.derivation; + if(typeof derivation == 'string') { + derivation = [derivation]; + } + for(var i=0; i 0) { introduction.appendChild(document.createElement("hr")); @@ -3705,6 +3756,24 @@ export class Click { }); } + if (derivationSkillAudioMap.size > 0) { + const derivationSkillNameSpan = document.createElement("span"); + derivationSkillNameSpan.innerHTML = `
衍生技能台词
`; + introduction.appendChild(derivationSkillNameSpan); + derivationSkillAudioMap.forEach((texts, skill) => { + const derivationSkillNameSpan1 = document.createElement("span"), + derivationSkillNameSpanStyle1 = derivationSkillNameSpan1.style; + derivationSkillNameSpanStyle1.fontWeight = "bold"; + derivationSkillNameSpan1.innerHTML = `
${get.translation(skill)}
`; + introduction.appendChild(derivationSkillNameSpan1); + texts.forEach((text, index) => { + const derivationSkillTextSpan = document.createElement("span"); + derivationSkillTextSpan.innerHTML = `${texts.length > 1 ? `${index + 1}. ` : ""}${text}
`; + introduction.appendChild(derivationSkillTextSpan); + }); + }); + } + if (dieAudios.length > 0) { const skillNameSpan = document.createElement("span"), skillNameSpanStyle = skillNameSpan.style;