QB Transforming Improvements (#613)

[INTERNAL]
This commit is contained in:
Integer Limit 2024-02-10 16:12:20 +11:00 committed by GitHub
parent 03b4351237
commit 4ad7d66404
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,9 +29,9 @@ function transformKeyPairs(
// Push lang file lines.
lines.push(
`# ${namespace} ${storeKey} of mode ${mode}`,
`${titleKey}=${escapeString(properties["name:8"])}`,
`${descKey}=${escapeString(properties["desc:8"])}`,
`# ${namespace} ${storeKey} of mode ${mode}`.trimEnd(),
`${titleKey}=${escapeString(properties["name:8"])}`.trimEnd(),
`${descKey}=${escapeString(properties["desc:8"])}`.trimEnd(),
"",
);
@ -106,8 +106,8 @@ export async function transformQuestBook(): Promise<void> {
const questPathExpertSource = upath.join(sharedQBDefaults, "saved_quests", "ExpertQuests.json");
// Quest Book Objects
const questBookNormal: QuestBook = JSON.parse((await fs.promises.readFile(questPathNormalSource)).toString());
const questBookExpert: QuestBook = JSON.parse((await fs.promises.readFile(questPathExpertSource)).toString());
const questBookNormal: QuestBook = JSON.parse(await fs.promises.readFile(questPathNormalSource, "utf-8"));
const questBookExpert: QuestBook = JSON.parse(await fs.promises.readFile(questPathExpertSource, "utf-8"));
// Quest Book Paths
const questPathNormalDefault = upath.join(sharedQBDefaults, "DefaultQuests.json");
@ -123,6 +123,13 @@ export async function transformQuestBook(): Promise<void> {
// Extract title/desc pairs into a lang file.
const lines: string[] = [];
lines.push(
"# DO NOT EDIT THIS FILE!",
"# THIS IS A SOURCE FILE ONLY!",
"# See https://github.com/Nomi-CEu/Nomi-CEu/wiki/Part-1:-Contributing-Information#section-2-quest-book-contributing FOR HOW TO EDIT THE QUEST BOOK!",
"",
);
lines.push("# Normal Quest Lang Entries:", "");
// Normal Mode Quest lines.