From 91e3c2703de013eb96e8acc124cbb3b4c4655b20 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 02:58:14 +0000 Subject: [PATCH] hide upgrade grid until day 19 --- src/data/layers/factory.tsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index a990cf6..60c9e53 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1044,7 +1044,8 @@ const factory = createLayer(id, () => { display: { title: "Sawmill Efficiency", description: "Metal increases sawmill consumption and production by *log(metal)/10" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: paper.paper, @@ -1052,7 +1053,8 @@ const factory = createLayer(id, () => { display: { title: "News Ticker", description: "Paper boosts tick speed" // formula: *1+log(x)/100 - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: toys.trucks, @@ -1060,7 +1062,8 @@ const factory = createLayer(id, () => { display: { title: "Haul wood in trucks", description: "Trucks multiply wood gain" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: metal.metal, @@ -1068,7 +1071,8 @@ const factory = createLayer(id, () => { display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) }))], [createUpgrade(() => ({ resource: toys.woodenBlocks, @@ -1076,7 +1080,8 @@ const factory = createLayer(id, () => { display: { title: "Larger wood pieces", description: "Wooden block producers produce 3x as much" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: dyes.dyes.red.amount, @@ -1084,7 +1089,8 @@ const factory = createLayer(id, () => { display: { title: "Colorful clothes", description: "Dye producers produce 4x as much" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: plastic.plastic, @@ -1092,7 +1098,8 @@ const factory = createLayer(id, () => { display: { title: "Improved plastic producers", description: "Plastic producers produce 4x as much" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) }))], ]