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
+9 -1
View File
@@ -117,7 +117,16 @@ export class InkEngine {
});
}
resumeGame(savedState: string): void {
this.restoreState(savedState);
}
loadGame(savedState: string): TurnResult {
this.restoreState(savedState);
return this.continueStory();
}
private restoreState(savedState: string): void {
this.story = this.loadStory();
let inkState = savedState;
try {
@@ -132,7 +141,6 @@ export class InkEngine {
// Backward compatibility with raw Ink state JSON.
}
this.story.state.LoadJson(inkState);
return this.continueStory();
}
private loadStory(): Story {