Checkpoint Eibenreith ink architecture
This commit is contained in:
Vendored
+1
-1
@@ -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)
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-2
@@ -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);
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-1
@@ -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);
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user