Checkpoint Eibenreith ink architecture

This commit is contained in:
2026-05-24 09:09:41 +02:00
parent beac5a2be3
commit d42540f29d
35 changed files with 12015 additions and 54 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ class InkEngine {
this.story = null;
this.nextTurnId = 1;
this.storyJson = null;
this.choicePreviewTagKeys = new Set(['action', 'key', 'letter', 'optional', 'gated', 'sort']);
this.choicePreviewTagKeys = new Set(['action', 'key', 'letter', 'optional', 'gated', 'sort', 'auto']);
}
isRunning() {
if (!this.story)
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -2
View File
@@ -204,11 +204,12 @@ io.on('connection', (socket) => {
return;
}
const command = String(data?.command || '').trim();
const requestId = Number(data?.requestId || 0);
// During typography and animation work, mirror the command back through
// the real socket path so the UI pipeline can be tested end to end.
socket.emit('narrativeResponse', createTextTurn(socket.id, command, {
socket.emit('narrativeResponse', withClientRequestId(createTextTurn(socket.id, command, {
currentRoomId: gameRunner.getGameState().currentRoomId
}, gameRunner.getSuggestions()));
}, gameRunner.getSuggestions()), Number.isInteger(requestId) && requestId > 0 ? requestId : undefined));
}
catch (error) {
console.error('Error processing command:', error);
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -261,6 +261,7 @@ io.on('connection', (socket) => {
return;
}
const input = String(data?.command ?? '').trim();
const requestId = Number(data?.requestId || 0);
if (!input)
return;
debugLog(`playerCommand from ${socket.id}: ${input}`);
@@ -271,7 +272,7 @@ io.on('connection', (socket) => {
paragraphs: turn.paragraphs.length,
statusLine: turn.gameState?.statusLine,
});
socket.emit('narrativeResponse', toClientTurn(turn));
socket.emit('narrativeResponse', withClientRequestId(toClientTurn(turn), Number.isInteger(requestId) && requestId > 0 ? requestId : undefined));
}
catch (error) {
console.error('[zcode] playerCommand error:', error);
+1 -1
View File
File diff suppressed because one or more lines are too long