mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-22 08:31:35 +00:00
add some upgrades
This commit is contained in:
parent
1b151cce12
commit
24e8a477bf
1 changed files with 20 additions and 2 deletions
|
@ -20,6 +20,7 @@ import { createTabFamily } from "features/tabs/tabFamily";
|
||||||
import Tooltip from "features/tooltips/Tooltip.vue";
|
import Tooltip from "features/tooltips/Tooltip.vue";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import { createLayer } from "game/layers";
|
import { createLayer } from "game/layers";
|
||||||
|
import { createUpgrade, GenericUpgrade } from "features/upgrades/upgrade";
|
||||||
import {
|
import {
|
||||||
createAdditiveModifier,
|
createAdditiveModifier,
|
||||||
createMultiplicativeModifier,
|
createMultiplicativeModifier,
|
||||||
|
@ -1033,9 +1034,25 @@ const factory = createLayer(id, () => {
|
||||||
visible: () => showIf(main.days[advancedDay - 1].opened.value)
|
visible: () => showIf(main.days[advancedDay - 1].opened.value)
|
||||||
})) as GenericBuyable;
|
})) as GenericBuyable;
|
||||||
const factoryBuyables = { expandFactory, oilFuel, carryToys };
|
const factoryBuyables = { expandFactory, oilFuel, carryToys };
|
||||||
|
const upgrades = [createUpgrade(() => ({
|
||||||
|
resource: trees.logs,
|
||||||
|
cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80),
|
||||||
|
display: {
|
||||||
|
title: "Sawmill Efficiency",
|
||||||
|
description: "Metal increases sawmill consumption and production by *log(metal)/10"
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
createUpgrade(() => ({
|
||||||
|
resource: trees.logs,
|
||||||
|
cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80),
|
||||||
|
display: {
|
||||||
|
title: "Sawmill Efficiency",
|
||||||
|
description: "Metal increases sawmill consumption and production by *log(metal)/10"
|
||||||
|
}
|
||||||
|
})),]
|
||||||
|
|
||||||
// pixi
|
// pixi
|
||||||
|
const upgradeAmount = computed(() => Object.values(upgrades).filter(u => u.bought.value).length) as ComputedRef<number>
|
||||||
// load every sprite here so pixi doesn't complain about loading multiple times
|
// load every sprite here so pixi doesn't complain about loading multiple times
|
||||||
const assetsLoading = Promise.all([
|
const assetsLoading = Promise.all([
|
||||||
Assets.load(Object.values(FACTORY_COMPONENTS).map(x => x.imageSrc)),
|
Assets.load(Object.values(FACTORY_COMPONENTS).map(x => x.imageSrc)),
|
||||||
|
@ -1939,6 +1956,7 @@ const factory = createLayer(id, () => {
|
||||||
factoryBuyables,
|
factoryBuyables,
|
||||||
generalTabCollapsed,
|
generalTabCollapsed,
|
||||||
hotkeys,
|
hotkeys,
|
||||||
|
upgrades,
|
||||||
display: jsx(() => (
|
display: jsx(() => (
|
||||||
<>
|
<>
|
||||||
{render(modifiersModal)}
|
{render(modifiersModal)}
|
||||||
|
|
Loading…
Reference in a new issue