mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 09:21:48 +00:00
Made hotkeys only appear when day is unlocked
This commit is contained in:
parent
ba34b7b581
commit
17fe735d82
4 changed files with 14 additions and 7 deletions
|
@ -181,7 +181,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Breed sheep",
|
||||
onPress: () => {
|
||||
if (breeding.canClick.value) breeding.onClick();
|
||||
}
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
|
||||
const shearSheepHK = createHotkey(() => ({
|
||||
|
@ -189,7 +190,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Shear sheep",
|
||||
onPress: () => {
|
||||
if (shearing.canClick.value) shearing.onClick();
|
||||
}
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
|
||||
const spinWoolHK = createHotkey(() => ({
|
||||
|
@ -197,7 +199,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Spin wool",
|
||||
onPress: () => {
|
||||
if (spinning.canClick.value) spinning.onClick();
|
||||
}
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
|
||||
const buildPens = createBuyable(() => ({
|
||||
|
|
|
@ -88,7 +88,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Process letters",
|
||||
onPress: () => {
|
||||
if (process.canClick.value) process.onClick();
|
||||
}
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
|
||||
const metalBuyable = createBuyable(() => ({
|
||||
|
|
|
@ -804,14 +804,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Cut trees",
|
||||
onPress: () => {
|
||||
if (cutTree.canClick.value) cutTree.onClick();
|
||||
}
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
const plantTreeHK = createHotkey(() => ({
|
||||
key: "p",
|
||||
description: "Plant trees",
|
||||
onPress: () => {
|
||||
if (plantTree.canClick.value) plantTree.onClick();
|
||||
}
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
|
||||
const { total: totalLogs, trackerDisplay } = setUpDailyProgressTracker({
|
||||
|
|
|
@ -136,7 +136,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
description: "Build foundation",
|
||||
onPress: () => {
|
||||
if (buildFoundation.canClick.value) buildFoundation.onClick();
|
||||
}
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
|
||||
const shouldShowPopups = computed(() => !elves.milestones[6].earned.value);
|
||||
|
|
Loading…
Reference in a new issue