From 3572898b75b9f4a760042e7341d6a428c295d4a8 Mon Sep 17 00:00:00 2001
From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com>
Date: Tue, 13 Dec 2022 02:31:50 +0000
Subject: [PATCH] uh things maybe idk
---
src/data/layers/management.tsx | 29 ++++++-----------------------
src/data/layers/trees.tsx | 8 ++++----
src/data/projEntry.tsx | 4 ++--
3 files changed, 12 insertions(+), 29 deletions(-)
diff --git a/src/data/layers/management.tsx b/src/data/layers/management.tsx
index a114018..b1a95e3 100644
--- a/src/data/layers/management.tsx
+++ b/src/data/layers/management.tsx
@@ -999,7 +999,7 @@ const layer = createLayer(id, () => {
return {
wood: schoolFactor.mul(1e21),
coal: schoolFactor.mul(1e32),
- paper: schoolFactor.mul(1e19),
+ paper: schoolFactor.mul(1e18),
boxes: schoolFactor.mul(1e13),
metalIngots: schoolFactor.mul(1e12),
cloth: schoolFactor.mul(1e4),
@@ -1063,13 +1063,9 @@ const layer = createLayer(id, () => {
const classroomFactor = Decimal.add(schools.amount.value, 1).pow(1.5);
return {
wood: classroomFactor.mul(1e21),
- coal: classroomFactor.mul(1e32),
- paper: classroomFactor.mul(1e19),
+ paper: classroomFactor.mul(1e18),
boxes: classroomFactor.mul(1e13),
- metalIngots: classroomFactor.mul(1e12),
- cloth: classroomFactor.mul(1e4),
- plastic: classroomFactor.mul(1e6),
- dye: classroomFactor.mul(10000)
+ metalIngots: classroomFactor.mul(1e12)
};
});
@@ -1090,38 +1086,25 @@ const layer = createLayer(id, () => {
multiplying elves' XP gain by {format(classroomEffect.value)}
- Costs {format(classroomCost.value.wood)} logs,{" "}
- {format(classroomCost.value.coal)} coal, {format(classroomCost.value.paper)}{" "}
+ Costs {format(classroomCost.value.wood)} logs,{format(classroomCost.value.paper)}{" "}
paper, {format(classroomCost.value.boxes)} boxes,{" "}
- {format(classroomCost.value.metalIngots)} metal ingots,{" "}
- {format(classroomCost.value.cloth)} cloth, {format(classroomCost.value.plastic)}{" "}
- plastic, and requires {format(classroomCost.value.dye)} of red, yellow, and blue
- dye
+ {format(classroomCost.value.metalIngots)} metal ingots
>
)),
canPurchase(): boolean {
return (
classroomCost.value.wood.lte(trees.logs.value) &&
- classroomCost.value.coal.lte(coal.coal.value) &&
classroomCost.value.paper.lte(paper.paper.value) &&
classroomCost.value.boxes.lte(boxes.boxes.value) &&
- classroomCost.value.metalIngots.lte(metal.metal.value) &&
- classroomCost.value.cloth.lte(cloth.cloth.value) &&
- classroomCost.value.plastic.lte(plastic.plastic.value) &&
- classroomCost.value.dye.lte(dyes.dyes.blue.amount.value) &&
- classroomCost.value.dye.lte(dyes.dyes.red.amount.value) &&
- classroomCost.value.dye.lte(dyes.dyes.yellow.amount.value)
+ classroomCost.value.metalIngots.lte(metal.metal.value)
);
},
onPurchase() {
trees.logs.value = Decimal.sub(trees.logs.value, classroomCost.value.wood);
- coal.coal.value = Decimal.sub(coal.coal.value, classroomCost.value.coal);
paper.paper.value = Decimal.sub(paper.paper.value, classroomCost.value.paper);
boxes.boxes.value = Decimal.sub(boxes.boxes.value, classroomCost.value.boxes);
metal.metal.value = Decimal.sub(metal.metal.value, classroomCost.value.metalIngots);
- cloth.cloth.value = Decimal.sub(cloth.cloth.value, classroomCost.value.cloth);
- plastic.plastic.value = Decimal.sub(plastic.plastic.value, classroomCost.value.plastic);
this.amount.value = Decimal.add(this.amount.value, 1);
},
visibility: computed(() => showIf(classroomUpgrade.bought.value)),
diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx
index 0d17f64..f14f3c2 100644
--- a/src/data/layers/trees.tsx
+++ b/src/data/layers/trees.tsx
@@ -329,9 +329,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
]) as WithRequired;
const computedAutoCuttingAmount = computed(() => autoCuttingAmount.apply(0));
const lastAutoCuttingAmount = ref(0);
- watch(computedAutoCuttingAmount, cut => {
+ setInterval(() => watch(computedAutoCuttingAmount, cut => {
lastAutoCuttingAmount.value = cut;
- });
+ }), 0);
const manualPlantingAmount = createSequentialModifier(() => [
createAdditiveModifier(() => ({
@@ -420,9 +420,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
]) as WithRequired;
const computedAutoPlantingAmount = computed(() => autoPlantingAmount.apply(0));
const lastAutoPlantedAmount = ref(0);
- watch(computedAutoPlantingAmount, planted => {
+ setInterval(() => watch(computedAutoPlantingAmount, planted => {
lastAutoPlantedAmount.value = planted;
- });
+ }),0);
const logGain = createSequentialModifier(() => [
createMultiplicativeModifier(() => ({
diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx
index 54ba66a..3d77eae 100644
--- a/src/data/projEntry.tsx
+++ b/src/data/projEntry.tsx
@@ -457,7 +457,7 @@ export function fixOldSave(
if (!["0.0", "0.1", "0.2", "0.3", "0.4"].includes(oldVersion ?? "")) {
return;
}
- player.offlineProd = false;
+ /*player.offlineProd = false;
delete player.layers?.management;
if ((player.layers?.main as LayerData | undefined)?.days?.[11]) {
(player.layers!.main as LayerData).days![11].opened = false;
@@ -468,6 +468,6 @@ export function fixOldSave(
}
if (player.tabs) {
player.tabs = player.tabs.filter(l => l !== "management");
- }
+ }*/
}
/* eslint-enable @typescript-eslint/no-unused-vars */