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