Merge pull request #1 from unsoftcapped3/main

uh things maybe idk
This commit is contained in:
unsoftcapped3 2022-12-12 18:34:35 -08:00 committed by GitHub
commit c9765dc964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 25 deletions

View file

@ -1030,7 +1030,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),
@ -1094,13 +1094,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)
};
});
@ -1121,38 +1117,25 @@ const layer = createLayer(id, () => {
multiplying elves' XP gain by {format(classroomEffect.value)}
</div>
<div>
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
</div>
</>
)),
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)),

View file

@ -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<typeof main> | undefined)?.days?.[11]) {
(player.layers!.main as LayerData<typeof main>).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 */