From ec8a8739737b334bb7bfacc26219bcaf19d0b22c Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 21 Dec 2022 22:53:16 -0600 Subject: [PATCH] Fix hotkeys breaking shit --- src/data/layers/cloth.tsx | 6 +++--- src/data/layers/dyes.tsx | 4 ++-- src/data/layers/letters.tsx | 4 ++-- src/data/layers/trees.tsx | 4 ++-- src/data/layers/workshop.tsx | 2 +- src/data/projEntry.tsx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/data/layers/cloth.tsx b/src/data/layers/cloth.tsx index 9f572a7..8f4f227 100644 --- a/src/data/layers/cloth.tsx +++ b/src/data/layers/cloth.tsx @@ -213,7 +213,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (breeding.canClick.value) breeding.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const shearSheepHK = createHotkey(() => ({ @@ -222,7 +222,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (shearing.canClick.value) shearing.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const spinWoolHK = createHotkey(() => ({ @@ -231,7 +231,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (spinning.canClick.value) spinning.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const buildPens = createBuyable(() => ({ diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index 2582071..6d94dff 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -20,7 +20,7 @@ import { createSequentialModifier, Modifier } from "game/modifiers"; -import { persistent } from "game/persistence"; +import { noPersist, persistent } from "game/persistence"; import Decimal, { DecimalSource, format, formatWhole } from "util/bignum"; import { WithRequired } from "util/common"; import { Computable, convertComputable } from "util/computed"; @@ -371,7 +371,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (unref(buyable.canClick)) buyable.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const visibility = convertComputable(options.visibility ?? Visibility.Visible); diff --git a/src/data/layers/letters.tsx b/src/data/layers/letters.tsx index 49485fd..62b8e13 100644 --- a/src/data/layers/letters.tsx +++ b/src/data/layers/letters.tsx @@ -15,7 +15,7 @@ import { createMilestone } from "features/milestones/milestone"; import { createResource } from "features/resources/resource"; import { BaseLayer, createLayer } from "game/layers"; import { createMultiplicativeModifier, createSequentialModifier } from "game/modifiers"; -import { persistent } from "game/persistence"; +import { noPersist, persistent } from "game/persistence"; import Decimal, { DecimalSource, format, formatWhole } from "util/bignum"; import { Direction } from "util/common"; import { render, renderRow } from "util/vue"; @@ -93,7 +93,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (process.canClick.value) process.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const metalBuyable = createBuyable(() => ({ diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index 84f32f6..c96fb80 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -814,7 +814,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (cutTree.canClick.value) cutTree.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const plantTreeHK = createHotkey(() => ({ key: "p", @@ -822,7 +822,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (plantTree.canClick.value) plantTree.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const { total: totalLogs, trackerDisplay } = setUpDailyProgressTracker({ diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index 5c49a8a..c74b97d 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -149,7 +149,7 @@ const layer = createLayer(id, function (this: BaseLayer) { onPress: () => { if (buildFoundation.canClick.value) buildFoundation.onClick(); }, - enabled: main.days[day - 1].opened + enabled: noPersist(main.days[day - 1].opened) })); const shouldShowPopups = computed(() => !elves.milestones[6].earned.value); diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index e9690be..5e088d6 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -61,7 +61,7 @@ export interface Day extends VueFeature { story: string; completedStory: string; masteredStory: string; - opened: Ref; + opened: Persistent; recentlyUpdated: Ref; // Has the tab recieved an update since the player last opened it? shouldNotify: ProcessedComputable; }