mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 16:13:57 +00:00
Cleaned up
This commit is contained in:
parent
0c0de62a83
commit
850ccdbd5f
5 changed files with 14 additions and 12 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue