From 331d0e75529add9f03a89b363fd143116b9ffdcd Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Thu, 22 Dec 2022 18:19:04 +0000 Subject: [PATCH] add milestone --- src/data/layers/factory.tsx | 2 +- src/data/layers/toys.tsx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index eeb95c7..157d4e9 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -377,7 +377,7 @@ const factory = createLayer(id, () => { }, outputs: { wheel: { - amount: 1 + amount: toys.milestones.milestone5.earned ? 2 : 1 } } }, diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 5884551..e4848d2 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -260,7 +260,15 @@ const layer = createLayer(id, function (this: BaseLayer) { shouldEarn: () => Decimal.gte(toySum.value, 350), visibility: () => showIf(milestone3.earned.value) })); - const milestones = { milestone1, milestone2, milestone3, milestone4 }; + const milestone5 = createMilestone(() => ({ + display: { + requirement: "1000 toys", + effectDisplay: "The wheel crafter now makes 2 wheels instead of 1! Now you should be able to fit everything in the factory." + }, + shouldEarn: () => Decimal.gte(toySum.value, 1000), + visibility: () => showIf(milestone4.earned.value) + })); + const milestones = { milestone1, milestone2, milestone3, milestone4, milestone5 }; const { collapseMilestones, display: milestonesDisplay } = createCollapsibleMilestones(milestones);