mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 17:31:54 +00:00
Merge branch 'main' of https://github.com/thepaperpilot/Advent-Incremental into main
This commit is contained in:
commit
eaebb4048e
6 changed files with 16 additions and 13 deletions
|
@ -485,7 +485,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
const row2upgrades = [dedicatedCutters, dedicatedPlanters, betterFertilizer, unlockKiln];
|
||||
|
||||
const efficientSmelther: Upgrade<EfficientSmeltherUpgOptions> = createUpgrade(() => ({
|
||||
resource: coal,
|
||||
resource: noPersist(coal),
|
||||
cost: 1e19,
|
||||
display: {
|
||||
title: "Efficient Crucibles",
|
||||
|
|
|
@ -1068,6 +1068,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
|
||||
minWidth: 700,
|
||||
|
||||
oilMilestones,
|
||||
collapsedOilMilestones,
|
||||
|
||||
generalTabCollapsed,
|
||||
display: jsx(() => (
|
||||
<>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import BarComponent from "features/bars/Bar.vue";
|
||||
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||
import type { DecimalSource } from "util/bignum";
|
||||
import { Direction } from "util/common";
|
||||
|
@ -34,7 +34,7 @@ export interface BarOptions {
|
|||
export interface BaseBar {
|
||||
id: string;
|
||||
type: typeof BarType;
|
||||
[Component]: typeof BarComponent;
|
||||
[Component]: GenericComponent;
|
||||
[GatherProps]: () => Record<string, unknown>;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ export function createBar<T extends BarOptions>(
|
|||
const bar = optionsFunc();
|
||||
bar.id = getUniqueID("bar-");
|
||||
bar.type = BarType;
|
||||
bar[Component] = BarComponent;
|
||||
bar[Component] = BarComponent as GenericComponent;
|
||||
|
||||
processComputable(bar as T, "visibility");
|
||||
setDefault(bar, "visibility", Visibility.Visible);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import ClickableComponent from "features/clickables/Clickable.vue";
|
||||
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import { Component, GatherProps, getUniqueID, jsx, setDefault, Visibility } from "features/feature";
|
||||
import type { Resource } from "features/resources/resource";
|
||||
import { DefaultValue, Persistent } from "game/persistence";
|
||||
|
@ -53,7 +53,7 @@ export interface BaseBuyable {
|
|||
onClick: VoidFunction;
|
||||
purchase: VoidFunction;
|
||||
type: typeof BuyableType;
|
||||
[Component]: typeof ClickableComponent;
|
||||
[Component]: GenericComponent;
|
||||
[GatherProps]: () => Record<string, unknown>;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ export function createBuyable<T extends BuyableOptions>(
|
|||
|
||||
buyable.id = getUniqueID("buyable-");
|
||||
buyable.type = BuyableType;
|
||||
buyable[Component] = ClickableComponent;
|
||||
buyable[Component] = ClickableComponent as GenericComponent;
|
||||
|
||||
buyable.amount = amount;
|
||||
buyable.amount[DefaultValue] = buyable.initialValue ?? 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import ClickableComponent from "features/clickables/Clickable.vue";
|
||||
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||
import type { BaseLayer } from "game/layers";
|
||||
import type { Unsubscribe } from "nanoevents";
|
||||
|
@ -37,7 +37,7 @@ export interface BaseClickable {
|
|||
id: string;
|
||||
type: typeof ClickableType;
|
||||
isHolding: Ref<boolean>;
|
||||
[Component]: typeof ClickableComponent;
|
||||
[Component]: GenericComponent;
|
||||
[GatherProps]: () => Record<string, unknown>;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ export function createClickable<T extends ClickableOptions>(
|
|||
const clickable = optionsFunc?.() ?? ({} as ReturnType<NonNullable<typeof optionsFunc>>);
|
||||
clickable.id = getUniqueID("clickable-");
|
||||
clickable.type = ClickableType;
|
||||
clickable[Component] = ClickableComponent;
|
||||
clickable[Component] = ClickableComponent as GenericComponent;
|
||||
|
||||
clickable.isHolding = ref(false);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import type { CoercableComponent, GenericComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||
import {
|
||||
Component,
|
||||
findFeatures,
|
||||
|
@ -54,7 +54,7 @@ export interface BaseUpgrade {
|
|||
canPurchase: Ref<boolean>;
|
||||
purchase: VoidFunction;
|
||||
type: typeof UpgradeType;
|
||||
[Component]: typeof UpgradeComponent;
|
||||
[Component]: GenericComponent;
|
||||
[GatherProps]: () => Record<string, unknown>;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ export function createUpgrade<T extends UpgradeOptions>(
|
|||
const upgrade = optionsFunc();
|
||||
upgrade.id = getUniqueID("upgrade-");
|
||||
upgrade.type = UpgradeType;
|
||||
upgrade[Component] = UpgradeComponent;
|
||||
upgrade[Component] = UpgradeComponent as GenericComponent;
|
||||
|
||||
if (upgrade.canAfford == null && (upgrade.resource == null || upgrade.cost == null)) {
|
||||
console.warn(
|
||||
|
|
Loading…
Reference in a new issue