Add Ink session recovery and Coolify Docker support
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user