🚸 调整解析逻辑&渲染

This commit is contained in:
BTMuli
2025-12-22 17:39:16 +08:00
parent a2ff92d00a
commit 605efacf67
4 changed files with 72 additions and 25 deletions

View File

@@ -98,9 +98,12 @@ function parseBirthScenes(
if (imgKey.startsWith("aether")) {
img2Src = src.resource.find((i) => i.id === imgKey.replace("aether", "lumine"))?.src ?? "";
}
const roleKey = dialogEl.getAttribute("chara") ?? "";
let roleName = src.roles.find((i) => i.id === roleKey)?.name ?? "";
if (roleName === "text") roleName = "";
const scriptItem: TGApp.Archive.Birth.GalDialog = {
key: dialogEl.getAttribute("key") ?? "",
role: dialogEl.getAttribute("chara") ?? undefined,
role: roleName,
img: imgSrc,
img2: img2Src,
pos: dialogEl.getAttribute("pos") ?? undefined,