Merge pull request #1368 from lieren2023/codespace-miniature-umbrella-6j4j65pj7rpfrg6j
衍生技能台词显示
This commit is contained in:
commit
2d49cc2b3f
|
@ -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<derivation.length; i++) {
|
||||
if (derivation[i].indexOf('_faq') != -1) continue;
|
||||
const derivationVoiceMap = game.parseSkillText(derivation[i], name, null, true);
|
||||
if(derivationVoiceMap.length) derivationSkillAudioMap.set(derivation[i], derivationVoiceMap);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (dieAudios.length || skillAudioMap.size > 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 = `• 衍生技能台词<br>`;
|
||||
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)}<br>`;
|
||||
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}<br>`;
|
||||
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<derivation.length; i++) {
|
||||
if (derivation[i].indexOf('_faq') != -1) continue;
|
||||
const derivationVoiceMap = game.parseSkillText(derivation[i], name, null, true);
|
||||
if(derivationVoiceMap.length) derivationSkillAudioMap.set(derivation[i], derivationVoiceMap);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (dieAudios.length || skillAudioMap.size > 0) {
|
||||
introduction.appendChild(document.createElement("hr"));
|
||||
|
||||
|
@ -3705,6 +3756,24 @@ export class Click {
|
|||
});
|
||||
}
|
||||
|
||||
if (derivationSkillAudioMap.size > 0) {
|
||||
const derivationSkillNameSpan = document.createElement("span");
|
||||
derivationSkillNameSpan.innerHTML = `<br>衍生技能台词<br>`;
|
||||
introduction.appendChild(derivationSkillNameSpan);
|
||||
derivationSkillAudioMap.forEach((texts, skill) => {
|
||||
const derivationSkillNameSpan1 = document.createElement("span"),
|
||||
derivationSkillNameSpanStyle1 = derivationSkillNameSpan1.style;
|
||||
derivationSkillNameSpanStyle1.fontWeight = "bold";
|
||||
derivationSkillNameSpan1.innerHTML = `<br>${get.translation(skill)}<br>`;
|
||||
introduction.appendChild(derivationSkillNameSpan1);
|
||||
texts.forEach((text, index) => {
|
||||
const derivationSkillTextSpan = document.createElement("span");
|
||||
derivationSkillTextSpan.innerHTML = `${texts.length > 1 ? `${index + 1}. ` : ""}${text}<br>`;
|
||||
introduction.appendChild(derivationSkillTextSpan);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (dieAudios.length > 0) {
|
||||
const skillNameSpan = document.createElement("span"),
|
||||
skillNameSpanStyle = skillNameSpan.style;
|
||||
|
|
Loading…
Reference in New Issue