mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-04-01 21:41:00 +00:00
fix toy sum
This commit is contained in:
parent
468c650baa
commit
dc1c9d48c9
2 changed files with 22 additions and 12 deletions
|
@ -41,17 +41,17 @@ const id = "toys";
|
||||||
const day = 17;
|
const day = 17;
|
||||||
|
|
||||||
const layer = createLayer(id, function (this: BaseLayer) {
|
const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
const name = "toys";
|
const name = "Toys";
|
||||||
const colorBright = "#4BDC13";
|
const colorBright = "#4BDC13";
|
||||||
const colorDark = "green";
|
const colorDark = "green";
|
||||||
|
|
||||||
const toys = createResource<DecimalSource>(0, "toys");
|
const clothes = createResource<DecimalSource>(0, "clothes");
|
||||||
const toys2 = createResource<DecimalSource>(0, "toys2");
|
const teddybears = createResource<DecimalSource>(0, " teddy bears");
|
||||||
const toys3 = createResource<DecimalSource>(0, "toys3");
|
const trains = createResource<DecimalSource>(0, "trains");
|
||||||
const toyGain = createSequentialModifier(() => [
|
const toyGain = createSequentialModifier(() => [
|
||||||
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
]);
|
||||||
|
const toySum = createResource(computed(() => Decimal.add(clothes.value, teddybears.value).add(trains.value)), "toy sum")
|
||||||
const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [
|
const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [
|
||||||
{
|
{
|
||||||
title: `Toy Gain`,
|
title: `Toy Gain`,
|
||||||
|
@ -82,7 +82,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
|
|
||||||
|
|
||||||
const { total: totalToys, trackerDisplay } = setUpDailyProgressTracker({
|
const { total: totalToys, trackerDisplay } = setUpDailyProgressTracker({
|
||||||
resource: toys,
|
resource: toySum,
|
||||||
goal: 1e4,
|
goal: 1e4,
|
||||||
name,
|
name,
|
||||||
day,
|
day,
|
||||||
|
@ -95,8 +95,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
|
day,
|
||||||
color: colorBright,
|
color: colorBright,
|
||||||
toys,
|
clothes,
|
||||||
|
teddybears,
|
||||||
totalToys,
|
totalToys,
|
||||||
generalTabCollapsed,
|
generalTabCollapsed,
|
||||||
minWidth: 700,
|
minWidth: 700,
|
||||||
|
@ -105,7 +107,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
{render(trackerDisplay)}
|
{render(trackerDisplay)}
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<MainDisplay
|
<MainDisplay
|
||||||
resource={toys}
|
resource={clothes}
|
||||||
color={colorBright}
|
color={colorBright}
|
||||||
style="margin-bottom: 0"
|
style="margin-bottom: 0"
|
||||||
productionDisplay={
|
productionDisplay={
|
||||||
|
@ -123,13 +125,13 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<MainDisplay
|
<MainDisplay
|
||||||
resource={toys2}
|
resource={teddybears}
|
||||||
color={colorDark}
|
color={colorDark}
|
||||||
style="margin-bottom: 0"
|
style="margin-bottom: 0"
|
||||||
productionDisplay={undefined}
|
productionDisplay={undefined}
|
||||||
/>
|
/>
|
||||||
<MainDisplay
|
<MainDisplay
|
||||||
resource={toys3}
|
resource={trains}
|
||||||
color={colorDark}
|
color={colorDark}
|
||||||
style="margin-bottom: 0"
|
style="margin-bottom: 0"
|
||||||
productionDisplay={undefined}
|
productionDisplay={undefined}
|
||||||
|
@ -138,7 +140,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
)),
|
)),
|
||||||
minimizedDisplay: jsx(() => (
|
minimizedDisplay: jsx(() => (
|
||||||
<div>
|
<div>
|
||||||
{name} - {format(toys.value)} {toys.displayName}
|
{name} - {format(toySum.value)} {"total toys"}
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,7 +33,11 @@ import plastic from "./layers/plastic";
|
||||||
import trees from "./layers/trees";
|
import trees from "./layers/trees";
|
||||||
import workshop from "./layers/workshop";
|
import workshop from "./layers/workshop";
|
||||||
import wrappingPaper from "./layers/wrapping-paper";
|
import wrappingPaper from "./layers/wrapping-paper";
|
||||||
|
<<<<<<< HEAD
|
||||||
import ribbon from "./layers/ribbon";
|
import ribbon from "./layers/ribbon";
|
||||||
|
=======
|
||||||
|
import toys from "./layers/toys";
|
||||||
|
>>>>>>> fix toy sum
|
||||||
import boxesSymbol from "./symbols/cardboardBox.png";
|
import boxesSymbol from "./symbols/cardboardBox.png";
|
||||||
import clothSymbol from "./symbols/cloth.png";
|
import clothSymbol from "./symbols/cloth.png";
|
||||||
import coalSymbol from "./symbols/coal.png";
|
import coalSymbol from "./symbols/coal.png";
|
||||||
|
@ -575,8 +579,12 @@ export const getInitialLayers = (
|
||||||
dyes,
|
dyes,
|
||||||
management,
|
management,
|
||||||
letters,
|
letters,
|
||||||
|
<<<<<<< HEAD
|
||||||
wrappingPaper,
|
wrappingPaper,
|
||||||
ribbon
|
ribbon
|
||||||
|
=======
|
||||||
|
toys,
|
||||||
|
>>>>>>> fix toy sum
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue