Made default layer option functions not anonymous
This commit is contained in:
parent
fe865bff9d
commit
c84bffae59
2 changed files with 4 additions and 4 deletions
|
@ -10,13 +10,13 @@ import MainDisplay from "features/resources/MainDisplay.vue";
|
||||||
import { createResource } from "features/resources/resource";
|
import { createResource } from "features/resources/resource";
|
||||||
import { addTooltip } from "features/tooltips/tooltip";
|
import { addTooltip } from "features/tooltips/tooltip";
|
||||||
import { createResourceTooltip } from "features/trees/tree";
|
import { createResourceTooltip } from "features/trees/tree";
|
||||||
import { createLayer } from "game/layers";
|
import { BaseLayer, createLayer } from "game/layers";
|
||||||
import type { DecimalSource } from "util/bignum";
|
import type { DecimalSource } from "util/bignum";
|
||||||
import { render } from "util/vue";
|
import { render } from "util/vue";
|
||||||
import { createLayerTreeNode, createResetButton } from "../common";
|
import { createLayerTreeNode, createResetButton } from "../common";
|
||||||
|
|
||||||
const id = "p";
|
const id = "p";
|
||||||
const layer = createLayer(id, () => {
|
const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
const name = "Prestige";
|
const name = "Prestige";
|
||||||
const color = "#4BDC13";
|
const color = "#4BDC13";
|
||||||
const points = createResource<DecimalSource>(0, "prestige points");
|
const points = createResource<DecimalSource>(0, "prestige points");
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { createResource, trackBest, trackOOMPS, trackTotal } from "features/reso
|
||||||
import type { GenericTree } from "features/trees/tree";
|
import type { GenericTree } from "features/trees/tree";
|
||||||
import { branchedResetPropagation, createTree } from "features/trees/tree";
|
import { branchedResetPropagation, createTree } from "features/trees/tree";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import type { GenericLayer } from "game/layers";
|
import type { BaseLayer, GenericLayer } from "game/layers";
|
||||||
import { createLayer } from "game/layers";
|
import { createLayer } from "game/layers";
|
||||||
import type { PlayerData } from "game/player";
|
import type { PlayerData } from "game/player";
|
||||||
import player from "game/player";
|
import player from "game/player";
|
||||||
|
@ -17,7 +17,7 @@ import prestige from "./layers/prestige";
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export const main = createLayer("main", () => {
|
export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
const points = createResource<DecimalSource>(10);
|
const points = createResource<DecimalSource>(10);
|
||||||
const best = trackBest(points);
|
const best = trackBest(points);
|
||||||
const total = trackTotal(points);
|
const total = trackTotal(points);
|
||||||
|
|
Loading…
Reference in a new issue