feat: 補齊工具一(最新章節狀態、作品用語、語言欄位、貼上章節、台詞引號檢查)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
root
2026-10-15 08:34:36 +00:00
co-authored by Claude Sonnet 5.5
parent 8c25728206
commit fb04b0fa23
7 changed files with 89 additions and 10 deletions
+2 -1
View File
@@ -255,7 +255,8 @@ async function loadPacks($: Engine): Promise<void> {
const index = JSON.parse(await $.fs.read(`${dir}index.json`)) as { packs: { work: string; workName: string; slug: string }[] }
for (const i of index.packs) {
const pack = JSON.parse(await $.fs.read(`${dir}${i.work}/${i.slug}.json`)) as PackLike
registerCharacters([packToCharacter(pack, i.workName)])
const work = (await $.fs.exists(`${dir}${i.work}/work.json`)) ? (JSON.parse(await $.fs.read(`${dir}${i.work}/work.json`)) as { terms?: { term: string; definition: string }[] }) : undefined
registerCharacters([packToCharacter(pack, i.workName, work?.terms ?? [])])
}
} catch {
// 角色包損壞不影響內建角色。