Save system: ceremonial PR #42

Merged
pyrex merged 11 commits from savesystem into main 2025-02-25 04:14:02 +00:00
Showing only changes of commit 2837461add - Show all commits

View File

@ -10,6 +10,7 @@ import { openingScene } from "./openingscene.ts";
import { generateName } from "./namegen.ts";
import { photogenicThralls } from "./thralls.ts";
import { choose } from "./utils.ts";
import { SaveFileV1 } from "./saveformat.ts";
const N_TURNS: number = 9;
@ -17,9 +18,9 @@ export class StateManager {
#turn: number;
#revision: number;
constructor() {
this.#turn = 1;
this.#revision = 1;
constructor(file?:SaveFileV1) {
this.#turn = file?.turn ?? 1;
this.#revision = file?.revision ?? 1;
}
getTurn(): number {