From c84bffae592e2b6f3176e31682a01ba433a4d055 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 22 Jul 2022 18:59:52 -0500 Subject: [PATCH] Made default layer option functions not anonymous --- src/data/layers/prestige.tsx | 4 ++-- src/data/projEntry.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/prestige.tsx b/src/data/layers/prestige.tsx index 4902610..8216af1 100644 --- a/src/data/layers/prestige.tsx +++ b/src/data/layers/prestige.tsx @@ -10,13 +10,13 @@ import MainDisplay from "features/resources/MainDisplay.vue"; import { createResource } from "features/resources/resource"; import { addTooltip } from "features/tooltips/tooltip"; import { createResourceTooltip } from "features/trees/tree"; -import { createLayer } from "game/layers"; +import { BaseLayer, createLayer } from "game/layers"; import type { DecimalSource } from "util/bignum"; import { render } from "util/vue"; import { createLayerTreeNode, createResetButton } from "../common"; const id = "p"; -const layer = createLayer(id, () => { +const layer = createLayer(id, function (this: BaseLayer) { const name = "Prestige"; const color = "#4BDC13"; const points = createResource(0, "prestige points"); diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index 34a67a0..8ee2c7b 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -4,7 +4,7 @@ import { createResource, trackBest, trackOOMPS, trackTotal } from "features/reso import type { GenericTree } from "features/trees/tree"; import { branchedResetPropagation, createTree } from "features/trees/tree"; import { globalBus } from "game/events"; -import type { GenericLayer } from "game/layers"; +import type { BaseLayer, GenericLayer } from "game/layers"; import { createLayer } from "game/layers"; import type { PlayerData } from "game/player"; import player from "game/player"; @@ -17,7 +17,7 @@ import prestige from "./layers/prestige"; /** * @hidden */ -export const main = createLayer("main", () => { +export const main = createLayer("main", function (this: BaseLayer) { const points = createResource(10); const best = trackBest(points); const total = trackTotal(points);