Cleaned up

This commit is contained in:
thepaperpilot 2022-12-20 21:27:22 -06:00
parent 0c0de62a83
commit 850ccdbd5f
5 changed files with 14 additions and 12 deletions

View file

@ -48,16 +48,15 @@
<script setup lang="ts">
import Notif from "components/Notif.vue";
import Tooltip from "features/tooltips/Tooltip.vue";
import Decimal from "util/bignum";
import { layers } from "game/layers";
import { Direction } from "util/common";
import Decimal from "util/bignum";
import { formatTime } from "util/break_eternity";
import { Direction } from "util/common";
import { ProcessedComputable } from "util/computed";
import { Ref, Transition } from "vue";
import { computed, unref } from "vue";
import { main } from "./projEntry";
import { computed, Ref, Transition, unref } from "vue";
import coal from "./layers/coal";
import dyes from "./layers/dyes";
import { main } from "./projEntry";
const props = defineProps<{
day: number;
@ -77,7 +76,7 @@ const emit = defineEmits<{
const canOpen = computed(
() =>
props.layer &&
props.layer != null &&
Decimal.gte(main.day.value, props.day) &&
new Date().getMonth() === 11 &&
new Date().getDate() >= props.day
@ -88,14 +87,14 @@ const includeMastery = computed(
() =>
props.mastered.value ||
main.currentlyMastering.value == layers[props.layer ?? ""] ||
["wrappingPaper", "ribbon"].includes(props.layer || "") ||
["wrappingPaper", "ribbon"].includes(props.layer ?? "") ||
(coal.mastered.value && props.layer == "elves") ||
(dyes.mastered.value && props.layer == "elves")
);
const masteryLock = computed(() => isMastering.value && !includeMastery.value);
function tryUnlock() {
if (canOpen.value) {
if (canOpen.value === true) {
emit("unlockLayer");
}
}

View file

@ -404,7 +404,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
createAdditiveModifier(() => ({
addend: 1,
description: "Automated Spade",
enabled: autoPlantUpgrade1.bought.value
enabled: autoPlantUpgrade1.bought
})),
createAdditiveModifier(() => ({
addend: () => Decimal.div(autoPlantingBuyable1.amount.value, 2),

View file

@ -49,7 +49,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
scaling: addHardcap(
addSoftcap(addSoftcap(createPolynomialScaling(250, 1.5), 5423, 1 / 1e10), 1e20, 3e8),
computed(() =>
toys.row1Upgrades[2].bought
toys.row1Upgrades[2].bought.value
? 1200
: management.elfTraining.expandersElfTraining.milestones[2].earned.value
? 1000

View file

@ -278,7 +278,10 @@ const layer = createLayer(id, () => {
beach1: computed(() =>
main.isMastery.value
? 1
: Decimal.add(wrappingPaper.beach.buyable.amount.value, 1).log10().add(1).pow(toys.milestones.milestone3.earned.value ? 1.6 : 1)
: Decimal.add(wrappingPaper.beach.buyable.amount.value, 1)
.log10()
.add(1)
.pow(toys.milestones.milestone3.earned.value ? 1.6 : 1)
)
};
const wrappingPaperSum = createResource(

View file

@ -224,7 +224,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
openDay(layer ?? "trees");
},
onUnlockLayer() {
if (layer) {
if (layer != null) {
opened.value = true;
setTimeout(() => {
loreScene.value = -1;