mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 17:31:54 +00:00
Add check for 24th day completion
This commit is contained in:
parent
03f6325704
commit
0c5f45548d
1 changed files with 4 additions and 2 deletions
|
@ -134,7 +134,8 @@ export async function loadSave(playerObj: Partial<PlayerData>): Promise<void> {
|
|||
setInterval(() => {
|
||||
if (
|
||||
player.autosave &&
|
||||
(layers as any).main.days[(layers as any).main.day.value - 1].opened.value
|
||||
((layers as any).main.day.value >= 25 ||
|
||||
(layers as any).main.days[(layers as any).main.day.value - 1].opened.value)
|
||||
) {
|
||||
save();
|
||||
}
|
||||
|
@ -142,7 +143,8 @@ setInterval(() => {
|
|||
window.onbeforeunload = () => {
|
||||
if (
|
||||
player.autosave &&
|
||||
((layers as any).main.days[(layers as any).main.day.value - 1].opened.value ||
|
||||
((layers as any).main.day.value >= 25 ||
|
||||
(layers as any).main.days[(layers as any).main.day.value - 1].opened.value ||
|
||||
import.meta.env.DEV)
|
||||
) {
|
||||
save();
|
||||
|
|
Loading…
Reference in a new issue