Add Ink session recovery and Coolify Docker support

This commit is contained in:
2026-05-19 13:14:46 +02:00
parent dbcb8f4284
commit ebc8e1c7df
14 changed files with 290 additions and 20 deletions
+2
View File
@@ -16,7 +16,9 @@ export declare class InkEngine {
newGame(): TurnResult;
chooseChoice(choiceIndex: number): TurnResult;
saveGame(): string;
resumeGame(savedState: string): void;
loadGame(savedState: string): TurnResult;
private restoreState;
private loadStory;
private continueStory;
private getChoiceTags;
+7 -1
View File
@@ -90,7 +90,14 @@ class InkEngine {
nextTurnId: this.nextTurnId,
});
}
resumeGame(savedState) {
this.restoreState(savedState);
}
loadGame(savedState) {
this.restoreState(savedState);
return this.continueStory();
}
restoreState(savedState) {
this.story = this.loadStory();
let inkState = savedState;
try {
@@ -106,7 +113,6 @@ class InkEngine {
// Backward compatibility with raw Ink state JSON.
}
this.story.state.LoadJson(inkState);
return this.continueStory();
}
loadStory() {
const resolvedPath = path_1.default.resolve(this.storyPath);
+1 -1
View File
File diff suppressed because one or more lines are too long