Save on end-of-day, or after endgame.
Putting it here avoids a circular reference problem
This commit is contained in:
parent
93ef512554
commit
6fe843bf55
@ -6,6 +6,7 @@ import { addButton } from "./button.ts";
|
||||
import { getPlayerProgress } from "./playerprogress.ts";
|
||||
import { getStateManager } from "./statemanager.ts";
|
||||
import { getCheckModal } from "./checkmodal.ts";
|
||||
import { saveGame } from "./save.ts";
|
||||
|
||||
type Button = {
|
||||
label: string;
|
||||
@ -112,6 +113,7 @@ export class Hotbar {
|
||||
},
|
||||
() => {
|
||||
getStateManager().advance();
|
||||
saveGame();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ function readBestSave(): SaveFileV1LoadResult {
|
||||
};
|
||||
}
|
||||
|
||||
export function save() {
|
||||
export function saveGame() {
|
||||
const targetSlot: SaveSlot =
|
||||
readBestSave().slot === "FLEDGLING_SLOT_1"
|
||||
? "FLEDGLING_SLOT_2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user