mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 17:31:54 +00:00
Fix hotkeys breaking shit
This commit is contained in:
parent
791c0c4111
commit
ec8a873973
6 changed files with 11 additions and 11 deletions
|
@ -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(() => ({
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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(() => ({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -61,7 +61,7 @@ export interface Day extends VueFeature {
|
|||
story: string;
|
||||
completedStory: string;
|
||||
masteredStory: string;
|
||||
opened: Ref<boolean>;
|
||||
opened: Persistent<boolean>;
|
||||
recentlyUpdated: Ref<boolean>; // Has the tab recieved an update since the player last opened it?
|
||||
shouldNotify: ProcessedComputable<boolean>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue