Cleanup
This commit is contained in:
parent
3a69603031
commit
5718abc013
7 changed files with 10 additions and 15 deletions
|
@ -9,14 +9,14 @@ import { createReset } from "features/reset";
|
|||
import MainDisplay from "features/resources/MainDisplay.vue";
|
||||
import { createResource } from "features/resources/resource";
|
||||
import { createResourceTooltip } from "features/trees/tree";
|
||||
import { BaseLayer, createLayer } from "game/layers";
|
||||
import { createLayer } from "game/layers";
|
||||
import type { DecimalSource } from "util/bignum";
|
||||
import { render } from "util/vue";
|
||||
import { addTooltip } from "wrappers/tooltips/tooltip";
|
||||
import { createLayerTreeNode, createResetButton } from "../common";
|
||||
|
||||
const id = "p";
|
||||
const layer = createLayer(id, function (this: BaseLayer) {
|
||||
const layer = createLayer(id, () => {
|
||||
const name = "Prestige";
|
||||
const color = "#4BDC13";
|
||||
const points = createResource<DecimalSource>(0, "prestige points");
|
||||
|
|
|
@ -3,7 +3,7 @@ import Spacer from "components/layout/Spacer.vue";
|
|||
import { createResource, trackBest, trackOOMPS, trackTotal } from "features/resources/resource";
|
||||
import { branchedResetPropagation, createTree, Tree } from "features/trees/tree";
|
||||
import { globalBus } from "game/events";
|
||||
import type { BaseLayer, Layer } from "game/layers";
|
||||
import type { Layer } from "game/layers";
|
||||
import { createLayer } from "game/layers";
|
||||
import player, { Player } from "game/player";
|
||||
import type { DecimalSource } from "util/bignum";
|
||||
|
@ -15,7 +15,7 @@ import prestige from "./layers/prestige";
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export const main = createLayer("main", function (this: BaseLayer) {
|
||||
export const main = createLayer("main", layer => {
|
||||
const points = createResource<DecimalSource>(10);
|
||||
const best = trackBest(points);
|
||||
const total = trackTotal(points);
|
||||
|
@ -25,7 +25,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
let gain = new Decimal(1);
|
||||
return gain;
|
||||
});
|
||||
globalBus.on("update", diff => {
|
||||
layer.on("update", diff => {
|
||||
points.value = Decimal.add(points.value, Decimal.times(pointGain.value, diff));
|
||||
});
|
||||
const oomps = trackOOMPS(points, pointGain);
|
||||
|
|
|
@ -50,8 +50,7 @@ export interface AchievementOptions extends VueFeatureOptions {
|
|||
requirements?: Requirements;
|
||||
/** The display to use for this achievement. */
|
||||
display?:
|
||||
| Renderable
|
||||
| (() => Renderable)
|
||||
| MaybeGetter<Renderable>
|
||||
| {
|
||||
/** Description of the requirement(s) for this achievement. If unspecified then the requirements will be displayed automatically based on {@link requirements}. */
|
||||
requirement?: MaybeGetter<Renderable>;
|
||||
|
|
|
@ -39,8 +39,7 @@ export interface ChallengeOptions extends VueFeatureOptions {
|
|||
completionLimit?: MaybeRefOrGetter<DecimalSource>;
|
||||
/** The display to use for this challenge. */
|
||||
display?:
|
||||
| Renderable
|
||||
| (() => Renderable)
|
||||
| MaybeGetter<Renderable>
|
||||
| {
|
||||
/** A header to appear at the top of the display. */
|
||||
title?: MaybeGetter<Renderable>;
|
||||
|
|
|
@ -24,8 +24,7 @@ export interface ClickableOptions extends VueFeatureOptions {
|
|||
canClick?: MaybeRefOrGetter<boolean>;
|
||||
/** The display to use for this clickable. */
|
||||
display?:
|
||||
| Renderable
|
||||
| (() => Renderable)
|
||||
| MaybeGetter<Renderable>
|
||||
| {
|
||||
/** A header to appear at the top of the display. */
|
||||
title?: MaybeGetter<Renderable>;
|
||||
|
|
|
@ -31,8 +31,7 @@ export interface RepeatableOptions extends ClickableOptions {
|
|||
initialAmount?: DecimalSource;
|
||||
/** The display to use for this repeatable. */
|
||||
display?:
|
||||
| Renderable
|
||||
| (() => Renderable)
|
||||
| MaybeGetter<Renderable>
|
||||
| {
|
||||
/** A header to appear at the top of the display. */
|
||||
title?: MaybeGetter<Renderable>;
|
||||
|
|
|
@ -34,8 +34,7 @@ export const UpgradeType = Symbol("Upgrade");
|
|||
export interface UpgradeOptions extends VueFeatureOptions, ClickableOptions {
|
||||
/** The display to use for this upgrade. */
|
||||
display?:
|
||||
| Renderable
|
||||
| (() => Renderable)
|
||||
| MaybeGetter<Renderable>
|
||||
| {
|
||||
/** A header to appear at the top of the display. */
|
||||
title?: MaybeGetter<Renderable>;
|
||||
|
|
Loading…
Reference in a new issue