rpg-engine 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/campaign/choices.d.ts +30 -0
- package/dist/campaign/choices.js +84 -0
- package/dist/campaign/index.d.ts +4 -1
- package/dist/campaign/index.js +4 -1
- package/dist/campaign/last-choices.d.ts +6 -0
- package/dist/campaign/last-choices.js +34 -0
- package/dist/campaign/levels.d.ts +50 -0
- package/dist/campaign/levels.js +189 -0
- package/dist/campaign/settings.d.ts +35 -13
- package/dist/campaign/settings.js +20 -51
- package/dist/commands/ask.d.ts +8 -0
- package/dist/commands/ask.js +2 -1
- package/dist/commands/change/change.js +6 -4
- package/dist/commands/choices.d.ts +64 -0
- package/dist/commands/choices.js +216 -0
- package/dist/commands/config.d.ts +8 -1
- package/dist/commands/config.js +165 -21
- package/dist/commands/effect.d.ts +1 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +8 -4
- package/dist/commands/rename.js +8 -3
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/shared/experience.d.ts +9 -2
- package/dist/commands/shared/experience.js +42 -7
- package/dist/commands/shared/inputs.d.ts +2 -2
- package/dist/commands/shared/inputs.js +15 -2
- package/dist/commands/shared/knowledge.d.ts +2 -0
- package/dist/commands/shared/knowledge.js +5 -0
- package/dist/commands/shared/mode.js +10 -3
- package/dist/commands/shared/offers.d.ts +3 -1
- package/dist/commands/shared/offers.js +6 -1
- package/dist/commands/shared/page-words.d.ts +4 -0
- package/dist/commands/shared/page-words.js +7 -7
- package/dist/commands/shared/rules.js +5 -1
- package/dist/commands/shared/system-texts.d.ts +11 -0
- package/dist/commands/shared/system-texts.js +203 -0
- package/dist/commands/shared/time.d.ts +6 -0
- package/dist/commands/shared/time.js +35 -3
- package/dist/commands/shared/upkeep.js +3 -3
- package/dist/commands/shared/world.d.ts +2 -0
- package/dist/commands/shared/world.js +20 -7
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.js +15 -7
- package/dist/commands/view/view.d.ts +4 -0
- package/dist/commands/view/view.js +24 -10
- package/dist/commands/write/write.d.ts +3 -3
- package/dist/commands/write/write.js +5 -2
- package/dist/core/context.d.ts +16 -0
- package/dist/core/files.js +2 -3
- package/dist/core/language.d.ts +2 -0
- package/dist/core/language.js +8 -0
- package/dist/core/text.d.ts +2 -0
- package/dist/core/text.js +5 -0
- package/dist/dashboard/address.js +8 -1
- package/dist/dashboard/api.js +20 -0
- package/dist/dashboard/app.js +20 -7
- package/dist/dashboard/choices.js +338 -0
- package/dist/dashboard/guide/ar.md +8 -8
- package/dist/dashboard/guide/cs.md +8 -8
- package/dist/dashboard/guide/da.md +9 -9
- package/dist/dashboard/guide/de.md +8 -8
- package/dist/dashboard/guide/el.md +10 -10
- package/dist/dashboard/guide/en.md +7 -7
- package/dist/dashboard/guide/es.md +8 -8
- package/dist/dashboard/guide/fi.md +8 -8
- package/dist/dashboard/guide/fr.md +8 -8
- package/dist/dashboard/guide/he.md +8 -8
- package/dist/dashboard/guide/hi.md +8 -8
- package/dist/dashboard/guide/hu.md +8 -8
- package/dist/dashboard/guide/is.md +9 -9
- package/dist/dashboard/guide/it.md +8 -8
- package/dist/dashboard/guide/ja.md +8 -8
- package/dist/dashboard/guide/ko.md +9 -9
- package/dist/dashboard/guide/nb.md +9 -9
- package/dist/dashboard/guide/nl.md +8 -8
- package/dist/dashboard/guide/pl.md +8 -8
- package/dist/dashboard/guide/pt.md +8 -8
- package/dist/dashboard/guide/ro.md +8 -8
- package/dist/dashboard/guide/ru.md +8 -8
- package/dist/dashboard/guide/sv.md +8 -8
- package/dist/dashboard/guide/tr.md +8 -8
- package/dist/dashboard/guide/uk.md +8 -8
- package/dist/dashboard/guide/zh.md +8 -8
- package/dist/dashboard/i18n/ar.json +81 -1
- package/dist/dashboard/i18n/cs.json +81 -1
- package/dist/dashboard/i18n/da.json +81 -1
- package/dist/dashboard/i18n/de.json +81 -1
- package/dist/dashboard/i18n/el.json +81 -1
- package/dist/dashboard/i18n/es.json +81 -1
- package/dist/dashboard/i18n/fi.json +81 -1
- package/dist/dashboard/i18n/fr.json +81 -1
- package/dist/dashboard/i18n/he.json +81 -1
- package/dist/dashboard/i18n/hi.json +81 -1
- package/dist/dashboard/i18n/hu.json +81 -1
- package/dist/dashboard/i18n/is.json +81 -1
- package/dist/dashboard/i18n/it.json +81 -1
- package/dist/dashboard/i18n/ja.json +81 -1
- package/dist/dashboard/i18n/ko.json +81 -1
- package/dist/dashboard/i18n/nb.json +81 -1
- package/dist/dashboard/i18n/nl.json +81 -1
- package/dist/dashboard/i18n/pl.json +81 -1
- package/dist/dashboard/i18n/pt.json +81 -1
- package/dist/dashboard/i18n/ro.json +81 -1
- package/dist/dashboard/i18n/ru.json +81 -1
- package/dist/dashboard/i18n/sv.json +81 -1
- package/dist/dashboard/i18n/tr.json +81 -1
- package/dist/dashboard/i18n/uk.json +81 -1
- package/dist/dashboard/i18n/zh.json +81 -1
- package/dist/dashboard/icons.js +4 -0
- package/dist/dashboard/labels.js +32 -0
- package/dist/dashboard/notices.js +9 -2
- package/dist/dashboard/party.js +13 -5
- package/dist/dashboard/saves.js +1 -1
- package/dist/dashboard/settings.js +89 -40
- package/dist/dashboard/setup.js +1 -1
- package/dist/dashboard/sheet.js +3 -2
- package/dist/dashboard/style.css +729 -1
- package/dist/dashboard/text.js +7 -2
- package/dist/dashboard/top.js +8 -4
- package/dist/documents/png.d.ts +2 -3
- package/dist/documents/png.js +6 -6
- package/dist/documents/read.js +2 -1
- package/dist/extensions/words.js +2 -1
- package/dist/languages/language-pack.js +2 -2
- package/dist/pages/index.d.ts +1 -1
- package/dist/pages/index.js +1 -1
- package/dist/pages/world.d.ts +5 -0
- package/dist/pages/world.js +22 -11
- package/dist/server/dashboard/choices.d.ts +38 -0
- package/dist/server/dashboard/choices.js +174 -0
- package/dist/server/dashboard/files.js +3 -2
- package/dist/server/dashboard/index.d.ts +3 -1
- package/dist/server/dashboard/index.js +20 -2
- package/dist/server/mcp.js +3 -1
- package/dist/systems/game-system.js +2 -1
- package/dist/systems/words.js +2 -1
- package/dist/testing/index.js +1 -1
- package/dist/time/game-date.d.ts +9 -0
- package/dist/time/game-date.js +9 -0
- package/dist/time/index.d.ts +1 -1
- package/dist/time/index.js +1 -1
- package/instructions/dashboard-guide.md +1 -1
- package/instructions/play.md +1 -1
- package/package.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// The mode of the campaign, the main state of the game (D-77): setup, session zero or play, each opened by the checklist of the one before (D-221, D-241; MOD-1–MOD-7).
|
|
2
2
|
import { basename } from "node:path";
|
|
3
|
-
import { companionWays, diceWays, difficulties, lethalities, masterRollWays, missingSettings, preparations, readSettings, readStateValues, rigors, saveModes, unansweredSettings, unitSystems, } from "../../campaign/index.js";
|
|
3
|
+
import { companionWays, diceWays, difficulties, lastChoices, lethalities, masterRollWays, missingSettings, preparations, readSettings, readStateValues, rigors, saveModes, unansweredSettings, unitSystems, } from "../../campaign/index.js";
|
|
4
4
|
import { readLog } from "../../core/log.js";
|
|
5
5
|
import { comparableText } from "../../core/text.js";
|
|
6
6
|
import { isInParty, playerCharacters } from "../../pages/index.js";
|
|
7
7
|
import { missingSettingsNote } from "./notes.js";
|
|
8
|
-
import { missingWithSystems, offeredLabel } from "./offers.js";
|
|
8
|
+
import { missingWithSystems, offeredLabel, offeredValues } from "./offers.js";
|
|
9
9
|
import { partText } from "./parts.js";
|
|
10
10
|
import { missingSheetFields } from "./sheet.js";
|
|
11
11
|
import { campaignSystem, campaignWorld } from "./world.js";
|
|
@@ -128,7 +128,14 @@ function writtenMode(root) {
|
|
|
128
128
|
function setupMissing(root, context, world, brief) {
|
|
129
129
|
const unanswered = unansweredSettings(readSettings(root), world.pages.length > 0);
|
|
130
130
|
const label = (name) => (brief ? valueLabels[name] : undefined) ?? settingLabels[name];
|
|
131
|
-
|
|
131
|
+
// The player's choice in their last campaign, which the setup offers first (T-134), when the game offers it.
|
|
132
|
+
const last = lastChoices(context.home);
|
|
133
|
+
const withLast = (name, text) => {
|
|
134
|
+
const value = last[name];
|
|
135
|
+
const offered = offeredValues(root, context, name);
|
|
136
|
+
return value === undefined || (offered !== undefined && !offered.includes(value)) ? text : `${text}, in their last campaign ${value}: offer it first`;
|
|
137
|
+
};
|
|
138
|
+
return missingWithSystems(root, unanswered, context).map((name) => withLast(name, offeredLabel(root, context, name) ?? label(name) ?? name));
|
|
132
139
|
}
|
|
133
140
|
/** What session zero still has to make (MOD-4): a living player character, the companions the setup said are made in it, and the sheets they keep, whole. */
|
|
134
141
|
function sessionZeroMissing(root, context, world) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SettingName } from "../../campaign/index.ts";
|
|
1
|
+
import { type rigorItems, type SettingName } from "../../campaign/index.ts";
|
|
2
2
|
import type { Context } from "../../core/context.ts";
|
|
3
3
|
import { type SystemSetting } from "../../systems/index.ts";
|
|
4
4
|
/** The settings of the system that hold in the campaign, in the system's order (DAT-17): those no value asks, and those a value it plays asks. */
|
|
@@ -7,6 +7,8 @@ export declare function heldSystemSettings(root: string, context: Context): Syst
|
|
|
7
7
|
export declare function offeredValues(root: string, context: Context, name: string): string[] | undefined;
|
|
8
8
|
/** An engine's setting as the campaign plays it (DAT-16): the one value the game offers, else the written one when the game offers it; undefined while it is to be asked. */
|
|
9
9
|
export declare function playedEngineSetting(root: string, context: Context, name: string): unknown;
|
|
10
|
+
/** The level the campaign plays an item of the rigor at (DAT-16, T-132): the rigor played, or the item's own when it is custom; undefined while it is to be asked. */
|
|
11
|
+
export declare function playedRigor(root: string, context: Context, item: (typeof rigorItems)[number]): string | undefined;
|
|
10
12
|
/** Whether the game plays an engine's setting with one value alone (DAT-16): no choice, never asked nor shown to the player. */
|
|
11
13
|
export declare function isFixedSetting(root: string, context: Context, name: string): boolean;
|
|
12
14
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// What the campaign's game system offers of the engine's settings (DAT-16), the settings of its own that a value asks (DAT-17), and the parts its values choose (DAT-18).
|
|
2
|
-
import { readSettings, settingNames } from "../../campaign/index.js";
|
|
2
|
+
import { customLevel, customLevels, customSettings, readOneSetting, readSettings, settingNames } from "../../campaign/index.js";
|
|
3
3
|
import { sameWord } from "../../core/text.js";
|
|
4
4
|
import { engineOfferings, engineSettingValue, heldSettings, offeredEngineValues, playedValueOf, readableSystems } from "../../systems/index.js";
|
|
5
5
|
import { partText } from "./parts.js";
|
|
@@ -17,6 +17,11 @@ export function offeredValues(root, context, name) {
|
|
|
17
17
|
export function playedEngineSetting(root, context, name) {
|
|
18
18
|
return engineSettingValue(campaignSystem(root, context), played(root, context), name, readSettings(root)[name]);
|
|
19
19
|
}
|
|
20
|
+
/** The level the campaign plays an item of the rigor at (DAT-16, T-132): the rigor played, or the item's own when it is custom; undefined while it is to be asked. */
|
|
21
|
+
export function playedRigor(root, context, item) {
|
|
22
|
+
const rigor = playedEngineSetting(root, context, "rigor");
|
|
23
|
+
return rigor === customLevel ? customLevels("rigor", readOneSetting(root, customSettings.rigor))[item] : typeof rigor === "string" ? rigor : undefined;
|
|
24
|
+
}
|
|
20
25
|
/** Whether the game plays an engine's setting with one value alone (DAT-16): no choice, never asked nor shown to the player. */
|
|
21
26
|
export function isFixedSetting(root, context, name) {
|
|
22
27
|
return offeredValues(root, context, name)?.length === 1;
|
|
@@ -50,3 +50,7 @@ export declare function keepChatAnswer(home: string, page: string, language: str
|
|
|
50
50
|
export declare function languageName(language: string): string;
|
|
51
51
|
/** The game system's words in a language translated on the fly, in the player's data folder; none where it has none there. */
|
|
52
52
|
export declare function homeSystemWords(home: string | undefined, system: WordsSystem, language: string): SystemWords | undefined;
|
|
53
|
+
/** Whether a translation is garbled: it has what a misread encoding leaves, and what it translates has not. */
|
|
54
|
+
export declare function isGarbled(text: string, source: string): boolean;
|
|
55
|
+
/** The JSON object in a writer's answer, whatever came around it; none when there is none. */
|
|
56
|
+
export declare function answerOf(text: string | undefined): Record<string, unknown>;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { stringify } from "yaml";
|
|
7
|
+
import { codeAndBase } from "../../core/language.js";
|
|
7
8
|
import { files } from "../../core/store.js";
|
|
8
9
|
import { languagePackFor, packPhrases } from "../../languages/index.js";
|
|
9
10
|
import { layeredSystemWords, systemContentFolders, systemWords } from "../../systems/index.js";
|
|
@@ -74,8 +75,8 @@ export function pageTranslator(context, page, notify) {
|
|
|
74
75
|
const chatBatchSize = 160;
|
|
75
76
|
/** Whether the built page in `page` ships a language: its own file, its base language's (pt-BR, pt), or English. */
|
|
76
77
|
export function shipsLanguage(page, language) {
|
|
77
|
-
const
|
|
78
|
-
return
|
|
78
|
+
const codes = codeAndBase(language);
|
|
79
|
+
return codes.at(-1) === "en" || [...codes, codes.at(-1) === "no" ? "nb" : ""].some((code) => code !== "" && existsSync(join(page, "i18n", `${code}.json`)));
|
|
79
80
|
}
|
|
80
81
|
/** A phrase of the page in a language: a language package's, then the page's own file, by its code or its base language, then this computer's; English when none has it. */
|
|
81
82
|
export function pagePhrase(context, language, phrase) {
|
|
@@ -83,10 +84,9 @@ export function pagePhrase(context, language, phrase) {
|
|
|
83
84
|
return phrase;
|
|
84
85
|
}
|
|
85
86
|
const page = context.pageFolder;
|
|
86
|
-
const
|
|
87
|
-
const base = code.split("-")[0];
|
|
87
|
+
const codes = codeAndBase(language);
|
|
88
88
|
const pack = languagePackFor(context.extensionFolders ?? [], language);
|
|
89
|
-
const shipped = [
|
|
89
|
+
const shipped = [...codes, codes.at(-1) === "no" ? "nb" : ""].filter((candidate) => candidate !== "").map((candidate) => readJson(join(page, "i18n", `${candidate}.json`)));
|
|
90
90
|
const own = context.home === undefined ? {} : readJson(join(context.home, "i18n", `${language}.json`));
|
|
91
91
|
return [pack === undefined ? {} : packPhrases(pack), ...shipped, own].map((phrases) => phrases[phrase]).find((said) => typeof said === "string" && said !== "") ?? phrase;
|
|
92
92
|
}
|
|
@@ -212,11 +212,11 @@ function keptOf(answer, entries) {
|
|
|
212
212
|
// à and  before a sign of Latin-1 ("é" for "é").
|
|
213
213
|
const garbledMarks = /[√∫∞∑≈∂Ω¬ƒ†∆]|·ª|[ÃÂ][ -¿]/;
|
|
214
214
|
/** Whether a translation is garbled: it has what a misread encoding leaves, and what it translates has not. */
|
|
215
|
-
function isGarbled(text, source) {
|
|
215
|
+
export function isGarbled(text, source) {
|
|
216
216
|
return garbledMarks.test(text) && !garbledMarks.test(source);
|
|
217
217
|
}
|
|
218
218
|
/** The JSON object in a writer's answer, whatever came around it; none when there is none. */
|
|
219
|
-
function answerOf(text) {
|
|
219
|
+
export function answerOf(text) {
|
|
220
220
|
try {
|
|
221
221
|
return text === undefined ? {} : JSON.parse(text.slice(text.indexOf("{"), text.lastIndexOf("}") + 1));
|
|
222
222
|
}
|
|
@@ -67,7 +67,11 @@ function translatedBook(book, translations, system, words) {
|
|
|
67
67
|
const aliased = files.flatMap((file) => {
|
|
68
68
|
const own = book.filter((section) => section.file === file);
|
|
69
69
|
const other = translated.filter((section) => section.file === file);
|
|
70
|
-
|
|
70
|
+
if (isParallel(own, other, words)) {
|
|
71
|
+
return other.map((section, index) => ({ ...section, alias: own[index].path }));
|
|
72
|
+
}
|
|
73
|
+
// A chapter whose sections do not match still has its own title: the system's outputs name it so.
|
|
74
|
+
return other.map((section, index) => (index === 0 && own.length > 0 && section.level === own[0].level ? { ...section, alias: own[0].path } : section));
|
|
71
75
|
});
|
|
72
76
|
return [...book.filter((section) => !files.includes(section.file)), ...aliased].sort((first, second) => (first.file < second.file ? -1 : first.file > second.file ? 1 : 0));
|
|
73
77
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Context, SystemTexts } from "../../core/context.ts";
|
|
2
|
+
import { type Page, type World } from "../../pages/index.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Asks for the game system's pages that these pages show the player in the campaign's language: themselves and their bases, and for a character the pages
|
|
5
|
+
* its fields link, as its class, its spells and its items (D-539); nothing where the system has its own translation, or nothing translates.
|
|
6
|
+
*/
|
|
7
|
+
export declare function wantTexts(root: string, context: Context, world: World, shown: Page[]): void;
|
|
8
|
+
/** The campaign's language, when this computer is translating the game system's pages into it (D-539). */
|
|
9
|
+
export declare function translatingTexts(context: Context, world: World): string | undefined;
|
|
10
|
+
/** The game system's pages translated in the background with the player's writer (D-539); `notify` tells the pages when some have come, and when the work ends. */
|
|
11
|
+
export declare function systemTexts(context: Context, notify: () => void): SystemTexts;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// A game system's pages in the campaign's language where the system has no translation of its own (D-539): translated in the background on this computer,
|
|
2
|
+
// as the player first reads them, and kept in the player's data folder with the print of the text they come from, so that a page the system changes is
|
|
3
|
+
// translated again.
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { stringify } from "yaml";
|
|
6
|
+
import { translationFolder } from "../../core/files.js";
|
|
7
|
+
import { codeAndBase } from "../../core/language.js";
|
|
8
|
+
import { files } from "../../core/store.js";
|
|
9
|
+
import { textPrint } from "../../core/text.js";
|
|
10
|
+
import { baseChain, findPage, linksIn, versionTranslations } from "../../pages/index.js";
|
|
11
|
+
import { answerOf, isGarbled, languageName } from "./page-words.js";
|
|
12
|
+
import { campaignSystem, ownTranslationFolder } from "./world.js";
|
|
13
|
+
// How much of the system's text goes in one request, in characters, and at most how many pages.
|
|
14
|
+
const batchLetters = 12_000;
|
|
15
|
+
const batchPages = 12;
|
|
16
|
+
// How long a language whose translation brought nothing waits before it is tried again, so that a writer that fails is not called at every reading.
|
|
17
|
+
const pause = 10 * 60 * 1000;
|
|
18
|
+
// How many times a page whose translation is refused is asked for in a process.
|
|
19
|
+
const mostTries = 2;
|
|
20
|
+
/**
|
|
21
|
+
* Asks for the game system's pages that these pages show the player in the campaign's language: themselves and their bases, and for a character the pages
|
|
22
|
+
* its fields link, as its class, its spells and its items (D-539); nothing where the system has its own translation, or nothing translates.
|
|
23
|
+
*/
|
|
24
|
+
export function wantTexts(root, context, world, shown) {
|
|
25
|
+
const texts = context.texts;
|
|
26
|
+
const language = world.language?.trim().toLowerCase();
|
|
27
|
+
const system = world.system;
|
|
28
|
+
if (texts === undefined || system === undefined || language === undefined || codeAndBase(language).includes(system.language.toLowerCase())) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const found = campaignSystem(root, context);
|
|
32
|
+
if (found === undefined) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const wanted = new Map();
|
|
36
|
+
const add = (page) => {
|
|
37
|
+
for (const one of page === undefined ? [] : [page, ...baseChain(world, page)]) {
|
|
38
|
+
// A page of the version of the system's rules is the version's, with a translation of its own (VER-3).
|
|
39
|
+
const version = found.version !== undefined && files().exists(join(found.version.folder, one.path)) ? found.version : undefined;
|
|
40
|
+
const path = version === undefined ? one.path : join(versionTranslations(version.name), one.path);
|
|
41
|
+
if (one.system !== undefined && one.translated === undefined && translationFolder(version?.folder ?? found.folder, language) === undefined) {
|
|
42
|
+
wanted.set(path, { path, name: one.name, body: one.body });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
for (const page of shown) {
|
|
47
|
+
add(page);
|
|
48
|
+
if (page.type === "character") {
|
|
49
|
+
Object.values(page.fields).flatMap(linksIn).forEach((name) => add(pageOrNone(world, name)));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (wanted.size > 0) {
|
|
53
|
+
texts.want(language, { name: system.name, title: system.title }, [...wanted.values()], world.words ?? {});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** The campaign's language, when this computer is translating the game system's pages into it (D-539). */
|
|
57
|
+
export function translatingTexts(context, world) {
|
|
58
|
+
const language = world.language?.trim().toLowerCase();
|
|
59
|
+
return language !== undefined && context.texts?.translating(language) === true ? language : undefined;
|
|
60
|
+
}
|
|
61
|
+
/** The game system's pages translated in the background with the player's writer (D-539); `notify` tells the pages when some have come, and when the work ends. */
|
|
62
|
+
export function systemTexts(context, notify) {
|
|
63
|
+
const waiting = new Map();
|
|
64
|
+
const running = new Set();
|
|
65
|
+
const sent = new Set();
|
|
66
|
+
const tries = new Map();
|
|
67
|
+
const stopped = new Map();
|
|
68
|
+
const run = async (language, write) => {
|
|
69
|
+
const queue = waiting.get(language) ?? new Map();
|
|
70
|
+
for (;;) {
|
|
71
|
+
const batch = nextBatch([...queue.values()]);
|
|
72
|
+
const writer = context.writer;
|
|
73
|
+
if (batch.length === 0 || writer === undefined) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
batch.forEach((one) => {
|
|
77
|
+
queue.delete(one.file);
|
|
78
|
+
sent.add(one.file);
|
|
79
|
+
});
|
|
80
|
+
try {
|
|
81
|
+
const said = await writer.write(textsBrief(language, batch));
|
|
82
|
+
// A writer that failed, as offline, answers nothing: no try counts, and the pages wait for the next time.
|
|
83
|
+
if (said === undefined) {
|
|
84
|
+
queue.clear();
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
const answer = answerOf(said);
|
|
88
|
+
batch.forEach((one) => tries.set(one.file, (tries.get(one.file) ?? 0) + 1));
|
|
89
|
+
const kept = batch.flatMap((one, index) => {
|
|
90
|
+
const translation = keptTranslation(answer[`p${index + 1}`], one.page.body);
|
|
91
|
+
return translation === undefined ? [] : [{ one, translation }];
|
|
92
|
+
});
|
|
93
|
+
kept.forEach(({ one, translation }) => write(one.file, translatedFile(translation, one.page.body)));
|
|
94
|
+
// A request that brings nothing ends the work for a while: the pages stay in the system's language.
|
|
95
|
+
if (kept.length === 0) {
|
|
96
|
+
queue.clear();
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
notify();
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
batch.forEach((one) => sent.delete(one.file));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return {
|
|
107
|
+
want: (language, system, pages, glossary) => {
|
|
108
|
+
const folder = ownTranslationFolder(context, system.name, language);
|
|
109
|
+
if (context.writer?.ready() !== true || folder === undefined) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const queue = waiting.get(language) ?? new Map();
|
|
113
|
+
waiting.set(language, queue);
|
|
114
|
+
for (const page of pages) {
|
|
115
|
+
const file = join(folder, page.path);
|
|
116
|
+
if (!sent.has(file) && (tries.get(file) ?? 0) < mostTries) {
|
|
117
|
+
queue.set(file, { file, page, system, glossary });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const resting = context.now().getTime() - (stopped.get(language) ?? -pause) < pause;
|
|
121
|
+
if (queue.size === 0 || running.has(language) || resting) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
running.add(language);
|
|
125
|
+
// Through the store the pages are read with, so that the world reads them as they come.
|
|
126
|
+
const store = files();
|
|
127
|
+
void run(language, (file, text) => store.write(file, text))
|
|
128
|
+
.then((finished) => finished || stopped.set(language, context.now().getTime()), () => stopped.set(language, context.now().getTime()))
|
|
129
|
+
.finally(() => {
|
|
130
|
+
running.delete(language);
|
|
131
|
+
notify();
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
translating: (language) => running.has(language),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/** The pages of the next request, in the order they were asked: up to the letters of a batch, and always one, however long. */
|
|
138
|
+
function nextBatch(queue) {
|
|
139
|
+
const batch = [];
|
|
140
|
+
let letters = 0;
|
|
141
|
+
for (const one of queue) {
|
|
142
|
+
if (batch.length === batchPages || (batch.length > 0 && letters + one.page.body.length > batchLetters)) {
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
batch.push(one);
|
|
146
|
+
letters += one.page.body.length;
|
|
147
|
+
}
|
|
148
|
+
return batch;
|
|
149
|
+
}
|
|
150
|
+
/** The request for some of a system's pages in a language, with the words of the system there that their texts use. */
|
|
151
|
+
function textsBrief(language, batch) {
|
|
152
|
+
const name = languageName(language);
|
|
153
|
+
const texts = batch.map((one) => one.page.body).join("\n");
|
|
154
|
+
const glossary = Object.fromEntries(Object.entries(batch[0].glossary).filter(([english]) => english.length > 2 && texts.includes(english)));
|
|
155
|
+
return [
|
|
156
|
+
`Translate pages of the rules of a tabletop role-playing game, the game system ${batch[0].system.title}, into ${name} (${language}), for a player who reads them while playing.`,
|
|
157
|
+
"- Each page is markdown: keep it as it is, its headings, lists, tables, bold and italics, and secret blocks (> [!secret]); translate the words.",
|
|
158
|
+
"- Keep each link [[Target]] to the same Target, untouched; you may add the words to show after a bar, as [[Target|words]].",
|
|
159
|
+
`- Keep numbers and dice such as 2d6+3 as they are; never convert a unit (feet stay feet), but write its name in ${name}.`,
|
|
160
|
+
`- Where the game has an official translation in ${name}, use its terms; else the words its players use. The glossary gives the terms the game already uses in ${name}: keep to them.`,
|
|
161
|
+
`- name: the page's name in ${name}, as the game's translation would call it.`,
|
|
162
|
+
'Answer with a JSON object alone, from each id exactly as given to an object {"name": "…", "text": "…"}.',
|
|
163
|
+
"",
|
|
164
|
+
`Glossary: ${JSON.stringify(glossary)}`,
|
|
165
|
+
"",
|
|
166
|
+
JSON.stringify(batch.map((one, index) => ({ id: `p${index + 1}`, name: one.page.name, text: one.page.body }))),
|
|
167
|
+
].join("\n");
|
|
168
|
+
}
|
|
169
|
+
/** A translation kept: a name and a text that keep the page's headings, secrets and links, and are not garbled; undefined otherwise. */
|
|
170
|
+
function keptTranslation(given, body) {
|
|
171
|
+
if (given === null || typeof given !== "object") {
|
|
172
|
+
return undefined;
|
|
173
|
+
}
|
|
174
|
+
const { name, text } = given;
|
|
175
|
+
if (typeof name !== "string" || typeof text !== "string" || name.trim() === "" || name.includes("\n") || text.trim() === "") {
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
const same = (pattern) => count(text, pattern) === count(body, pattern);
|
|
179
|
+
const kept = same(/^#{1,6}\s/gm) && same(/^>\s*\[!secret\]/gim) && linkTargets(text) === linkTargets(body) && !isGarbled(text, body);
|
|
180
|
+
return kept ? { name: name.trim(), text: text.trim() } : undefined;
|
|
181
|
+
}
|
|
182
|
+
// What a page translated on this computer says of itself: the system's licence goes with its text, and a translation made by an AI is no official one.
|
|
183
|
+
const note = "An unofficial translation made on this computer by the player's AI, from the game system's text, under that text's licence and with its attribution; the system's own text prevails.";
|
|
184
|
+
/** The file of a page translated on this computer: its name in the language, the print of the text it comes from, and its text. */
|
|
185
|
+
function translatedFile(translation, body) {
|
|
186
|
+
return `---\n${stringify({ name: translation.name, source: textPrint(body), note }, { lineWidth: 0 })}---\n\n${translation.text}\n`;
|
|
187
|
+
}
|
|
188
|
+
/** The pages a text links to, each once, in order of name. */
|
|
189
|
+
function linkTargets(text) {
|
|
190
|
+
return [...new Set([...text.matchAll(/\[\[([^\]|#]+)/g)].map((match) => match[1].trim()))].sort().join("|");
|
|
191
|
+
}
|
|
192
|
+
function count(text, pattern) {
|
|
193
|
+
return text.match(pattern)?.length ?? 0;
|
|
194
|
+
}
|
|
195
|
+
/** The page with this name, the campaign's or the system's; none where there is none, or where two of the campaign's have it. */
|
|
196
|
+
function pageOrNone(world, name) {
|
|
197
|
+
try {
|
|
198
|
+
return findPage(world, name);
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
return undefined;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -21,6 +21,12 @@ export declare function problemText(problem: Problem): string;
|
|
|
21
21
|
export declare function newDatedLogEntry(root: string, context: Context, type: string, visibility: LogEntry["visibility"], data: Record<string, unknown>): LogEntry;
|
|
22
22
|
/** The problems of the game time: a state.yaml that cannot give the game date, a calendar or its start that do not read. The planned events have their own (eventProblems). */
|
|
23
23
|
export declare function timeProblems(root: string, context: Context): Problem[];
|
|
24
|
+
/**
|
|
25
|
+
* The game time to let pass before a new session (D-133): when at least an hour of real time has passed since the last move and the game time runs between
|
|
26
|
+
* sessions, the real time gone, the game time it makes and how to let it pass; nothing when the game time stops between sessions, the default. A move is the
|
|
27
|
+
* master's: a page changed by hand or the player's change on the dashboard between sessions is none.
|
|
28
|
+
*/
|
|
29
|
+
export declare function timeBetweenSessions(root: string, context: Context, now: GameDate): string | undefined;
|
|
24
30
|
/** The campaign's calendar (TIM-8): campaign.yaml's, else an extension's, else the core's real months; and its start. Read once until campaign.yaml changes. */
|
|
25
31
|
export declare function campaignCalendar(root: string, context: Context): CampaignCalendar;
|
|
26
32
|
/** The day of the calendar that a game day falls on; undefined without a calendar or its start. */
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// The game time as several commands use it: the present date from state.yaml, the log lines stamped with it, and the calendar that shows it.
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { campaignFileName, readOneSetting, readState, readTextSetting } from "../../campaign/index.js";
|
|
4
|
-
import { newLogEntry } from "../../core/log.js";
|
|
4
|
+
import { newLogEntry, readLog } from "../../core/log.js";
|
|
5
5
|
import { files } from "../../core/store.js";
|
|
6
6
|
import { isEmptyField } from "../../pages/index.js";
|
|
7
|
-
import { calendarDay, formatCalendarDay, formatGameDate, readCalendar, readCalendarStart, readGameDate, realCalendar } from "../../time/index.js";
|
|
7
|
+
import { calendarDay, formatCalendarDay, formatDuration, formatGameDate, lastGameDay, minutesBetween, readBetweenSessions, readCalendar, readCalendarStart, readGameDate, realCalendar, } from "../../time/index.js";
|
|
8
8
|
import { campaignExtensions, extensionSources } from "./packages/extensions.js";
|
|
9
|
+
// The setting of the game time between sessions (D-133).
|
|
10
|
+
const betweenSessionsSetting = "between-sessions";
|
|
9
11
|
/** The present of the game: its date, or the problem that keeps state.yaml from giving one; neither before the game has a date. */
|
|
10
12
|
export function readPresent(root) {
|
|
11
13
|
let text;
|
|
@@ -41,7 +43,26 @@ export function newDatedLogEntry(root, context, type, visibility, data) {
|
|
|
41
43
|
/** The problems of the game time: a state.yaml that cannot give the game date, a calendar or its start that do not read. The planned events have their own (eventProblems). */
|
|
42
44
|
export function timeProblems(root, context) {
|
|
43
45
|
const { problem } = readPresent(root);
|
|
44
|
-
return [...(problem === undefined ? [] : [problem]), ...campaignCalendar(root, context).problems];
|
|
46
|
+
return [...(problem === undefined ? [] : [problem]), ...campaignCalendar(root, context).problems, ...betweenSessionsProblems(root)];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The game time to let pass before a new session (D-133): when at least an hour of real time has passed since the last move and the game time runs between
|
|
50
|
+
* sessions, the real time gone, the game time it makes and how to let it pass; nothing when the game time stops between sessions, the default. A move is the
|
|
51
|
+
* master's: a page changed by hand or the player's change on the dashboard between sessions is none.
|
|
52
|
+
*/
|
|
53
|
+
export function timeBetweenSessions(root, context, now) {
|
|
54
|
+
const written = readTextSetting(root, betweenSessionsSetting);
|
|
55
|
+
const rate = written === undefined ? undefined : readBetweenSessions(written);
|
|
56
|
+
const last = readLog(root).findLast((entry) => entry.by !== "outside" && entry.by !== "player");
|
|
57
|
+
const realMinutes = last === undefined ? 0 : Math.floor((context.now().getTime() - Date.parse(last.at)) / 60_000);
|
|
58
|
+
if (rate === undefined || rate === "stops" || !(realMinutes >= 60)) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
// No further than the last day the game counts, which advance would refuse.
|
|
62
|
+
const gameMinutes = Math.min(Math.floor((realMinutes / rate.real) * rate.game), minutesBetween(now, { day: lastGameDay }));
|
|
63
|
+
return gameMinutes < 1 ? undefined : `${formatDuration(realMinutes)} of real time since the last move, and between sessions the game time runs `
|
|
64
|
+
+ `${formatDuration(rate.game)} per ${formatDuration(rate.real)}: if this is a new session, call advance by ${formatDuration(gameMinutes)} before you open it, `
|
|
65
|
+
+ "and let the opening tell what the world did meanwhile.";
|
|
45
66
|
}
|
|
46
67
|
/** The campaign's calendar (TIM-8): campaign.yaml's, else an extension's, else the core's real months; and its start. Read once until campaign.yaml changes. */
|
|
47
68
|
export function campaignCalendar(root, context) {
|
|
@@ -57,6 +78,17 @@ export function datedText(root, context, date) {
|
|
|
57
78
|
const day = calendarDayOf(root, context, date.day);
|
|
58
79
|
return day === undefined ? formatGameDate(date) : `${formatGameDate(date)} (${formatCalendarDay(day)})`;
|
|
59
80
|
}
|
|
81
|
+
/** A between-sessions setting that does not read as stops or a rate: the game time stops between sessions until it is fixed. */
|
|
82
|
+
function betweenSessionsProblems(root) {
|
|
83
|
+
const written = readTextSetting(root, betweenSessionsSetting);
|
|
84
|
+
return written === undefined || readBetweenSessions(written) !== undefined
|
|
85
|
+
? []
|
|
86
|
+
: [{
|
|
87
|
+
path: campaignFileName,
|
|
88
|
+
message: `between-sessions: "${written}" is neither stops nor a rate of game time to real time, so the game time stops between sessions.`,
|
|
89
|
+
fix: "set it with config between-sessions, such as 1d per 7d, or stops",
|
|
90
|
+
}];
|
|
91
|
+
}
|
|
60
92
|
function readCampaignCalendar(root, context) {
|
|
61
93
|
const problem = (error, fix) => ({ path: campaignFileName, message: error instanceof Error ? error.message : String(error), fix });
|
|
62
94
|
const { calendar: brought, problems } = extensionsCalendar(root, context);
|
|
@@ -6,7 +6,7 @@ import { formatAmount, payCoins, readAmount, totalOf } from "../../money/index.j
|
|
|
6
6
|
import { baseChain, heldStacksOfKind, kindNamed, locate, writePage } from "../../pages/index.js";
|
|
7
7
|
import { effectiveFields } from "./effect-layer.js";
|
|
8
8
|
import { campaignCoins } from "./money.js";
|
|
9
|
-
import {
|
|
9
|
+
import { playedRigor } from "./offers.js";
|
|
10
10
|
import { firstInChat } from "./parts.js";
|
|
11
11
|
import { partyPages } from "./recipes.js";
|
|
12
12
|
import { writeStacks } from "./stacks.js";
|
|
@@ -18,8 +18,8 @@ const settlementKinds = ["city", "town", "village", "inn"];
|
|
|
18
18
|
/** The upkeep of each midnight passed (UPK-1–UPK-3), for the party members who keep a sheet, under the rigor «rules» or «simulation»; the lines that say it. */
|
|
19
19
|
export function dailyUpkeep(root, context, system, days) {
|
|
20
20
|
const upkeep = system?.upkeep;
|
|
21
|
-
// As the game plays it: one that fixes it to smooth counts nothing (DAT-16).
|
|
22
|
-
const rigor =
|
|
21
|
+
// As the game plays it: one that fixes it to smooth counts nothing (DAT-16); a custom one, by its food (T-132).
|
|
22
|
+
const rigor = playedRigor(root, context, "food");
|
|
23
23
|
if (upkeep === undefined || days <= 0 || (rigor !== "rules" && rigor !== "simulation")) {
|
|
24
24
|
return [];
|
|
25
25
|
}
|
|
@@ -5,6 +5,8 @@ import { type PageType, type World } from "../../pages/index.ts";
|
|
|
5
5
|
import { type CampaignData, type GameSystem, type SystemLayer, type SystemSetting, type SystemWords } from "../../systems/index.ts";
|
|
6
6
|
/** The world of the campaign in `root`, with the pages of its game system when campaign.yaml names one that is installed (SYS-1, SYS-3). */
|
|
7
7
|
export declare function campaignWorld(root: string, context: Context): World;
|
|
8
|
+
/** The folder of a game system's pages translated on this computer into a language (D-539), in the player's data folder; none without one. */
|
|
9
|
+
export declare function ownTranslationFolder(context: Context, system: string, language: string): string | undefined;
|
|
8
10
|
/**
|
|
9
11
|
* The game system's words in the campaign's language (D-403): its own, else those translated on the fly on this computer (D-406); with the names of the
|
|
10
12
|
* fields the campaign's extensions add, from their words, layered as their additions are (CAM-2, D-505).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The campaign's world and game system as the commands read them: the system with the layers over it, the settings it plays with, and the world built from both.
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
import { campaignFileName, readCampaignData, readOneSetting, readTextSetting } from "../../campaign/index.js";
|
|
3
|
+
import { campaignFileName, customLevel, customLevels, customSettings, readCampaignData, readOneSetting, readTextSetting } from "../../campaign/index.js";
|
|
4
4
|
import { ourSystems } from "../../core/package-declarations.js";
|
|
5
5
|
import { files, isInside } from "../../core/store.js";
|
|
6
6
|
import { comparableText } from "../../core/text.js";
|
|
@@ -12,15 +12,19 @@ import { campaignExtensions, extensionSources, layeredParts } from "./packages/e
|
|
|
12
12
|
import { homeSystemWords } from "./page-words.js";
|
|
13
13
|
/** The world of the campaign in `root`, with the pages of its game system when campaign.yaml names one that is installed (SYS-1, SYS-3). */
|
|
14
14
|
export function campaignWorld(root, context) {
|
|
15
|
-
// The same world until one of its pages
|
|
16
|
-
|
|
15
|
+
// The same world until one of its pages, campaign.yaml or the system's pages translated on this computer change: in a session, across calls (D-137). A
|
|
16
|
+
// game system does not change while the server runs.
|
|
17
|
+
const from = [join(root, worldFolderName), join(root, campaignFileName), ...(context.home === undefined ? [] : [join(context.home, "systems")])].map((path) => resolve(path));
|
|
17
18
|
const dependsOn = (path) => from.some((source) => source === path || isInside(source, path) || isInside(path, source));
|
|
18
19
|
return files().remember(`world ${resolve(root)}`, dependsOn, () => {
|
|
19
20
|
const named = readTextSetting(root, "system");
|
|
20
21
|
const system = campaignSystem(root, context);
|
|
22
|
+
const language = readTextSetting(root, "language");
|
|
23
|
+
const own = system === undefined || language === undefined ? undefined : ownTranslationFolder(context, system.name, language);
|
|
21
24
|
return loadWorld(root, {
|
|
22
25
|
system,
|
|
23
|
-
language
|
|
26
|
+
language,
|
|
27
|
+
...(own === undefined ? {} : { ownTranslations: own }),
|
|
24
28
|
words: campaignSystemWords(root, context),
|
|
25
29
|
missingSystem: system === undefined ? named : undefined,
|
|
26
30
|
noSystem: named === undefined,
|
|
@@ -29,6 +33,12 @@ export function campaignWorld(root, context) {
|
|
|
29
33
|
});
|
|
30
34
|
});
|
|
31
35
|
}
|
|
36
|
+
/** The folder of a game system's pages translated on this computer into a language (D-539), in the player's data folder; none without one. */
|
|
37
|
+
export function ownTranslationFolder(context, system, language) {
|
|
38
|
+
const code = language.trim().toLowerCase();
|
|
39
|
+
// A language campaign.yaml writes by hand is a code, never a path out of the folder.
|
|
40
|
+
return context.home === undefined || !/^[a-z]{2,3}(-[a-z0-9]{2,8})*$/.test(code) ? undefined : join(context.home, "systems", system, "translations", code);
|
|
41
|
+
}
|
|
32
42
|
/**
|
|
33
43
|
* The game system's words in the campaign's language (D-403): its own, else those translated on the fly on this computer (D-406); with the names of the
|
|
34
44
|
* fields the campaign's extensions add, from their words, layered as their additions are (CAM-2, D-505).
|
|
@@ -245,12 +255,15 @@ export function languageName(code) {
|
|
|
245
255
|
/** What the game system counts itself, for a rigor's meaning (UPK-1, UPK-3): the day's food, and what burns, by its first name. */
|
|
246
256
|
export function countedByGame(system) {
|
|
247
257
|
const burning = Object.keys(system?.burning ?? {})[0];
|
|
248
|
-
return { upkeep: system?.upkeep !== undefined, ...(burning === undefined ? {} : { burning }) };
|
|
258
|
+
return { upkeep: system?.upkeep !== undefined, lifestyle: system?.upkeep?.lifestyle !== undefined, ...(burning === undefined ? {} : { burning }) };
|
|
249
259
|
}
|
|
250
|
-
/**
|
|
260
|
+
/**
|
|
261
|
+
* The rigor as the game plays it (DAT-16): with the values of the system's settings as campaign.yaml writes them, as the world reads before its players; a custom
|
|
262
|
+
* one as the level of its load, the item formulas read it for (T-132).
|
|
263
|
+
*/
|
|
251
264
|
function rigorPlayed(root, system) {
|
|
252
265
|
const value = engineSettingValue(system, (setting) => systemSettingValue(root, setting), "rigor", readTextSetting(root, "rigor"));
|
|
253
|
-
return typeof value === "string" ? value : undefined;
|
|
266
|
+
return value === customLevel ? customLevels("rigor", readOneSetting(root, customSettings.rigor)).load : typeof value === "string" ? value : undefined;
|
|
254
267
|
}
|
|
255
268
|
/**
|
|
256
269
|
* The game system campaign.yaml names, with what its extensions and then the campaign add to it (CAM-2), and the layers left out with why (CAM-3), as its
|
|
@@ -46,6 +46,7 @@ export declare const status: import("../core/registry.ts").Command<z.ZodObject<{
|
|
|
46
46
|
sceneCounts: string;
|
|
47
47
|
openQuests: string[];
|
|
48
48
|
now: string | undefined;
|
|
49
|
+
betweenSessions: string | undefined;
|
|
49
50
|
dateProblem: string | undefined;
|
|
50
51
|
datedEvents: boolean;
|
|
51
52
|
dueEvents: string[];
|
|
@@ -58,6 +59,7 @@ export declare const status: import("../core/registry.ts").Command<z.ZodObject<{
|
|
|
58
59
|
halfLoaded: number | undefined;
|
|
59
60
|
sheet: SheetSummary | undefined;
|
|
60
61
|
incompleteSheets: string[];
|
|
62
|
+
choices: string[];
|
|
61
63
|
levelsDue: string[];
|
|
62
64
|
}>;
|
|
63
65
|
export {};
|