mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-02-16 09:31:43 +00:00
Merge branch 'main' of https://github.com/thepaperpilot/Advent-Incremental
This commit is contained in:
commit
6aae9f3a4e
10 changed files with 50 additions and 18 deletions
1
saves/Day 14 Complete.txt
Normal file
1
saves/Day 14 Complete.txt
Normal file
File diff suppressed because one or more lines are too long
1
saves/Day 15 Complete.txt
Normal file
1
saves/Day 15 Complete.txt
Normal file
File diff suppressed because one or more lines are too long
|
@ -195,6 +195,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
(["red", "yellow", "blue", "orange", "green", "purple"] as const).forEach(dyeColor => {
|
||||
dyes.dyes[dyeColor].amount.value = 0;
|
||||
dyes.dyes[dyeColor].buyable.amount.value = 0;
|
||||
main.days[10].recentlyUpdated.value = true;
|
||||
});
|
||||
}
|
||||
})) as GenericUpgrade;
|
||||
|
|
|
@ -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(() => ({
|
||||
|
|
|
@ -6,8 +6,9 @@ import Spacer from "components/layout/Spacer.vue";
|
|||
import Sqrt from "components/math/Sqrt.vue";
|
||||
import Modal from "components/Modal.vue";
|
||||
import { createCollapsibleModifierSections, setUpDailyProgressTracker } from "data/common";
|
||||
import { BuyableOptions, createBuyable, GenericBuyable } from "features/buyable";
|
||||
import { BuyableOptions, createBuyable } from "features/buyable";
|
||||
import { jsx, JSXFunction, showIf, Visibility } from "features/feature";
|
||||
import { createHotkey, GenericHotkey } from "features/hotkey";
|
||||
import MainDisplay from "features/resources/MainDisplay.vue";
|
||||
import { createResource, Resource } from "features/resources/resource";
|
||||
import { createUpgrade, GenericUpgrade } from "features/upgrades/upgrade";
|
||||
|
@ -24,16 +25,15 @@ import { WithRequired } from "util/common";
|
|||
import { Computable, convertComputable } from "util/computed";
|
||||
import { render, renderCol, renderRow } from "util/vue";
|
||||
import { computed, ComputedRef, ref, Ref, unref } from "vue";
|
||||
import { main } from "../projEntry";
|
||||
import boxes from "./boxes";
|
||||
import cloth from "./cloth";
|
||||
import coal from "./coal";
|
||||
import { ElfBuyable } from "./elves";
|
||||
import management from "./management";
|
||||
import oil from "./oil";
|
||||
import trees from "./trees";
|
||||
import wrappingPaper from "./wrapping-paper";
|
||||
import paper from "./paper";
|
||||
import boxes from "./boxes";
|
||||
import { ElfBuyable } from "./elves";
|
||||
import { main } from "../projEntry";
|
||||
import trees from "./trees";
|
||||
|
||||
interface Dye {
|
||||
name: string;
|
||||
|
@ -43,6 +43,7 @@ interface Dye {
|
|||
toGenerate: WithRequired<Modifier, "description" | "revert">;
|
||||
computedToGenerate: ComputedRef<DecimalSource>;
|
||||
display: JSXFunction;
|
||||
hotkey: GenericHotkey;
|
||||
}
|
||||
|
||||
type DyeUpg =
|
||||
|
@ -66,6 +67,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
options: {
|
||||
name: string;
|
||||
color: string;
|
||||
key: string;
|
||||
costs: Computable<
|
||||
{
|
||||
base: Ref<DecimalSource> | DecimalSource;
|
||||
|
@ -349,10 +351,20 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
};
|
||||
});
|
||||
|
||||
const hotkey = createHotkey(() => ({
|
||||
key: options.key,
|
||||
description: `${options.name} Chambers`,
|
||||
onPress: () => {
|
||||
if (unref(buyable.canClick)) buyable.onClick();
|
||||
},
|
||||
enabled: main.days[day - 1].opened
|
||||
}));
|
||||
|
||||
return {
|
||||
name: options.name,
|
||||
amount,
|
||||
buyable,
|
||||
hotkey,
|
||||
toGenerate,
|
||||
computedToGenerate,
|
||||
display: jsx(() => (
|
||||
|
@ -370,6 +382,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
red: createDye({
|
||||
name: "Red Dye",
|
||||
color: "red",
|
||||
key: "r",
|
||||
costs: () => [
|
||||
{
|
||||
base: "2e18",
|
||||
|
@ -398,6 +411,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
yellow: createDye({
|
||||
name: "Yellow Dye",
|
||||
color: "yellow",
|
||||
key: "y",
|
||||
costs: () => [
|
||||
{
|
||||
base: "1e18",
|
||||
|
@ -421,6 +435,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
blue: createDye({
|
||||
name: "Blue Dye",
|
||||
color: "blue",
|
||||
key: "u",
|
||||
costs: () => [
|
||||
{
|
||||
base: "5e17",
|
||||
|
@ -449,6 +464,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
orange: createDye({
|
||||
name: "Orange Dye",
|
||||
color: "orange",
|
||||
key: "o",
|
||||
costs: () => [
|
||||
{
|
||||
base: 15,
|
||||
|
@ -491,6 +507,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
green: createDye({
|
||||
name: "Green Dye",
|
||||
color: "green",
|
||||
key: "g",
|
||||
costs: () => [
|
||||
{
|
||||
base: 15,
|
||||
|
@ -538,6 +555,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
purple: createDye({
|
||||
name: "Purple Dye",
|
||||
color: "purple",
|
||||
key: "e",
|
||||
costs: () => [
|
||||
{
|
||||
base: 15,
|
||||
|
|
|
@ -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(() => ({
|
||||
|
|
|
@ -848,6 +848,7 @@ const layer = createLayer(id, () => {
|
|||
dyeColor => {
|
||||
dyes.dyes[dyeColor].amount.value = 0;
|
||||
dyes.dyes[dyeColor].buyable.amount.value = 0;
|
||||
main.days[10].recentlyUpdated.value = true;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -864,6 +865,7 @@ const layer = createLayer(id, () => {
|
|||
(["red", "yellow", "blue"] as const).forEach(dyeColor => {
|
||||
dyes.dyes[dyeColor].amount.value = 0;
|
||||
dyes.dyes[dyeColor].buyable.amount.value = 0;
|
||||
main.days[10].recentlyUpdated.value = true;
|
||||
});
|
||||
}
|
||||
})),
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -102,11 +102,13 @@ registerInfoComponent(
|
|||
<div>
|
||||
<br />
|
||||
<h4>Hotkeys</h4>
|
||||
{keys.map(hotkey => (
|
||||
<div v-if={hotkey !== undefined}>
|
||||
<HotkeyVue hotkey={hotkey as GenericHotkey} /> {hotkey?.description}
|
||||
</div>
|
||||
))}
|
||||
<div style="column-count: 2">
|
||||
{keys.map(hotkey => (
|
||||
<div>
|
||||
<HotkeyVue hotkey={hotkey as GenericHotkey} /> {hotkey?.description}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue