feat: 補齊工具一(最新章節狀態、作品用語、語言欄位、貼上章節、台詞引號檢查)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
8c25728206
commit
fb04b0fa23
+2
-1
@@ -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 {
|
||||
// 角色包損壞不影響內建角色。
|
||||
|
||||
Reference in New Issue
Block a user