mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-28 19:11:39 +00:00
Fix softlock
This commit is contained in:
parent
6cb3492782
commit
9e16c98949
3 changed files with 24 additions and 9 deletions
|
@ -46,8 +46,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
}
|
||||
}));
|
||||
const manualPlantUpgrade1 = createUpgrade(() => ({
|
||||
resource: saplings,
|
||||
cost: 5,
|
||||
resource: logs,
|
||||
cost: 10,
|
||||
display: {
|
||||
title: "Leafy Fingers",
|
||||
description: "Plant an additional tree per click"
|
||||
|
@ -62,8 +62,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
}
|
||||
}));
|
||||
const autoPlantUpgrade1 = createUpgrade(() => ({
|
||||
resource: saplings,
|
||||
cost: 10,
|
||||
resource: logs,
|
||||
cost: 25,
|
||||
display: {
|
||||
title: "Automated Spade",
|
||||
description: "Plant a tree every second"
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
import "@fontsource/material-icons";
|
||||
import Spacer from "components/layout/Spacer.vue";
|
||||
import { CoercableComponent, Component, GatherProps, GenericComponent, jsx } from "features/feature";
|
||||
import {
|
||||
CoercableComponent,
|
||||
Component,
|
||||
GatherProps,
|
||||
GenericComponent,
|
||||
jsx
|
||||
} from "features/feature";
|
||||
import { BaseLayer, createLayer, GenericLayer, layers } from "game/layers";
|
||||
import { persistent } from "game/persistence";
|
||||
import type { PlayerData } from "game/player";
|
||||
import type { LayerData, PlayerData } from "game/player";
|
||||
import player from "game/player";
|
||||
import { format, formatTime } from "util/bignum";
|
||||
import Decimal, { format, formatTime } from "util/bignum";
|
||||
import { Computable, convertComputable, ProcessedComputable } from "util/computed";
|
||||
import { createLazyProxy } from "util/proxies";
|
||||
import { renderRow, VueFeature } from "util/vue";
|
||||
|
@ -316,5 +322,14 @@ export function fixOldSave(
|
|||
oldVersion: string | undefined,
|
||||
player: Partial<PlayerData>
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
): void {}
|
||||
): void {
|
||||
if (oldVersion === "0.0") {
|
||||
if (player.layers?.trees) {
|
||||
(player.layers.trees as LayerData<typeof trees>).trees = Decimal.sub(
|
||||
10,
|
||||
(player.layers.trees as LayerData<typeof trees>).saplings ?? 0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* eslint-enable @typescript-eslint/no-unused-vars */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"discordName": "",
|
||||
"discordLink": "",
|
||||
|
||||
"versionNumber": "0.0",
|
||||
"versionNumber": "0.1",
|
||||
"versionTitle": "Initial Commit",
|
||||
|
||||
"allowGoBack": true,
|
||||
|
|
Loading…
Reference in a new issue