kiosko-plugin-doom 0.0.0-stage → 0.1.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/LICENSE +339 -0
- package/README.md +84 -2
- package/dist/engine.js +2772 -0
- package/dist/index.js +298 -0
- package/docs/attract.jpg +0 -0
- package/kiosko-manifest.json +86 -0
- package/package.json +69 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { createRequire as __pluginRequire } from 'node:module'; const require = __pluginRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { defineInterlude, definePlugin, t } from "@kiosko/sdk";
|
|
5
|
+
|
|
6
|
+
// src/engine.ts
|
|
7
|
+
import { fork } from "node:child_process";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
function childPath() {
|
|
10
|
+
const here = import.meta.url;
|
|
11
|
+
return fileURLToPath(new URL(here.endsWith(".ts") ? "./engine-child.ts" : "./engine.js", here));
|
|
12
|
+
}
|
|
13
|
+
var Engine = class _Engine {
|
|
14
|
+
child;
|
|
15
|
+
waiting = null;
|
|
16
|
+
idle = null;
|
|
17
|
+
exitMessage = null;
|
|
18
|
+
width = 0;
|
|
19
|
+
height = 0;
|
|
20
|
+
o;
|
|
21
|
+
constructor(o) {
|
|
22
|
+
this.o = o;
|
|
23
|
+
this.child = fork(childPath(), [], {
|
|
24
|
+
serialization: "advanced",
|
|
25
|
+
stdio: ["ignore", "ignore", "pipe", "ipc"]
|
|
26
|
+
});
|
|
27
|
+
this.child.unref();
|
|
28
|
+
this.child.channel?.unref();
|
|
29
|
+
this.child.stderr?.unref?.();
|
|
30
|
+
let stderr = "";
|
|
31
|
+
this.child.stderr?.on("data", (b) => stderr = (stderr + b.toString()).slice(-2e3));
|
|
32
|
+
this.child.on("message", (m) => {
|
|
33
|
+
if (m.type === "exit") this.exitMessage = m.message;
|
|
34
|
+
const w = this.waiting;
|
|
35
|
+
if (!w) return;
|
|
36
|
+
this.waiting = null;
|
|
37
|
+
this.child.channel?.unref();
|
|
38
|
+
clearTimeout(w.timer);
|
|
39
|
+
if (m.type === "exit") w.reject(new Error(m.message));
|
|
40
|
+
else w.resolve(m);
|
|
41
|
+
});
|
|
42
|
+
this.child.on("exit", (code, signal) => {
|
|
43
|
+
this.exitMessage ??= `engine process ended (${signal ?? code})${stderr ? `: ${stderr.trim().split("\n").slice(-3).join(" | ")}` : ""}`;
|
|
44
|
+
const w = this.waiting;
|
|
45
|
+
this.waiting = null;
|
|
46
|
+
if (w) {
|
|
47
|
+
clearTimeout(w.timer);
|
|
48
|
+
w.reject(new Error(this.exitMessage));
|
|
49
|
+
}
|
|
50
|
+
if (this.idle) clearTimeout(this.idle);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** Forks the engine and loads the WAD. */
|
|
54
|
+
static async start(o) {
|
|
55
|
+
const e = new _Engine({ wad: o.wad, args: o.args ?? [], idleMs: o.idleMs ?? 1e4, timeoutMs: o.timeoutMs ?? 15e3 });
|
|
56
|
+
try {
|
|
57
|
+
const ready = await e.ask({ type: "start", wad: o.wad, args: o.args ?? [] });
|
|
58
|
+
if (ready.type !== "ready") throw new Error(`unexpected ${ready.type}`);
|
|
59
|
+
e.width = ready.width;
|
|
60
|
+
e.height = ready.height;
|
|
61
|
+
e.touch();
|
|
62
|
+
return e;
|
|
63
|
+
} catch (err) {
|
|
64
|
+
e.close();
|
|
65
|
+
throw err;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
get alive() {
|
|
69
|
+
return this.child.exitCode === null && this.child.signalCode === null && this.exitMessage === null;
|
|
70
|
+
}
|
|
71
|
+
/** Runs the game up to `ms` since it started and returns that frame. */
|
|
72
|
+
async frame(ms) {
|
|
73
|
+
this.touch();
|
|
74
|
+
const m = await this.ask({ type: "frame", ms });
|
|
75
|
+
if (m.type !== "frame") throw new Error(`unexpected ${m.type}`);
|
|
76
|
+
return { ms: m.ms, width: this.width, height: this.height, pixels: m.pixels, state: m.state };
|
|
77
|
+
}
|
|
78
|
+
key(pressed, key) {
|
|
79
|
+
if (this.alive) this.child.send({ type: "key", pressed, key });
|
|
80
|
+
}
|
|
81
|
+
close() {
|
|
82
|
+
if (this.idle) clearTimeout(this.idle);
|
|
83
|
+
this.idle = null;
|
|
84
|
+
if (this.child.exitCode === null && this.child.signalCode === null) this.child.kill();
|
|
85
|
+
}
|
|
86
|
+
touch() {
|
|
87
|
+
if (this.idle) clearTimeout(this.idle);
|
|
88
|
+
this.idle = setTimeout(() => this.close(), this.o.idleMs);
|
|
89
|
+
this.idle.unref();
|
|
90
|
+
}
|
|
91
|
+
ask(m) {
|
|
92
|
+
if (!this.alive) return Promise.reject(new Error(this.exitMessage ?? "engine stopped"));
|
|
93
|
+
if (this.waiting) return Promise.reject(new Error("engine busy"));
|
|
94
|
+
return new Promise((resolve, reject) => {
|
|
95
|
+
const timer = setTimeout(() => {
|
|
96
|
+
this.waiting = null;
|
|
97
|
+
this.child.channel?.unref();
|
|
98
|
+
reject(new Error(`engine did not answer ${m.type} in ${this.o.timeoutMs} ms`));
|
|
99
|
+
this.close();
|
|
100
|
+
}, this.o.timeoutMs);
|
|
101
|
+
this.waiting = { resolve, reject, timer };
|
|
102
|
+
this.child.channel?.ref();
|
|
103
|
+
this.child.send(m);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// src/wad.ts
|
|
109
|
+
import { createHash } from "node:crypto";
|
|
110
|
+
import { existsSync } from "node:fs";
|
|
111
|
+
import { mkdir, open, rename, rm, writeFile } from "node:fs/promises";
|
|
112
|
+
import { join } from "node:path";
|
|
113
|
+
import { inflateRawSync } from "node:zlib";
|
|
114
|
+
var FREEDOOM = {
|
|
115
|
+
version: "0.13.0",
|
|
116
|
+
url: "https://github.com/freedoom/freedoom/releases/download/v0.13.0/freedoom-0.13.0.zip",
|
|
117
|
+
/** From the release's signed freedoom-0.13.0-CHECKSUM. */
|
|
118
|
+
zipSha256: "3f9b264f3e3ce503b4fb7f6bdcb1f419d93c7b546f4df3e874dd878db9688f59",
|
|
119
|
+
wad: "freedoom1.wad",
|
|
120
|
+
wadSha256: "7323bcc168c5a45ff10749b339960e98314740a734c30d4b9f3337001f9e703d",
|
|
121
|
+
/** Files taken from the zip (its licence goes with the WAD). */
|
|
122
|
+
keep: ["freedoom1.wad", "COPYING.txt"]
|
|
123
|
+
};
|
|
124
|
+
var freedoomDir = (dataDir) => join(dataDir, `freedoom-${FREEDOOM.version}`);
|
|
125
|
+
function unzip(zip, want) {
|
|
126
|
+
const b = Buffer.from(zip.buffer, zip.byteOffset, zip.byteLength);
|
|
127
|
+
let eocd = -1;
|
|
128
|
+
for (let i = b.length - 22; i >= Math.max(0, b.length - 22 - 65535); i--) {
|
|
129
|
+
if (b.readUInt32LE(i) === 101010256) {
|
|
130
|
+
eocd = i;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (eocd < 0) throw new Error("not a zip file");
|
|
135
|
+
const entries = b.readUInt16LE(eocd + 10);
|
|
136
|
+
let p = b.readUInt32LE(eocd + 16);
|
|
137
|
+
const out = /* @__PURE__ */ new Map();
|
|
138
|
+
for (let n = 0; n < entries; n++) {
|
|
139
|
+
if (b.readUInt32LE(p) !== 33639248) throw new Error("broken zip directory");
|
|
140
|
+
const method = b.readUInt16LE(p + 10);
|
|
141
|
+
const size = b.readUInt32LE(p + 20);
|
|
142
|
+
const nameLen = b.readUInt16LE(p + 28);
|
|
143
|
+
const extraLen = b.readUInt16LE(p + 30);
|
|
144
|
+
const commentLen = b.readUInt16LE(p + 32);
|
|
145
|
+
const local = b.readUInt32LE(p + 42);
|
|
146
|
+
const name = b.toString("utf8", p + 46, p + 46 + nameLen);
|
|
147
|
+
p += 46 + nameLen + extraLen + commentLen;
|
|
148
|
+
if (!want(name)) continue;
|
|
149
|
+
if (b.readUInt32LE(local) !== 67324752) throw new Error(`broken zip entry ${name}`);
|
|
150
|
+
const start = local + 30 + b.readUInt16LE(local + 26) + b.readUInt16LE(local + 28);
|
|
151
|
+
const data = b.subarray(start, start + size);
|
|
152
|
+
if (method === 0) out.set(name, Buffer.from(data));
|
|
153
|
+
else if (method === 8) out.set(name, inflateRawSync(data));
|
|
154
|
+
else throw new Error(`zip method ${method} not supported (${name})`);
|
|
155
|
+
}
|
|
156
|
+
return out;
|
|
157
|
+
}
|
|
158
|
+
var sha256 = (b) => createHash("sha256").update(b).digest("hex");
|
|
159
|
+
var downloading = null;
|
|
160
|
+
var lastError = null;
|
|
161
|
+
function freedoom(dataDir, log, get = fetch) {
|
|
162
|
+
const dir = freedoomDir(dataDir);
|
|
163
|
+
const path = join(dir, FREEDOOM.wad);
|
|
164
|
+
if (existsSync(path)) return { ready: true, path, name: `Freedoom ${FREEDOOM.version}` };
|
|
165
|
+
if (!downloading) {
|
|
166
|
+
lastError = null;
|
|
167
|
+
log(`downloading Freedoom ${FREEDOOM.version} (24 MB) from GitHub`);
|
|
168
|
+
downloading = downloadFreedoom(dir, get).then(() => log(`Freedoom ${FREEDOOM.version} ready in ${dir}`)).catch((err) => {
|
|
169
|
+
lastError = err instanceof Error ? err.message : String(err);
|
|
170
|
+
log(`Freedoom download failed: ${lastError}`);
|
|
171
|
+
}).finally(() => downloading = null);
|
|
172
|
+
}
|
|
173
|
+
return { ready: false, downloading: true, reason: lastError ?? `downloading Freedoom ${FREEDOOM.version}` };
|
|
174
|
+
}
|
|
175
|
+
async function downloadFreedoom(dir, get = fetch) {
|
|
176
|
+
const res = await get(FREEDOOM.url, { redirect: "follow", signal: AbortSignal.timeout(10 * 6e4) });
|
|
177
|
+
if (!res.ok) throw new Error(`HTTP ${res.status} for ${FREEDOOM.url}`);
|
|
178
|
+
const zip = new Uint8Array(await res.arrayBuffer());
|
|
179
|
+
if (sha256(zip) !== FREEDOOM.zipSha256) throw new Error("the Freedoom zip does not match its published SHA-256");
|
|
180
|
+
const files = unzip(zip, (name) => FREEDOOM.keep.includes(name.split("/").pop()));
|
|
181
|
+
const wad = [...files].find(([n]) => n.endsWith(`/${FREEDOOM.wad}`) || n === FREEDOOM.wad)?.[1];
|
|
182
|
+
if (!wad || sha256(wad) !== FREEDOOM.wadSha256) throw new Error(`${FREEDOOM.wad} missing or not the expected one`);
|
|
183
|
+
const tmp = `${dir}.part`;
|
|
184
|
+
await rm(tmp, { recursive: true, force: true });
|
|
185
|
+
await mkdir(tmp, { recursive: true });
|
|
186
|
+
for (const [name, data] of files) await writeFile(join(tmp, name.split("/").pop()), data);
|
|
187
|
+
await rm(dir, { recursive: true, force: true });
|
|
188
|
+
await rename(tmp, dir);
|
|
189
|
+
}
|
|
190
|
+
async function ownWad(path) {
|
|
191
|
+
if (!existsSync(path)) return { ready: false, reason: `${path} not found` };
|
|
192
|
+
const f = await open(path, "r");
|
|
193
|
+
const head = Buffer.alloc(4);
|
|
194
|
+
try {
|
|
195
|
+
await f.read(head, 0, 4, 0);
|
|
196
|
+
} finally {
|
|
197
|
+
await f.close();
|
|
198
|
+
}
|
|
199
|
+
if (head.toString("latin1") !== "IWAD") return { ready: false, reason: `${path} is not an IWAD (${JSON.stringify(head.toString("latin1"))})` };
|
|
200
|
+
return { ready: true, path, name: path.split(/[\\/]/).pop() };
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// src/index.ts
|
|
204
|
+
var ASPECT = 4 / 3;
|
|
205
|
+
function viewport(width, height, aspect = ASPECT) {
|
|
206
|
+
const w = Math.min(width, Math.round(height * aspect));
|
|
207
|
+
const h = Math.min(height, Math.round(w / aspect));
|
|
208
|
+
return { x: Math.round((width - w) / 2), y: Math.round((height - h) / 2), w, h };
|
|
209
|
+
}
|
|
210
|
+
var MAX_FRAMES = 600 * 30;
|
|
211
|
+
var attract = defineInterlude({
|
|
212
|
+
id: "attract",
|
|
213
|
+
name: { en: "Doom demos", es: "Demos de Doom", de: "Doom-Demos", "zh-Hans": "Doom \u6F14\u793A", "zh-Hant": "Doom \u793A\u7BC4" },
|
|
214
|
+
description: {
|
|
215
|
+
en: "The game plays its own recorded demos between title screens, with no one at the controls. Freedoom by default (free levels and art, downloaded once, 24 MB); your own IWAD if you have one.",
|
|
216
|
+
es: "El juego reproduce sus propias demos grabadas entre pantallas de t\xEDtulo, sin nadie a los mandos. Freedoom por defecto (niveles y gr\xE1ficos libres, se descarga una vez, 24 MB); tu propio IWAD si tienes uno.",
|
|
217
|
+
de: "Das Spiel zeigt seine eigenen aufgezeichneten Demos zwischen den Titelbildern, ganz ohne Steuerung. Standardm\xE4\xDFig Freedoom (freie Level und Grafiken, einmal heruntergeladen, 24 MB); dein eigenes IWAD, falls du eines hast.",
|
|
218
|
+
"zh-Hans": "\u6E38\u620F\u5728\u6807\u9898\u753B\u9762\u4E4B\u95F4\u81EA\u52A8\u64AD\u653E\u5F55\u5236\u597D\u7684\u6F14\u793A\uFF0C\u65E0\u9700\u64CD\u4F5C\u3002\u9ED8\u8BA4\u4F7F\u7528 Freedoom\uFF08\u514D\u8D39\u5173\u5361\u548C\u7F8E\u672F\uFF0C\u53EA\u4E0B\u8F7D\u4E00\u6B21\uFF0C24 MB\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u7528\u4F60\u81EA\u5DF1\u7684 IWAD\u3002",
|
|
219
|
+
"zh-Hant": "\u904A\u6232\u5728\u6A19\u984C\u756B\u9762\u4E4B\u9593\u81EA\u52D5\u64AD\u653E\u9304\u88FD\u597D\u7684\u793A\u7BC4\uFF0C\u7121\u9700\u64CD\u4F5C\u3002\u9810\u8A2D\u4F7F\u7528 Freedoom\uFF08\u514D\u8CBB\u95DC\u5361\u548C\u7F8E\u8853\uFF0C\u53EA\u4E0B\u8F09\u4E00\u6B21\uFF0C24 MB\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u7528\u4F60\u81EA\u5DF1\u7684 IWAD\u3002"
|
|
220
|
+
},
|
|
221
|
+
icon: "gamepad-2",
|
|
222
|
+
fps: 30,
|
|
223
|
+
options: t.object({
|
|
224
|
+
wad: t.string({
|
|
225
|
+
default: "",
|
|
226
|
+
format: "path",
|
|
227
|
+
risk: "path",
|
|
228
|
+
label: { en: "IWAD", es: "IWAD", de: "IWAD", "zh-Hans": "IWAD", "zh-Hant": "IWAD" },
|
|
229
|
+
help: {
|
|
230
|
+
en: "A game data file of your own (doom1.wad, DOOM.WAD, DOOM2.WAD\u2026). Empty: Freedoom.",
|
|
231
|
+
es: "Un archivo de datos del juego tuyo (doom1.wad, DOOM.WAD, DOOM2.WAD\u2026). Vac\xEDo: Freedoom.",
|
|
232
|
+
de: "Eine eigene Spieldatendatei (doom1.wad, DOOM.WAD, DOOM2.WAD\u2026). Leer: Freedoom.",
|
|
233
|
+
"zh-Hans": "\u4F60\u81EA\u5DF1\u7684\u6E38\u620F\u6570\u636E\u6587\u4EF6\uFF08doom1.wad\u3001DOOM.WAD\u3001DOOM2.WAD\u2026\uFF09\u3002\u7559\u7A7A\uFF1AFreedoom\u3002",
|
|
234
|
+
"zh-Hant": "\u4F60\u81EA\u5DF1\u7684\u904A\u6232\u8CC7\u6599\u6A94\uFF08doom1.wad\u3001DOOM.WAD\u3001DOOM2.WAD\u2026\uFF09\u3002\u7559\u7A7A\uFF1AFreedoom\u3002"
|
|
235
|
+
},
|
|
236
|
+
placeholder: "~/games/doom1.wad"
|
|
237
|
+
})
|
|
238
|
+
}),
|
|
239
|
+
async prepare(ctx) {
|
|
240
|
+
const say = (msg) => ctx.log(`doom: ${msg}`);
|
|
241
|
+
const wadPath = ctx.options.wad.trim().replace(/^~(?=$|[\\/])/, process.env.HOME ?? process.env.USERPROFILE ?? "~");
|
|
242
|
+
const wad = wadPath ? await ownWad(wadPath) : freedoom(ctx.dataDir, say);
|
|
243
|
+
if (!wad.ready) {
|
|
244
|
+
say(`not playing: ${wad.reason}`);
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
const engine = await Engine.start({ wad: wad.path });
|
|
248
|
+
say(`playing the demos of ${wad.name}`);
|
|
249
|
+
const small = ctx.canvas.createCanvas(engine.width, engine.height);
|
|
250
|
+
const sg = small.getContext("2d");
|
|
251
|
+
const image = sg.createImageData(engine.width, engine.height);
|
|
252
|
+
const view = viewport(ctx.width, ctx.height);
|
|
253
|
+
let t0 = 0;
|
|
254
|
+
return {
|
|
255
|
+
frames: MAX_FRAMES,
|
|
256
|
+
async draw(g, i) {
|
|
257
|
+
if (i === 0) t0 = Date.now();
|
|
258
|
+
const f = await engine.frame(Date.now() - t0);
|
|
259
|
+
image.data.set(f.pixels);
|
|
260
|
+
sg.putImageData(image, 0, 0);
|
|
261
|
+
g.fillStyle = "#000";
|
|
262
|
+
g.fillRect(0, 0, ctx.width, ctx.height);
|
|
263
|
+
g.imageSmoothingEnabled = false;
|
|
264
|
+
g.drawImage(small, view.x, view.y, view.w, view.h);
|
|
265
|
+
if (i >= MAX_FRAMES - 1) engine.close();
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
var index_default = definePlugin({
|
|
271
|
+
id: "doom",
|
|
272
|
+
name: { en: "Doom", es: "Doom", de: "Doom", "zh-Hans": "Doom", "zh-Hant": "Doom" },
|
|
273
|
+
version: "0.1.0",
|
|
274
|
+
description: {
|
|
275
|
+
en: "Doom on your panel: the game plays its own demos as an interlude. The engine (doomgeneric, GPL) runs in a process of its own; the levels are Freedoom unless you bring your own IWAD.",
|
|
276
|
+
es: "Doom en tu panel: el juego reproduce sus propias demos como interludio. El motor (doomgeneric, GPL) corre en un proceso propio; los niveles son de Freedoom salvo que pongas tu propio IWAD.",
|
|
277
|
+
de: "Doom auf deinem Panel: Das Spiel zeigt seine eigenen Demos als Zwischenspiel. Die Engine (doomgeneric, GPL) l\xE4uft in einem eigenen Prozess; die Level sind Freedoom, au\xDFer du bringst dein eigenes IWAD mit.",
|
|
278
|
+
"zh-Hans": "\u5728\u9762\u677F\u4E0A\u8FD0\u884C Doom\uFF1A\u6E38\u620F\u628A\u81EA\u5DF1\u7684\u6F14\u793A\u4F5C\u4E3A\u63D2\u66F2\u64AD\u653E\u3002\u5F15\u64CE\uFF08doomgeneric\uFF0CGPL\uFF09\u5728\u72EC\u7ACB\u8FDB\u7A0B\u4E2D\u8FD0\u884C\uFF1B\u5173\u5361\u9ED8\u8BA4\u6765\u81EA Freedoom\uFF0C\u4E5F\u53EF\u4F7F\u7528\u4F60\u81EA\u5DF1\u7684 IWAD\u3002",
|
|
279
|
+
"zh-Hant": "\u5728\u9762\u677F\u4E0A\u57F7\u884C Doom\uFF1A\u904A\u6232\u628A\u81EA\u5DF1\u7684\u793A\u7BC4\u7576\u4F5C\u63D2\u66F2\u64AD\u653E\u3002\u5F15\u64CE\uFF08doomgeneric\uFF0CGPL\uFF09\u5728\u7368\u7ACB\u884C\u7A0B\u4E2D\u57F7\u884C\uFF1B\u95DC\u5361\u9810\u8A2D\u4F86\u81EA Freedoom\uFF0C\u4E5F\u53EF\u4F7F\u7528\u4F60\u81EA\u5DF1\u7684 IWAD\u3002"
|
|
280
|
+
},
|
|
281
|
+
author: "Loksly",
|
|
282
|
+
license: "GPL-2.0-or-later",
|
|
283
|
+
homepage: "https://github.com/kiosko-lcd/kiosko-plugin-doom#readme",
|
|
284
|
+
repository: "https://github.com/kiosko-lcd/kiosko-plugin-doom",
|
|
285
|
+
sdk: "^0.2.0",
|
|
286
|
+
permissions: {
|
|
287
|
+
network: ["github.com", "release-assets.githubusercontent.com"],
|
|
288
|
+
exec: ["node"],
|
|
289
|
+
files: ["user"]
|
|
290
|
+
},
|
|
291
|
+
interludes: [attract]
|
|
292
|
+
});
|
|
293
|
+
export {
|
|
294
|
+
ASPECT,
|
|
295
|
+
attract,
|
|
296
|
+
index_default as default,
|
|
297
|
+
viewport
|
|
298
|
+
};
|
package/docs/attract.jpg
ADDED
|
Binary file
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest": 1,
|
|
3
|
+
"id": "doom",
|
|
4
|
+
"package": "kiosko-plugin-doom",
|
|
5
|
+
"name": {
|
|
6
|
+
"en": "Doom",
|
|
7
|
+
"es": "Doom",
|
|
8
|
+
"de": "Doom",
|
|
9
|
+
"zh-Hans": "Doom",
|
|
10
|
+
"zh-Hant": "Doom"
|
|
11
|
+
},
|
|
12
|
+
"version": "0.1.0",
|
|
13
|
+
"description": {
|
|
14
|
+
"en": "Doom on your panel: the game plays its own demos as an interlude. The engine (doomgeneric, GPL) runs in a process of its own; the levels are Freedoom unless you bring your own IWAD.",
|
|
15
|
+
"es": "Doom en tu panel: el juego reproduce sus propias demos como interludio. El motor (doomgeneric, GPL) corre en un proceso propio; los niveles son de Freedoom salvo que pongas tu propio IWAD.",
|
|
16
|
+
"de": "Doom auf deinem Panel: Das Spiel zeigt seine eigenen Demos als Zwischenspiel. Die Engine (doomgeneric, GPL) läuft in einem eigenen Prozess; die Level sind Freedoom, außer du bringst dein eigenes IWAD mit.",
|
|
17
|
+
"zh-Hans": "在面板上运行 Doom:游戏把自己的演示作为插曲播放。引擎(doomgeneric,GPL)在独立进程中运行;关卡默认来自 Freedoom,也可使用你自己的 IWAD。",
|
|
18
|
+
"zh-Hant": "在面板上執行 Doom:遊戲把自己的示範當作插曲播放。引擎(doomgeneric,GPL)在獨立行程中執行;關卡預設來自 Freedoom,也可使用你自己的 IWAD。"
|
|
19
|
+
},
|
|
20
|
+
"author": "Loksly",
|
|
21
|
+
"license": "GPL-2.0-or-later",
|
|
22
|
+
"homepage": "https://github.com/kiosko-lcd/kiosko-plugin-doom#readme",
|
|
23
|
+
"repository": "https://github.com/kiosko-lcd/kiosko-plugin-doom",
|
|
24
|
+
"sdk": "^0.2.0",
|
|
25
|
+
"platforms": [
|
|
26
|
+
"linux",
|
|
27
|
+
"darwin",
|
|
28
|
+
"win32"
|
|
29
|
+
],
|
|
30
|
+
"languages": [
|
|
31
|
+
"en",
|
|
32
|
+
"de",
|
|
33
|
+
"es",
|
|
34
|
+
"zh-Hans",
|
|
35
|
+
"zh-Hant"
|
|
36
|
+
],
|
|
37
|
+
"categories": [],
|
|
38
|
+
"tags": [],
|
|
39
|
+
"permissions": {
|
|
40
|
+
"network": [
|
|
41
|
+
"github.com",
|
|
42
|
+
"release-assets.githubusercontent.com"
|
|
43
|
+
],
|
|
44
|
+
"exec": [
|
|
45
|
+
"node"
|
|
46
|
+
],
|
|
47
|
+
"files": [
|
|
48
|
+
"user"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"riskyOptions": [
|
|
52
|
+
{
|
|
53
|
+
"path": "doom/attract: wad",
|
|
54
|
+
"risk": [
|
|
55
|
+
"path"
|
|
56
|
+
],
|
|
57
|
+
"secret": false
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"requires": [],
|
|
61
|
+
"optional": [],
|
|
62
|
+
"widgets": [],
|
|
63
|
+
"sources": [],
|
|
64
|
+
"interludes": [
|
|
65
|
+
{
|
|
66
|
+
"type": "doom/attract",
|
|
67
|
+
"name": {
|
|
68
|
+
"en": "Doom demos",
|
|
69
|
+
"es": "Demos de Doom",
|
|
70
|
+
"de": "Doom-Demos",
|
|
71
|
+
"zh-Hans": "Doom 演示",
|
|
72
|
+
"zh-Hant": "Doom 示範"
|
|
73
|
+
},
|
|
74
|
+
"description": {
|
|
75
|
+
"en": "The game plays its own recorded demos between title screens, with no one at the controls. Freedoom by default (free levels and art, downloaded once, 24 MB); your own IWAD if you have one.",
|
|
76
|
+
"es": "El juego reproduce sus propias demos grabadas entre pantallas de título, sin nadie a los mandos. Freedoom por defecto (niveles y gráficos libres, se descarga una vez, 24 MB); tu propio IWAD si tienes uno.",
|
|
77
|
+
"de": "Das Spiel zeigt seine eigenen aufgezeichneten Demos zwischen den Titelbildern, ganz ohne Steuerung. Standardmäßig Freedoom (freie Level und Grafiken, einmal heruntergeladen, 24 MB); dein eigenes IWAD, falls du eines hast.",
|
|
78
|
+
"zh-Hans": "游戏在标题画面之间自动播放录制好的演示,无需操作。默认使用 Freedoom(免费关卡和美术,只下载一次,24 MB);也可以用你自己的 IWAD。",
|
|
79
|
+
"zh-Hant": "遊戲在標題畫面之間自動播放錄製好的示範,無需操作。預設使用 Freedoom(免費關卡和美術,只下載一次,24 MB);也可以用你自己的 IWAD。"
|
|
80
|
+
},
|
|
81
|
+
"icon": "gamepad-2",
|
|
82
|
+
"fps": 30
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"templates": []
|
|
86
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiosko-plugin-doom",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Doom on your Kiosko panel: the game plays its own demos as an interlude. Engine (doomgeneric, GPL) in a process of its own; Freedoom levels unless you bring your own IWAD.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "GPL-2.0-or-later",
|
|
7
|
+
"author": "Loksly",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"kiosko",
|
|
10
|
+
"kiosko-plugin",
|
|
11
|
+
"lcd",
|
|
12
|
+
"doom",
|
|
13
|
+
"freedoom",
|
|
14
|
+
"interlude"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/kiosko-lcd/kiosko-plugin-doom#readme",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/kiosko-lcd/kiosko-plugin-doom.git"
|
|
20
|
+
},
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/kiosko-lcd/kiosko-plugin-doom/issues"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"source": "./src/index.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"kiosko": {
|
|
31
|
+
"plugin": "./dist/index.js",
|
|
32
|
+
"id": "doom",
|
|
33
|
+
"sdk": "^0.2.0",
|
|
34
|
+
"languages": [
|
|
35
|
+
"en",
|
|
36
|
+
"es",
|
|
37
|
+
"de",
|
|
38
|
+
"zh-Hant",
|
|
39
|
+
"zh-Hans"
|
|
40
|
+
],
|
|
41
|
+
"manifest": "./kiosko-manifest.json"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"docs",
|
|
46
|
+
"kiosko-manifest.json",
|
|
47
|
+
"README.md",
|
|
48
|
+
"LICENSE"
|
|
49
|
+
],
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=22.18"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "node build.mjs",
|
|
55
|
+
"build:engine": "engine/build.sh",
|
|
56
|
+
"test": "node --conditions=source --test \"src/**/*.test.ts\"",
|
|
57
|
+
"check": "tsc -p tsconfig.json",
|
|
58
|
+
"prepublishOnly": "npm run build"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@kiosko/sdk": "^0.2.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@kiosko/core": "^0.2.1",
|
|
65
|
+
"@kiosko/sdk": "^0.2.1",
|
|
66
|
+
"@napi-rs/canvas": "^1.0.10",
|
|
67
|
+
"@types/node": "^24.0.0",
|
|
68
|
+
"esbuild": "^0.25.0",
|
|
69
|
+
"typescript": "^5.9.3"
|
|
70
|
+
}
|
|
71
|
+
}
|