From cc35ee0a42ea78e39b06261107b89580ec9c24fd Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 24 Dec 2022 00:55:31 -0600 Subject: [PATCH 1/3] Remove unused ref --- src/components/Game.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/Game.vue b/src/components/Game.vue index 7ba0d18..4f26260 100644 --- a/src/components/Game.vue +++ b/src/components/Game.vue @@ -4,7 +4,6 @@ v-for="(tab, index) in tabs" :key="index" class="tab" - :ref="`tab-${index}`" :style="unref(layers[tab]?.style)" :class="unref(layers[tab]?.classes)" > @@ -14,7 +13,6 @@ v-if="layerKeys.includes(tab)" v-bind="gatherLayerProps(layers[tab]!)" :index="index" - :tab="() => (($refs[`tab-${index}`] as HTMLElement[] | undefined)?.[0])" /> From 9dd359ef6c3c139ef83ca5061e4d0b8389446761 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 24 Dec 2022 08:38:36 -0600 Subject: [PATCH 2/3] Don't set values on ref prop --- src/components/Game.vue | 1 + src/components/Layer.vue | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/Game.vue b/src/components/Game.vue index 4f26260..fd20d25 100644 --- a/src/components/Game.vue +++ b/src/components/Game.vue @@ -13,6 +13,7 @@ v-if="layerKeys.includes(tab)" v-bind="gatherLayerProps(layers[tab]!)" :index="index" + @set-minimized="value => (layers[tab]!.minimized.value = value)" /> diff --git a/src/components/Layer.vue b/src/components/Layer.vue index f599543..c687b56 100644 --- a/src/components/Layer.vue +++ b/src/components/Layer.vue @@ -2,7 +2,11 @@
- @@ -12,7 +16,9 @@
- + @@ -40,7 +46,7 @@ export default defineComponent({ }, minimizedDisplay: processedPropType(Object, String, Function), minimized: { - type: Object as PropType>, + type: Object as PropType>, required: true }, name: { @@ -54,6 +60,7 @@ export default defineComponent({ required: true } }, + emits: ["setMinimized"], setup(props) { const { display, index, minimized, minimizedDisplay } = toRefs(props); @@ -67,10 +74,6 @@ export default defineComponent({ player.tabs.splice(unref(props.index), 1); } - function setMinimized(min: boolean) { - minimized.value = min; - } - function updateNodes(nodes: Record) { props.nodes.value = nodes; } @@ -81,8 +84,7 @@ export default defineComponent({ showGoBack, updateNodes, unref, - goBack, - setMinimized + goBack }; } }); From c0026268d30aa0187507b26e18811b61e612c79c Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 24 Dec 2022 09:08:40 -0600 Subject: [PATCH 3/3] Tweaking --- src/data/layers/elves.tsx | 3 ++- src/data/layers/factory.tsx | 10 +++++++-- src/data/layers/metal.tsx | 5 +++-- src/data/layers/oil.tsx | 8 ++++++- src/data/layers/routing.tsx | 44 +++++++++++++++++++++++-------------- 5 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/data/layers/elves.tsx b/src/data/layers/elves.tsx index 47378a4..74b94fb 100644 --- a/src/data/layers/elves.tsx +++ b/src/data/layers/elves.tsx @@ -973,7 +973,8 @@ const layer = createLayer(id, function (this: BaseLayer) { showIf( management.elfTraining.fertilizerElfTraining.milestones[4].earned.value || letters.masteryEffectActive.value - ) + ), + buyMax: metal.masteryEffectActive }); const managementElves2 = [metalElf]; diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index f74428c..0ee9fec 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -307,7 +307,7 @@ const factory = createLayer(id, () => { )}
- {routing.metaMilestones[5].earned.value ? ( + {routing.metaMilestones[4].earned.value ? (
@@ -854,7 +854,8 @@ const layer = createLayer(id, function (this: BaseLayer) { )), mastery, - mastered + mastered, + masteryEffectActive }; }); diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index 5242aec..2c04525 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -44,6 +44,7 @@ import { ElfBuyable } from "./elves"; import toys from "./toys"; import factory from "./factory"; import reindeer from "./reindeer"; +import routing from "./routing"; const id = "oil"; const day = 9; @@ -996,7 +997,12 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "350 toys", enabled: toys.milestones.milestone4.earned })), - reindeer.reindeer.donner.modifier + reindeer.reindeer.donner.modifier, + createMultiplicativeModifier(() => ({ + multiplier: 4, + description: "600,000 Cities Solved", + enabled: routing.metaMilestones[5].earned + })) ]) as WithRequired; const computedOilSpeed = computed(() => oilSpeed.apply(0)); diff --git a/src/data/layers/routing.tsx b/src/data/layers/routing.tsx index 391d634..6c6f995 100644 --- a/src/data/layers/routing.tsx +++ b/src/data/layers/routing.tsx @@ -439,7 +439,8 @@ const layer = createLayer(id, function (this: BaseLayer) { } } return links; - } + }, + visibility: () => showIf(Decimal.lt(citiesCompleted.value, 50)) })); const checkCityProgressBar = createBar(() => ({ @@ -554,7 +555,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const milestone5 = createMilestone(() => ({ display: { requirement: "5 Cities Solved", - effectDisplay: "Remove 1 city from the map" + effectDisplay: "Remove 1 house from the map" }, shouldEarn() { return Decimal.gte(citiesCompleted.value, 5); @@ -714,7 +715,7 @@ const layer = createLayer(id, function (this: BaseLayer) { display: { requirement: "5000 Cities Solved", effectDisplay: - "Elves can learn past level 5 and gain 0.1 base city solved per second for each level elves learnt" + "Elves can learn past level 5 and gain 0.5 base city solved per second for each level elves learnt" }, shouldEarn() { return Decimal.gte(citiesCompleted.value, 5000); @@ -749,7 +750,7 @@ const layer = createLayer(id, function (this: BaseLayer) { display: { requirement: "300,000 Cities Solved", effectDisplay: - "Multiply the amount of factory input resources by the amount of their corresponding warehouses appeared in the factory, plus 1" + "Multiply the amount of factory input resources by the amount of their corresponding warehouses appeared in the factory, plus 1. Also unlocks a button to fill your factory with warehouses." }, shouldEarn() { return Decimal.gte(citiesCompleted.value, 300000); @@ -759,8 +760,7 @@ const layer = createLayer(id, function (this: BaseLayer) { 5: createMilestone(() => ({ display: { requirement: "600,000 Cities Solved", - effectDisplay: - "Unlocks a button to let you fill the remaining empty spaces in the factory with warehouses, useful for the previous milestone" + effectDisplay: "Quadruple oil gain" }, shouldEarn() { return Decimal.gte(citiesCompleted.value, 600000); @@ -775,7 +775,7 @@ const layer = createLayer(id, function (this: BaseLayer) { Increases base city solving speed by{" "}
factory tick rate
-
1000
+
100
)) @@ -859,14 +859,14 @@ const layer = createLayer(id, function (this: BaseLayer) { const computedAutoProcessing = computed(() => autoProcessing.apply(1)); const metaSolvingSpeed = createSequentialModifier(() => [ createAdditiveModifier(() => ({ - addend: () => Decimal.div(management.totalElfLevels.value, 10), + addend: () => Decimal.div(management.totalElfLevels.value, 2), description: "5000 Cities Solved", enabled: metaMilestones[1].earned })), createAdditiveModifier(() => ({ - addend: () => Decimal.div(factory.computedTickRate.value, 1000), + addend: () => Decimal.div(factory.computedTickRate.value, 100), description: "1,000,000 Cities Solved", - enabled: metaMilestones[1].earned + enabled: metaMilestones[6].earned })), ...Object.values(metaBuyables).map(x => createMultiplicativeModifier(() => ({ @@ -876,7 +876,7 @@ const layer = createLayer(id, function (this: BaseLayer) { })) ) ]) as WithRequired; - const computedMetaSolvingSpeed = computed(() => metaSolvingSpeed.apply(20)); + const computedMetaSolvingSpeed = computed(() => metaSolvingSpeed.apply(50)); const [generalTab, generalTabCollapsed] = createCollapsibleModifierSections(() => [ { @@ -927,7 +927,7 @@ const layer = createLayer(id, function (this: BaseLayer) { { title: "Post-Inflation Solving Speed", modifier: metaSolvingSpeed, - base: 20, + base: 50, unit: "/s", visible: () => Decimal.gt(citiesCompleted.value, 50) } @@ -1138,10 +1138,22 @@ const layer = createLayer(id, function (this: BaseLayer) { ) : ( <> - You're solving {formatWhole(computedMetaSolvingSpeed.value)} cities per - second - - {renderRow(...Object.values(metaBuyables))} + {Decimal.lt(citiesCompleted.value, citiesGoal) ? ( + <> + You're solving {formatWhole(computedMetaSolvingSpeed.value)} cities + per second + + {renderRow(...Object.values(metaBuyables))} + + ) : ( + <> + You've solved all cities on Earth! +
+ + (and proved the travelling salesman problem to be O(1)) + + + )} {metaMilestonesDisplay()}