@rpgm-tools/neo-angband-mod-sdk 1.18.0 → 1.19.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 +4 -0
- package/bin/neo-angband-mod-build.mjs +6 -4
- package/bin/neo-angband-mod-check.mjs +2 -2
- package/dist/capabilities.d.ts +18 -3
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +37 -6
- package/dist/capabilities.js.map +1 -1
- package/dist/index.d.ts +45 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/json/active-slot.d.ts +13 -0
- package/dist/json/active-slot.d.ts.map +1 -0
- package/dist/json/active-slot.js +32 -0
- package/dist/json/active-slot.js.map +1 -0
- package/dist/json/autoinscriptions.d.ts +9 -0
- package/dist/json/autoinscriptions.d.ts.map +1 -0
- package/dist/json/autoinscriptions.js +18 -0
- package/dist/json/autoinscriptions.js.map +1 -0
- package/dist/json/build-id.d.ts +4 -0
- package/dist/json/build-id.d.ts.map +1 -0
- package/dist/json/build-id.js +9 -0
- package/dist/json/build-id.js.map +1 -0
- package/dist/json/character-export.d.ts +27 -0
- package/dist/json/character-export.d.ts.map +1 -0
- package/dist/json/character-export.js +92 -0
- package/dist/json/character-export.js.map +1 -0
- package/dist/json/character-record.d.ts +33 -0
- package/dist/json/character-record.d.ts.map +1 -0
- package/dist/json/character-record.js +89 -0
- package/dist/json/character-record.js.map +1 -0
- package/dist/json/character-roster.d.ts +14 -0
- package/dist/json/character-roster.d.ts.map +1 -0
- package/dist/json/character-roster.js +50 -0
- package/dist/json/character-roster.js.map +1 -0
- package/dist/json/color-table.d.ts +19 -0
- package/dist/json/color-table.d.ts.map +1 -0
- package/dist/json/color-table.js +87 -0
- package/dist/json/color-table.js.map +1 -0
- package/dist/json/custom-options.d.ts +15 -0
- package/dist/json/custom-options.d.ts.map +1 -0
- package/dist/json/custom-options.js +32 -0
- package/dist/json/custom-options.js.map +1 -0
- package/dist/json/death-records.d.ts +19 -0
- package/dist/json/death-records.d.ts.map +1 -0
- package/dist/json/death-records.js +73 -0
- package/dist/json/death-records.js.map +1 -0
- package/dist/json/entry-renderers.d.ts +13 -0
- package/dist/json/entry-renderers.d.ts.map +1 -0
- package/dist/json/entry-renderers.js +22 -0
- package/dist/json/entry-renderers.js.map +1 -0
- package/dist/json/gamepad-bindings.d.ts +65 -0
- package/dist/json/gamepad-bindings.d.ts.map +1 -0
- package/dist/json/gamepad-bindings.js +116 -0
- package/dist/json/gamepad-bindings.js.map +1 -0
- package/dist/json/index.d.ts +85 -0
- package/dist/json/index.d.ts.map +1 -0
- package/dist/json/index.js +248 -0
- package/dist/json/index.js.map +1 -0
- package/dist/json/installed-mod.d.ts +13 -0
- package/dist/json/installed-mod.d.ts.map +1 -0
- package/dist/json/installed-mod.js +31 -0
- package/dist/json/installed-mod.js.map +1 -0
- package/dist/json/keymaps.d.ts +18 -0
- package/dist/json/keymaps.d.ts.map +1 -0
- package/dist/json/keymaps.js +53 -0
- package/dist/json/keymaps.js.map +1 -0
- package/dist/json/linoleum.d.ts +90 -0
- package/dist/json/linoleum.d.ts.map +1 -0
- package/dist/json/linoleum.js +234 -0
- package/dist/json/linoleum.js.map +1 -0
- package/dist/json/load-order.d.ts +4 -0
- package/dist/json/load-order.d.ts.map +1 -0
- package/dist/json/load-order.js +9 -0
- package/dist/json/load-order.js.map +1 -0
- package/dist/json/local-state.d.ts +53 -0
- package/dist/json/local-state.d.ts.map +1 -0
- package/dist/json/local-state.js +39 -0
- package/dist/json/local-state.js.map +1 -0
- package/dist/json/lore.d.ts +33 -0
- package/dist/json/lore.d.ts.map +1 -0
- package/dist/json/lore.js +92 -0
- package/dist/json/lore.js.map +1 -0
- package/dist/json/mod-resources.d.ts +13 -0
- package/dist/json/mod-resources.d.ts.map +1 -0
- package/dist/json/mod-resources.js +25 -0
- package/dist/json/mod-resources.js.map +1 -0
- package/dist/json/mod-settings.d.ts +16 -0
- package/dist/json/mod-settings.d.ts.map +1 -0
- package/dist/json/mod-settings.js +17 -0
- package/dist/json/mod-settings.js.map +1 -0
- package/dist/json/mod-state.d.ts +31 -0
- package/dist/json/mod-state.d.ts.map +1 -0
- package/dist/json/mod-state.js +43 -0
- package/dist/json/mod-state.js.map +1 -0
- package/dist/json/orphan-saves.d.ts +23 -0
- package/dist/json/orphan-saves.d.ts.map +1 -0
- package/dist/json/orphan-saves.js +108 -0
- package/dist/json/orphan-saves.js.map +1 -0
- package/dist/json/profiles.d.ts +28 -0
- package/dist/json/profiles.d.ts.map +1 -0
- package/dist/json/profiles.js +24 -0
- package/dist/json/profiles.js.map +1 -0
- package/dist/json/randart.d.ts +54 -0
- package/dist/json/randart.d.ts.map +1 -0
- package/dist/json/randart.js +110 -0
- package/dist/json/randart.js.map +1 -0
- package/dist/json/saved-game.d.ts +16 -0
- package/dist/json/saved-game.d.ts.map +1 -0
- package/dist/json/saved-game.js +61 -0
- package/dist/json/saved-game.js.map +1 -0
- package/dist/json/scalars.d.ts +10 -0
- package/dist/json/scalars.d.ts.map +1 -0
- package/dist/json/scalars.js +42 -0
- package/dist/json/scalars.js.map +1 -0
- package/dist/json/settings.d.ts +35 -0
- package/dist/json/settings.d.ts.map +1 -0
- package/dist/json/settings.js +49 -0
- package/dist/json/settings.js.map +1 -0
- package/dist/json/sound-mappings.d.ts +7 -0
- package/dist/json/sound-mappings.d.ts.map +1 -0
- package/dist/json/sound-mappings.js +36 -0
- package/dist/json/sound-mappings.js.map +1 -0
- package/dist/json/subwindow-layout.d.ts +65 -0
- package/dist/json/subwindow-layout.d.ts.map +1 -0
- package/dist/json/subwindow-layout.js +200 -0
- package/dist/json/subwindow-layout.js.map +1 -0
- package/dist/json/visual-overrides.d.ts +46 -0
- package/dist/json/visual-overrides.d.ts.map +1 -0
- package/dist/json/visual-overrides.js +49 -0
- package/dist/json/visual-overrides.js.map +1 -0
- package/dist/json/window-manager.d.ts +10 -0
- package/dist/json/window-manager.d.ts.map +1 -0
- package/dist/json/window-manager.js +34 -0
- package/dist/json/window-manager.js.map +1 -0
- package/dist/json/window-state.d.ts +11 -0
- package/dist/json/window-state.d.ts.map +1 -0
- package/dist/json/window-state.js +40 -0
- package/dist/json/window-state.js.map +1 -0
- package/dist/manifest.d.ts +38 -4
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +110 -5
- package/dist/manifest.js.map +1 -1
- package/dist/project.js +1 -1
- package/dist/project.js.map +1 -1
- package/dist/resources.d.ts +3 -3
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +21 -63
- package/dist/resources.js.map +1 -1
- package/dist/standards.d.ts.map +1 -1
- package/dist/standards.js +2 -4
- package/dist/standards.js.map +1 -1
- package/docs/AUTHORING.md +3 -10
- package/docs/MOD_COMPATIBILITY.md +1 -1
- package/docs/MOD_REACH.md +11 -20
- package/docs/MOD_SEAMS.md +275 -2
- package/docs/PLUGINS.md +109 -1
- package/docs/README.md +3 -0
- package/package.json +1 -1
- package/src/capabilities.ts +40 -8
- package/src/index.ts +91 -0
- package/src/json/active-slot.ts +38 -0
- package/src/json/autoinscriptions.ts +18 -0
- package/src/json/build-id.ts +9 -0
- package/src/json/character-export.ts +113 -0
- package/src/json/character-record.ts +104 -0
- package/src/json/character-roster.ts +53 -0
- package/src/json/color-table.ts +90 -0
- package/src/json/custom-options.ts +35 -0
- package/src/json/death-records.ts +84 -0
- package/src/json/entry-renderers.ts +22 -0
- package/src/json/gamepad-bindings.ts +121 -0
- package/src/json/index.ts +266 -0
- package/src/json/installed-mod.ts +32 -0
- package/src/json/keymaps.ts +55 -0
- package/src/json/linoleum.ts +246 -0
- package/src/json/load-order.ts +9 -0
- package/src/json/local-state.ts +42 -0
- package/src/json/lore.ts +95 -0
- package/src/json/mod-resources.ts +28 -0
- package/src/json/mod-settings.ts +20 -0
- package/src/json/mod-state.ts +48 -0
- package/src/json/orphan-saves.ts +119 -0
- package/src/json/profiles.ts +27 -0
- package/src/json/randart.ts +113 -0
- package/src/json/saved-game.ts +68 -0
- package/src/json/scalars.ts +44 -0
- package/src/json/settings.ts +52 -0
- package/src/json/sound-mappings.ts +38 -0
- package/src/json/subwindow-layout.ts +228 -0
- package/src/json/visual-overrides.ts +51 -0
- package/src/json/window-manager.ts +35 -0
- package/src/json/window-state.ts +41 -0
- package/src/manifest.ts +140 -9
- package/src/project.ts +1 -1
- package/src/resources.ts +25 -7
- package/src/standards.ts +2 -4
package/README.md
CHANGED
|
@@ -87,6 +87,10 @@ try {
|
|
|
87
87
|
A single mod may declare several of these as **facets**; `packFacets` is what
|
|
88
88
|
reads them.
|
|
89
89
|
|
|
90
|
+
### Public rule flags
|
|
91
|
+
|
|
92
|
+
A manifest may list declared rule or section flags in `publicFlags`, such as `"publicFlags": ["qol.autoDig"]`. The validator rejects unknown or repeated names. The host shows only these current boolean values in `ctx.mods()`; all other settings remain private.
|
|
93
|
+
|
|
90
94
|
## Related
|
|
91
95
|
|
|
92
96
|
- [`@rpgm-tools/neo-angband-core`](https://www.npmjs.com/package/@rpgm-tools/neo-angband-core): the engine itself
|
|
@@ -155,7 +155,8 @@ note(`${check ? "checking" : "building"} ${targets.length}: ${targets.map((t) =>
|
|
|
155
155
|
/** The manifest's own id, or null when there is no readable manifest. */
|
|
156
156
|
function readManifestId(dir) {
|
|
157
157
|
try {
|
|
158
|
-
const
|
|
158
|
+
const manifest = manifestFields(JSON.parse(readFileSync(join(dir, "manifest.json"), "utf8")));
|
|
159
|
+
const id = manifest?.id;
|
|
159
160
|
return typeof id === "string" && id !== "" ? id : null;
|
|
160
161
|
} catch {
|
|
161
162
|
return null;
|
|
@@ -334,11 +335,12 @@ function pluginProblem(plugin) {
|
|
|
334
335
|
plugin.hud === undefined &&
|
|
335
336
|
plugin.menu === undefined &&
|
|
336
337
|
plugin.screen === undefined &&
|
|
337
|
-
plugin.regions === undefined
|
|
338
|
+
plugin.regions === undefined &&
|
|
339
|
+
plugin.birth === undefined
|
|
338
340
|
) {
|
|
339
|
-
return "plugin.js declares no hooks, register, controller, frontend, hud, menu, screen or
|
|
341
|
+
return "plugin.js declares no hooks, register, controller, frontend, hud, menu, screen, regions or birth, so it would do nothing";
|
|
340
342
|
}
|
|
341
|
-
for (const name of ["hooks", "register", "controller", "frontend", "hud", "menu", "screen", "regions", "uninstall"]) {
|
|
343
|
+
for (const name of ["hooks", "register", "controller", "frontend", "hud", "menu", "screen", "regions", "birth", "uninstall"]) {
|
|
342
344
|
if (plugin[name] !== undefined && typeof plugin[name] !== "function") {
|
|
343
345
|
return `plugin.js: ${name} is not a function`;
|
|
344
346
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
import { readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { join, relative, resolve, sep } from "node:path";
|
|
28
28
|
|
|
29
|
-
import { MOD_REQUIREMENTS, checkMod, requirementsMarkdown } from "../dist/index.js";
|
|
29
|
+
import { MOD_REQUIREMENTS, checkMod, manifestFields, requirementsMarkdown } from "../dist/index.js";
|
|
30
30
|
|
|
31
31
|
const argv = process.argv.slice(2);
|
|
32
32
|
const flag = (name) => argv.includes(name);
|
|
@@ -125,7 +125,7 @@ try {
|
|
|
125
125
|
|
|
126
126
|
let declared;
|
|
127
127
|
try {
|
|
128
|
-
declared = manifestText === null ? undefined : JSON.parse(manifestText)
|
|
128
|
+
declared = manifestText === null ? undefined : manifestFields(JSON.parse(manifestText))?.payload;
|
|
129
129
|
} catch {
|
|
130
130
|
/* manifest-json reports this. */
|
|
131
131
|
}
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -207,9 +207,12 @@
|
|
|
207
207
|
* superset of the other and `grantCovers` compares the
|
|
208
208
|
* action, so one consent cannot buy both.
|
|
209
209
|
* - "display:filter" - apply a post-processing filter to the game's rendered
|
|
210
|
-
*
|
|
211
|
-
* display:replace: changing the
|
|
212
|
-
* faithful renderer is not taking
|
|
210
|
+
* canvas and panel content. It is deliberately
|
|
211
|
+
* separate from display:replace: changing the
|
|
212
|
+
* appearance of the faithful renderer is not taking
|
|
213
|
+
* ownership of it.
|
|
214
|
+
* - "input:prompt.reply" - answer the game's current typed prompt through its
|
|
215
|
+
* existing input handler. No wildcard covers it.
|
|
213
216
|
* - "ui:panel.mount" - draw with real HTML instead of the character grid: a
|
|
214
217
|
* panel of the mod's own, mounted on the page above
|
|
215
218
|
* the game. A THIRD "ui:" action, and the reason it is
|
|
@@ -250,6 +253,12 @@ export declare class CapabilityError extends Error {
|
|
|
250
253
|
export type ParsedCapability = {
|
|
251
254
|
kind: "command";
|
|
252
255
|
action: "add";
|
|
256
|
+
} | {
|
|
257
|
+
kind: "input";
|
|
258
|
+
action: "intent";
|
|
259
|
+
} | {
|
|
260
|
+
kind: "input-prompt";
|
|
261
|
+
action: "reply";
|
|
253
262
|
} | {
|
|
254
263
|
kind: "event";
|
|
255
264
|
name: string;
|
|
@@ -284,6 +293,9 @@ export type ParsedCapability = {
|
|
|
284
293
|
action: "spawn" | "wizard";
|
|
285
294
|
} | {
|
|
286
295
|
kind: "keymap";
|
|
296
|
+
action: "write" | "edit";
|
|
297
|
+
} | {
|
|
298
|
+
kind: "options";
|
|
287
299
|
action: "write";
|
|
288
300
|
} | {
|
|
289
301
|
kind: "query";
|
|
@@ -300,6 +312,9 @@ export type ParsedCapability = {
|
|
|
300
312
|
} | {
|
|
301
313
|
kind: "ui-region";
|
|
302
314
|
action: "write";
|
|
315
|
+
} | {
|
|
316
|
+
kind: "saves";
|
|
317
|
+
action: "manage";
|
|
303
318
|
};
|
|
304
319
|
/**
|
|
305
320
|
* Parse and validate a capability string against the vocabulary above,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAG,OAAO;IAKzB;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAOxB,0EAA0E;IAC1E,kBAAkB,IAAI,OAAO;IAI7B,6DAA6D;IAC7D,iBAAiB,IAAI,OAAO;CAG7B"}
|
package/dist/capabilities.js
CHANGED
|
@@ -207,9 +207,12 @@
|
|
|
207
207
|
* superset of the other and `grantCovers` compares the
|
|
208
208
|
* action, so one consent cannot buy both.
|
|
209
209
|
* - "display:filter" - apply a post-processing filter to the game's rendered
|
|
210
|
-
*
|
|
211
|
-
* display:replace: changing the
|
|
212
|
-
* faithful renderer is not taking
|
|
210
|
+
* canvas and panel content. It is deliberately
|
|
211
|
+
* separate from display:replace: changing the
|
|
212
|
+
* appearance of the faithful renderer is not taking
|
|
213
|
+
* ownership of it.
|
|
214
|
+
* - "input:prompt.reply" - answer the game's current typed prompt through its
|
|
215
|
+
* existing input handler. No wildcard covers it.
|
|
213
216
|
* - "ui:panel.mount" - draw with real HTML instead of the character grid: a
|
|
214
217
|
* panel of the mod's own, mounted on the page above
|
|
215
218
|
* the game. A THIRD "ui:" action, and the reason it is
|
|
@@ -257,10 +260,11 @@ const EVENT_RE = /^event:([a-z][a-z0-9-]*)$/;
|
|
|
257
260
|
* to ask. One grant rather than one per menu id, because ~50 capability strings
|
|
258
261
|
* would be a consent list nobody could read (`menu-runtime.ts` states the whole
|
|
259
262
|
* argument). `screen` is the same bargain for the full-screen views - the
|
|
260
|
-
* inventory listing, the character sheet, the knowledge browser. `
|
|
261
|
-
*
|
|
263
|
+
* inventory listing, the character sheet, the knowledge browser. `birth` is
|
|
264
|
+
* character creation, the birth screens from race choice to the final confirm.
|
|
265
|
+
* `ui:*.replace` covers them all, as it covers the regions.
|
|
262
266
|
*/
|
|
263
|
-
const UI_RE = /^ui:(\*|messages|sidebar|status|menu|screen)\.replace$/;
|
|
267
|
+
const UI_RE = /^ui:(\*|messages|sidebar|status|menu|screen|birth)\.replace$/;
|
|
264
268
|
/**
|
|
265
269
|
* `ui:region.create` - ADD a rectangle of your own to the screen, rather than
|
|
266
270
|
* take one of the game's.
|
|
@@ -326,6 +330,13 @@ export function parseCapability(cap) {
|
|
|
326
330
|
if (cap === "command:add") {
|
|
327
331
|
return { kind: "command", action: "add" };
|
|
328
332
|
}
|
|
333
|
+
if (cap === "input:intent") {
|
|
334
|
+
return { kind: "input", action: "intent" };
|
|
335
|
+
}
|
|
336
|
+
if (cap === "input:prompt.reply")
|
|
337
|
+
return { kind: "input-prompt", action: "reply" };
|
|
338
|
+
if (cap === "saves:manage")
|
|
339
|
+
return { kind: "saves", action: "manage" };
|
|
329
340
|
/* NOT a registry domain, deliberately. A registry:* grant means "override
|
|
330
341
|
* one named game system among many"; this one means "everything the player
|
|
331
342
|
* sees of the dungeon is drawn by this mod." It is the display OWNER, so it
|
|
@@ -394,6 +405,18 @@ export function parseCapability(cap) {
|
|
|
394
405
|
if (cap === "keymap:write") {
|
|
395
406
|
return { kind: "keymap", action: "write" };
|
|
396
407
|
}
|
|
408
|
+
/* "keymap:edit": the player's whole keymap editor - read, replace and remove
|
|
409
|
+
* any binding in the current keyset, and capture a key to bind. More than
|
|
410
|
+
* "keymap:write", which only adds new bindings a mod owns and never touches the
|
|
411
|
+
* player's, so the action is compared and neither covers the other. */
|
|
412
|
+
if (cap === "keymap:edit") {
|
|
413
|
+
return { kind: "keymap", action: "edit" };
|
|
414
|
+
}
|
|
415
|
+
/* "options:write": change the game's user interface options and its three
|
|
416
|
+
* number settings, the same values the '=' menu changes. Birth and cheat
|
|
417
|
+
* options are not reachable through it. */
|
|
418
|
+
if (cap === "options:write")
|
|
419
|
+
return { kind: "options", action: "write" };
|
|
397
420
|
if (cap === "query:snapshot")
|
|
398
421
|
return { kind: "query", action: "snapshot" };
|
|
399
422
|
if (cap === "policy:install")
|
|
@@ -447,6 +470,12 @@ function grantCovers(grant, request) {
|
|
|
447
470
|
switch (request.kind) {
|
|
448
471
|
case "command":
|
|
449
472
|
return grant.kind === "command";
|
|
473
|
+
case "input":
|
|
474
|
+
return grant.kind === "input" && grant.action === request.action;
|
|
475
|
+
case "input-prompt":
|
|
476
|
+
return grant.kind === "input-prompt";
|
|
477
|
+
case "saves":
|
|
478
|
+
return grant.kind === "saves";
|
|
450
479
|
case "event":
|
|
451
480
|
return grant.kind === "event" && grant.name === request.name;
|
|
452
481
|
case "state":
|
|
@@ -495,6 +524,8 @@ function grantCovers(grant, request) {
|
|
|
495
524
|
return grant.kind === "debug" && grant.action === request.action;
|
|
496
525
|
case "keymap":
|
|
497
526
|
return grant.kind === "keymap" && grant.action === request.action;
|
|
527
|
+
case "options":
|
|
528
|
+
return grant.kind === "options";
|
|
498
529
|
case "query":
|
|
499
530
|
return grant.kind === "query" && grant.action === request.action;
|
|
500
531
|
case "policy":
|
package/dist/capabilities.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuPG;AAEH,OAAO,EAAE,QAAQ,EAAqB,MAAM,eAAe,CAAC;AAE5D,MAAM,OAAO,eAAgB,SAAQ,KAAK;CAAG;AA0B7C,MAAM,QAAQ,GAAG,2BAA2B,CAAC;AAC7C;;;;;;;;;;;;;GAaG;AACH,MAAM,KAAK,GAAG,8DAA8D,CAAC;AAC7E;;;;;;;;;;;;;;;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Y,IAAI,EAAE,CAAC;QAC9C,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1D,MAAM,IAAI,eAAe,CACvB,QAAQ,QAAQ,CAAC,EAAE,uDAAuD;gBACxE,wBAAwB,QAAQ,CAAC,KAAK,IAAI,CAC7C,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5D,OAAO,IAAI,aAAa,CACtB,MAAM,EACN,QAAQ,CAAC,gBAAgB,IAAI,KAAK,EAClC,QAAQ,CAAC,eAAe,IAAI,KAAK,CAClC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,GAAW;QACb,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAW;QACf,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO;QAC1B,MAAM,IAAI,eAAe,CACvB,iCAAiC,GAAG,yCAAyC,CAC9E,CAAC;IACJ,CAAC;IAED,0EAA0E;IAC1E,kBAAkB;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,6DAA6D;IAC7D,iBAAiB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,10 +20,53 @@
|
|
|
20
20
|
* (add/patch/replace/remove with ownership rules and provenance). The
|
|
21
21
|
* base game composes through this exact pipeline as pack zero.
|
|
22
22
|
*/
|
|
23
|
-
export {
|
|
23
|
+
export { color, defineFormat, DocumentValidationError, json, keyInput, listFormats, parseDocument, serializeDocument, utcTimestamp, } from "./json/index.js";
|
|
24
|
+
export type { DocumentResult, FormatDefinition, FormatTag, Infer, Migration, OptionalValidator, ValidationIssue, ValidationResult, Validator, } from "./json/index.js";
|
|
25
|
+
export { customOptionsFormat } from "./json/custom-options.js";
|
|
26
|
+
export { loreFormat } from "./json/lore.js";
|
|
27
|
+
export { linoleumInventoryFormat, linoleumPackFormat, linoleumTileMapFormat, } from "./json/linoleum.js";
|
|
28
|
+
export { randartFormat } from "./json/randart.js";
|
|
29
|
+
export { windowStateFormat } from "./json/window-state.js";
|
|
30
|
+
export { keymapFormat } from "./json/keymaps.js";
|
|
31
|
+
export { GAMEPAD_ROLE_IDS, gamepadBindingsFormat, gamepadTarget } from "./json/gamepad-bindings.js";
|
|
32
|
+
export { COLOR_PREF_IDS, colorTableFormat } from "./json/color-table.js";
|
|
33
|
+
export { layoutNode, SUBWINDOW_LAYOUT_IDS, subwindowLayoutFormat } from "./json/subwindow-layout.js";
|
|
34
|
+
export type { LayoutNodeData, LayoutTileId } from "./json/subwindow-layout.js";
|
|
35
|
+
export { visualOverrideFormat } from "./json/visual-overrides.js";
|
|
36
|
+
export { soundMappingFormat } from "./json/sound-mappings.js";
|
|
37
|
+
export { autoinscriptionFormat } from "./json/autoinscriptions.js";
|
|
38
|
+
export { entryRendererFormat } from "./json/entry-renderers.js";
|
|
39
|
+
export { ACTIVE_STORAGE_KEY, activeSlotFormat, activeSlotFromLegacy, LEGACY_ACTIVE_STORAGE_KEY, } from "./json/active-slot.js";
|
|
40
|
+
export type { ActiveSlot } from "./json/active-slot.js";
|
|
41
|
+
export { characterExportFormat } from "./json/character-export.js";
|
|
42
|
+
export type { CharacterExport, CharacterExportMeta } from "./json/character-export.js";
|
|
43
|
+
export { characterFromLegacy, epochFromTimestamp, timestampFromEpoch } from "./json/character-record.js";
|
|
44
|
+
export type { CharacterRecord } from "./json/character-record.js";
|
|
45
|
+
export { LEGACY_ROSTER_STORAGE_KEY, ROSTER_STORAGE_KEY, rosterFormat, rosterFromLegacy, } from "./json/character-roster.js";
|
|
46
|
+
export type { CharacterRoster } from "./json/character-roster.js";
|
|
47
|
+
export { DEATHS_STORAGE_KEY, deathRecordsFormat, deathsFromLegacy, LEGACY_DEATHS_STORAGE_KEY, } from "./json/death-records.js";
|
|
48
|
+
export type { DeathRecordDocument, DeathRecords } from "./json/death-records.js";
|
|
49
|
+
export { LEGACY_ORPHAN_STORAGE_KEY, ORPHAN_STORAGE_KEY, orphanSavesFormat, orphansFromLegacy, } from "./json/orphan-saves.js";
|
|
50
|
+
export type { OrphanRecord, OrphanRecords } from "./json/orphan-saves.js";
|
|
51
|
+
export { isSavedGameHeader, savedGameFormat } from "./json/saved-game.js";
|
|
52
|
+
export { windowManagerFormat } from "./json/window-manager.js";
|
|
53
|
+
export { settingsFormat } from "./json/settings.js";
|
|
54
|
+
export { highScoresFormat, birthChoiceFormat, reloadStateFormat, loopbackPortFormat, mergedOriginsFormat, deathLedgerFormat, installedMarkerFormat, backupFolderFormat } from "./json/local-state.js";
|
|
55
|
+
export { loadOrderFormat } from "./json/load-order.js";
|
|
56
|
+
export { buildIdFormat } from "./json/build-id.js";
|
|
57
|
+
export { modFontFormat, modLocaleFormat } from "./json/mod-resources.js";
|
|
58
|
+
export { installedModFormat } from "./json/installed-mod.js";
|
|
59
|
+
export { modStateFormat } from "./json/mod-state.js";
|
|
60
|
+
export type { ModState } from "./json/mod-state.js";
|
|
61
|
+
export { modSettingValuesFormat } from "./json/mod-settings.js";
|
|
62
|
+
export type { ModSettingValues } from "./json/mod-settings.js";
|
|
63
|
+
export { profilesFormat } from "./json/profiles.js";
|
|
64
|
+
export type { ProfileIndex } from "./json/profiles.js";
|
|
65
|
+
export type { Settings } from "./json/settings.js";
|
|
66
|
+
export { COMPAT_CLAIMS, DEFAULT_PACK_GROUP, hasFacet, manifestFields, PACK_GROUPS, PACK_SHAPES, ManifestError, packFacets, packRef, resolveSettingValue, SECTION_BANDS, slugify, validateManifest, } from "./manifest.js";
|
|
24
67
|
export { ART_SLOTS, chooseResources, extensionOf, RESOURCE_KIND_NAMES, RESOURCE_KINDS, localeFileComplaint, localeFileTag, resourceComplaint, resourcesOfKind, } from "./resources.js";
|
|
25
68
|
export type { ContributedResource, PackResource, ResourceKind, ResourceKindSpec, ResourceMerge, } from "./resources.js";
|
|
26
|
-
export type { Capability, CompatClaim, PackCompat, PackManifest, PackPayload, PackRef, PackRule, PackSection, PackShape, PackTilePack, LinoleumTilesheetSource, SectionBand, } from "./manifest.js";
|
|
69
|
+
export type { Capability, CompatClaim, PackCompat, PackManifest, PackPayload, PackRef, PackRule, PackSection, PackSetting, PackShape, PackTilePack, LinoleumTilesheetSource, SectionBand, } from "./manifest.js";
|
|
27
70
|
export { ResolveError, resolveLoadOrder } from "./resolve.js";
|
|
28
71
|
export { expandedPackContents, expandSections, resolveSectionState, sectionFlag, } from "./sections.js";
|
|
29
72
|
export type { SectionUnit } from "./sections.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,UAA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AU,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,EACd,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,UAAU,GACX,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,38 @@
|
|
|
20
20
|
* (add/patch/replace/remove with ownership rules and provenance). The
|
|
21
21
|
* base game composes through this exact pipeline as pack zero.
|
|
22
22
|
*/
|
|
23
|
-
export {
|
|
23
|
+
export { color, defineFormat, DocumentValidationError, json, keyInput, listFormats, parseDocument, serializeDocument, utcTimestamp, } from "./json/index.js";
|
|
24
|
+
export { customOptionsFormat } from "./json/custom-options.js";
|
|
25
|
+
export { loreFormat } from "./json/lore.js";
|
|
26
|
+
export { linoleumInventoryFormat, linoleumPackFormat, linoleumTileMapFormat, } from "./json/linoleum.js";
|
|
27
|
+
export { randartFormat } from "./json/randart.js";
|
|
28
|
+
export { windowStateFormat } from "./json/window-state.js";
|
|
29
|
+
export { keymapFormat } from "./json/keymaps.js";
|
|
30
|
+
export { GAMEPAD_ROLE_IDS, gamepadBindingsFormat, gamepadTarget } from "./json/gamepad-bindings.js";
|
|
31
|
+
export { COLOR_PREF_IDS, colorTableFormat } from "./json/color-table.js";
|
|
32
|
+
export { layoutNode, SUBWINDOW_LAYOUT_IDS, subwindowLayoutFormat } from "./json/subwindow-layout.js";
|
|
33
|
+
export { visualOverrideFormat } from "./json/visual-overrides.js";
|
|
34
|
+
export { soundMappingFormat } from "./json/sound-mappings.js";
|
|
35
|
+
export { autoinscriptionFormat } from "./json/autoinscriptions.js";
|
|
36
|
+
export { entryRendererFormat } from "./json/entry-renderers.js";
|
|
37
|
+
export { ACTIVE_STORAGE_KEY, activeSlotFormat, activeSlotFromLegacy, LEGACY_ACTIVE_STORAGE_KEY, } from "./json/active-slot.js";
|
|
38
|
+
export { characterExportFormat } from "./json/character-export.js";
|
|
39
|
+
export { characterFromLegacy, epochFromTimestamp, timestampFromEpoch } from "./json/character-record.js";
|
|
40
|
+
export { LEGACY_ROSTER_STORAGE_KEY, ROSTER_STORAGE_KEY, rosterFormat, rosterFromLegacy, } from "./json/character-roster.js";
|
|
41
|
+
export { DEATHS_STORAGE_KEY, deathRecordsFormat, deathsFromLegacy, LEGACY_DEATHS_STORAGE_KEY, } from "./json/death-records.js";
|
|
42
|
+
export { LEGACY_ORPHAN_STORAGE_KEY, ORPHAN_STORAGE_KEY, orphanSavesFormat, orphansFromLegacy, } from "./json/orphan-saves.js";
|
|
43
|
+
export { isSavedGameHeader, savedGameFormat } from "./json/saved-game.js";
|
|
44
|
+
export { windowManagerFormat } from "./json/window-manager.js";
|
|
45
|
+
export { settingsFormat } from "./json/settings.js";
|
|
46
|
+
export { highScoresFormat, birthChoiceFormat, reloadStateFormat, loopbackPortFormat, mergedOriginsFormat, deathLedgerFormat, installedMarkerFormat, backupFolderFormat } from "./json/local-state.js";
|
|
47
|
+
export { loadOrderFormat } from "./json/load-order.js";
|
|
48
|
+
export { buildIdFormat } from "./json/build-id.js";
|
|
49
|
+
export { modFontFormat, modLocaleFormat } from "./json/mod-resources.js";
|
|
50
|
+
export { installedModFormat } from "./json/installed-mod.js";
|
|
51
|
+
export { modStateFormat } from "./json/mod-state.js";
|
|
52
|
+
export { modSettingValuesFormat } from "./json/mod-settings.js";
|
|
53
|
+
export { profilesFormat } from "./json/profiles.js";
|
|
54
|
+
export { COMPAT_CLAIMS, DEFAULT_PACK_GROUP, hasFacet, manifestFields, PACK_GROUPS, PACK_SHAPES, ManifestError, packFacets, packRef, resolveSettingValue, SECTION_BANDS, slugify, validateManifest, } from "./manifest.js";
|
|
24
55
|
export { ART_SLOTS, chooseResources, extensionOf, RESOURCE_KIND_NAMES, RESOURCE_KINDS, localeFileComplaint, localeFileTag, resourceComplaint, resourcesOfKind, } from "./resources.js";
|
|
25
56
|
export { ResolveError, resolveLoadOrder } from "./resolve.js";
|
|
26
57
|
export { expandedPackContents, expandSections, resolveSectionState, sectionFlag, } from "./sections.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,KAAK,EACL,YAAY,EACZ,uBAAuB,EACvB,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,GACb,MAAM,iBAAiB,CAAC;AAYzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBA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,13 @@
|
|
|
1
|
+
/** Browser-storage key for the active-slot document. */
|
|
2
|
+
export declare const ACTIVE_STORAGE_KEY = "neo-angband-active-slot";
|
|
3
|
+
/** Previous key: the slot id as a raw string, not a JSON document. */
|
|
4
|
+
export declare const LEGACY_ACTIVE_STORAGE_KEY = "neo-angband-active";
|
|
5
|
+
export interface ActiveSlot {
|
|
6
|
+
activeSlotId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const activeSlotFormat: import("./index.js").FormatDefinition<{
|
|
9
|
+
activeSlotId: string;
|
|
10
|
+
}>;
|
|
11
|
+
/** A raw slot id from the previous key, or null when the text is empty. */
|
|
12
|
+
export declare function activeSlotFromLegacy(raw: string): ActiveSlot | null;
|
|
13
|
+
//# sourceMappingURL=active-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-slot.d.ts","sourceRoot":"","sources":["../../src/json/active-slot.ts"],"names":[],"mappings":"AAEA,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAC5D,sEAAsE;AACtE,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB;AAeD,eAAO,MAAM,gBAAgB;;EAK3B,CAAC;AAEH,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAKnE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineFormat, json } from "./index.js";
|
|
2
|
+
/** Browser-storage key for the active-slot document. */
|
|
3
|
+
export const ACTIVE_STORAGE_KEY = "neo-angband-active-slot";
|
|
4
|
+
/** Previous key: the slot id as a raw string, not a JSON document. */
|
|
5
|
+
export const LEGACY_ACTIVE_STORAGE_KEY = "neo-angband-active";
|
|
6
|
+
const shape = json.object({ activeSlotId: json.string });
|
|
7
|
+
const validator = {
|
|
8
|
+
validate(value, path = "$") {
|
|
9
|
+
const result = shape.validate(value, path);
|
|
10
|
+
if (!result.ok)
|
|
11
|
+
return result;
|
|
12
|
+
if (result.value.activeSlotId === "") {
|
|
13
|
+
return { ok: false, issues: [{ path: `${path}["activeSlotId"]`, message: "activeSlotId must be nonempty" }] };
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const activeSlotFormat = defineFormat({
|
|
19
|
+
format: "neo-angband/web/active-slot",
|
|
20
|
+
schemaVersion: 1,
|
|
21
|
+
validator,
|
|
22
|
+
sample: { activeSlotId: "c1" },
|
|
23
|
+
});
|
|
24
|
+
/** A raw slot id from the previous key, or null when the text is empty. */
|
|
25
|
+
export function activeSlotFromLegacy(raw) {
|
|
26
|
+
if (raw === "")
|
|
27
|
+
return null;
|
|
28
|
+
const slot = { activeSlotId: raw };
|
|
29
|
+
const checked = validator.validate(slot);
|
|
30
|
+
return checked.ok ? checked.value : null;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=active-slot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-slot.js","sourceRoot":"","sources":["../../src/json/active-slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAyB,MAAM,YAAY,CAAC;AAEvE,wDAAwD;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AAC5D,sEAAsE;AACtE,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAM9D,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AAEzD,MAAM,SAAS,GAAG;IAChB,QAAQ,CAAC,KAAc,EAAE,IAAI,GAAG,GAAG;QACjC,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,EAAE;YAAE,OAAO,MAAM,CAAC;QAC9B,IAAI,MAAM,CAAC,KAAK,CAAC,YAAY,KAAK,EAAE,EAAE,CAAC;YACrC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,kBAAkB,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC,EAAE,CAAC;QAChH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;IAC3C,MAAM,EAAE,6BAA6B;IACrC,aAAa,EAAE,CAAC;IAChB,SAAS;IACT,MAAM,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CAC/B,CAAC,CAAC;AAEH,2EAA2E;AAC3E,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,IAAI,GAAG,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,IAAI,GAAe,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC;IAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Aware autoinscriptions, named the way an `inscribe` line named them. */
|
|
2
|
+
export declare const autoinscriptionFormat: import("./index.js").FormatDefinition<{
|
|
3
|
+
readonly notes: ({
|
|
4
|
+
readonly tval: string;
|
|
5
|
+
readonly sval: string;
|
|
6
|
+
readonly text: string;
|
|
7
|
+
} & {})[];
|
|
8
|
+
} & {}>;
|
|
9
|
+
//# sourceMappingURL=autoinscriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoinscriptions.d.ts","sourceRoot":"","sources":["../../src/json/autoinscriptions.ts"],"names":[],"mappings":"AAGA,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB;;;;;;OAahC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineFormat, json } from "./index.js";
|
|
2
|
+
import { nonempty } from "./scalars.js";
|
|
3
|
+
/** Aware autoinscriptions, named the way an `inscribe` line named them. */
|
|
4
|
+
export const autoinscriptionFormat = defineFormat({
|
|
5
|
+
format: "neo-angband/prefs/autoinscriptions",
|
|
6
|
+
schemaVersion: 1,
|
|
7
|
+
validator: json.object({
|
|
8
|
+
notes: json.array(json.object({
|
|
9
|
+
tval: nonempty,
|
|
10
|
+
sval: nonempty,
|
|
11
|
+
text: json.string,
|
|
12
|
+
})),
|
|
13
|
+
}),
|
|
14
|
+
sample: {
|
|
15
|
+
notes: [{ tval: "potion", sval: "Cure Light Wounds", text: "@q1" }],
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=autoinscriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoinscriptions.js","sourceRoot":"","sources":["../../src/json/autoinscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;IAChD,MAAM,EAAE,oCAAoC;IAC5C,aAAa,EAAE,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;YAC5B,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,IAAI,CAAC,MAAM;SAClB,CAAC,CAAC;KACJ,CAAC;IACF,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;KACpE;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-id.d.ts","sourceRoot":"","sources":["../../src/json/build-id.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;OAKxB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { defineFormat, json } from "./index.js";
|
|
2
|
+
const validator = json.object({ buildId: json.string });
|
|
3
|
+
export const buildIdFormat = defineFormat({
|
|
4
|
+
format: "neo-angband/web/build-id",
|
|
5
|
+
schemaVersion: 1,
|
|
6
|
+
validator,
|
|
7
|
+
sample: { buildId: "local-build" },
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=build-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-id.js","sourceRoot":"","sources":["../../src/json/build-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;IACxC,MAAM,EAAE,0BAA0B;IAClC,aAAa,EAAE,CAAC;IAChB,SAAS;IACT,MAAM,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A `.neochar` character file: one pretty JSON document.
|
|
3
|
+
*
|
|
4
|
+
* `save` is the game document when this build can read the slot, and the
|
|
5
|
+
* original slot text when it cannot. An unreadable slot still has to travel,
|
|
6
|
+
* because exporting it is how a later build gets a second look.
|
|
7
|
+
*/
|
|
8
|
+
export interface CharacterExportMeta {
|
|
9
|
+
name: string;
|
|
10
|
+
race: string;
|
|
11
|
+
cls: string;
|
|
12
|
+
sex: string;
|
|
13
|
+
level: number;
|
|
14
|
+
depth: number;
|
|
15
|
+
maxDepth: number;
|
|
16
|
+
turn: number;
|
|
17
|
+
alive: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface CharacterExport {
|
|
20
|
+
engine: string;
|
|
21
|
+
exportedAt: string;
|
|
22
|
+
lineage?: string;
|
|
23
|
+
meta: CharacterExportMeta;
|
|
24
|
+
save: unknown;
|
|
25
|
+
}
|
|
26
|
+
export declare const characterExportFormat: import("./index.js").FormatDefinition<CharacterExport>;
|
|
27
|
+
//# sourceMappingURL=character-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-export.d.ts","sourceRoot":"","sources":["../../src/json/character-export.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;CACf;AAyCD,eAAO,MAAM,qBAAqB,wDA+BhC,CAAC"}
|