mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-22 00:21:34 +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(() => {
|
setInterval(() => {
|
||||||
if (
|
if (
|
||||||
player.autosave &&
|
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();
|
save();
|
||||||
}
|
}
|
||||||
|
@ -142,7 +143,8 @@ setInterval(() => {
|
||||||
window.onbeforeunload = () => {
|
window.onbeforeunload = () => {
|
||||||
if (
|
if (
|
||||||
player.autosave &&
|
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)
|
import.meta.env.DEV)
|
||||||
) {
|
) {
|
||||||
save();
|
save();
|
||||||
|
|
Loading…
Reference in a new issue