From 2d1fb360dc9b300490ac5220a56e97dffff4d66e Mon Sep 17 00:00:00 2001
From: ducdat0507 <62660527+ducdat0507@users.noreply.github.com>
Date: Thu, 8 Dec 2022 22:35:53 +0700
Subject: [PATCH] Add oil gain requirement text
---
src/data/layers/oil.tsx | 8 +++++++-
src/features/resources/MainDisplay.vue | 6 ++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx
index c0653a7..015faac 100644
--- a/src/data/layers/oil.tsx
+++ b/src/data/layers/oil.tsx
@@ -993,10 +993,16 @@ const layer = createLayer(id, function (this: BaseLayer) {
sticky={true}
productionDisplay={jsx(() => (
<>
- {Decimal.lt(depth.value, 1000) ? "Reach 1000m to start gaining oil" : formatGain(Decimal.add(computedOilSpeed.value, computedOilConsumption.value))}
+ {Decimal.lt(depth.value, 1000) ? "Reach 1000m to start gaining oil" :
+ <>{formatGain(Decimal.add(computedOilSpeed.value, computedOilConsumption.value))}
+ >
+ }
>
))}
/>
+ {Decimal.eq(computedOilSpeed.value, 0) ? <>
+ (Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)
+
> : ""}
{
depthMilestones[6].earned.value ?
diff --git a/src/features/resources/MainDisplay.vue b/src/features/resources/MainDisplay.vue
index 48bc252..54dfe6d 100644
--- a/src/features/resources/MainDisplay.vue
+++ b/src/features/resources/MainDisplay.vue
@@ -15,7 +15,7 @@
/>
-
@@ -35,7 +35,7 @@
/>
-
@@ -68,6 +68,8 @@ const effectComponent = computeOptionalComponent(
props.effectDisplay as Ref
);
+const productionRef = ref(null);
+
const productionComponent = computeOptionalComponent(
props.productionDisplay as Ref
);