From 1d42d8ea5ff0536cbfd3de531d0d916dbed8fbf0 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 02:04:58 +0000 Subject: [PATCH 01/17] fix grid --- src/data/layers/factory.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 43513d0..d8cd41c 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -30,7 +30,7 @@ import { noPersist, Persistent, persistent, State } from "game/persistence"; import Decimal, { DecimalSource, format, formatWhole } from "util/bignum"; import { Direction } from "util/common"; import { ProcessedComputable } from "util/computed"; -import { render, renderGrid, renderRow } from "util/vue"; +import { render, renderGrid, renderRow, VueFeature } from "util/vue"; import { computed, ComputedRef, reactive, ref, unref, watchEffect } from "vue"; import _cloth from "../symbols/cloth.png"; import _dye from "../symbols/dyes.png"; @@ -1097,7 +1097,7 @@ const factory = createLayer(id, () => { ] // pixi - const upgradeAmount = computed(() => Object.values(upgrades).filter(u => u.bought.value).length) as ComputedRef + const upgradeAmount = computed(() => upgrades.flat().filter(u => u.bought.value).length) as ComputedRef // load every sprite here so pixi doesn't complain about loading multiple times const assetsLoading = Promise.all([ Assets.load(Object.values(FACTORY_COMPONENTS).map(x => x.imageSrc)), @@ -1856,7 +1856,7 @@ const factory = createLayer(id, () => { {renderRow(...Object.values(factoryBuyables))} - {renderGrid(upgrades as VueFeature[])} + {renderGrid(...upgrades as VueFeature[][])} )) })), From e5946739e5b7239c868b852a8d7890956e6e7ebf Mon Sep 17 00:00:00 2001 From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com> Date: Fri, 23 Dec 2022 12:38:30 +1000 Subject: [PATCH 02/17] Day 19 stuff --- src/data/layers/factory-components/button.svg | 50 +++ .../layers/factory-components/buttonmaker.svg | 58 ++++ .../layers/factory-components/circuit.svg | 300 +++++++++++++++++ .../factory-components/circuitmaker.svg | 308 ++++++++++++++++++ .../layers/factory-components/console.svg | 110 +++++++ .../factory-components/consolemaker.svg | 118 +++++++ .../layers/factory-components/stuffing.svg | 50 +++ .../factory-components/stuffingmaker.svg | 58 ++++ 8 files changed, 1052 insertions(+) create mode 100644 src/data/layers/factory-components/button.svg create mode 100644 src/data/layers/factory-components/buttonmaker.svg create mode 100644 src/data/layers/factory-components/circuit.svg create mode 100644 src/data/layers/factory-components/circuitmaker.svg create mode 100644 src/data/layers/factory-components/console.svg create mode 100644 src/data/layers/factory-components/consolemaker.svg create mode 100644 src/data/layers/factory-components/stuffing.svg create mode 100644 src/data/layers/factory-components/stuffingmaker.svg diff --git a/src/data/layers/factory-components/button.svg b/src/data/layers/factory-components/button.svg new file mode 100644 index 0000000..1e11f88 --- /dev/null +++ b/src/data/layers/factory-components/button.svg @@ -0,0 +1,50 @@ + + + + + + + + + + diff --git a/src/data/layers/factory-components/buttonmaker.svg b/src/data/layers/factory-components/buttonmaker.svg new file mode 100644 index 0000000..3bbc888 --- /dev/null +++ b/src/data/layers/factory-components/buttonmaker.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + diff --git a/src/data/layers/factory-components/circuit.svg b/src/data/layers/factory-components/circuit.svg new file mode 100644 index 0000000..1fd0a6b --- /dev/null +++ b/src/data/layers/factory-components/circuit.svg @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/data/layers/factory-components/circuitmaker.svg b/src/data/layers/factory-components/circuitmaker.svg new file mode 100644 index 0000000..fe41d8d --- /dev/null +++ b/src/data/layers/factory-components/circuitmaker.svg @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/data/layers/factory-components/console.svg b/src/data/layers/factory-components/console.svg new file mode 100644 index 0000000..03141da --- /dev/null +++ b/src/data/layers/factory-components/console.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/data/layers/factory-components/consolemaker.svg b/src/data/layers/factory-components/consolemaker.svg new file mode 100644 index 0000000..daef2f4 --- /dev/null +++ b/src/data/layers/factory-components/consolemaker.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/data/layers/factory-components/stuffing.svg b/src/data/layers/factory-components/stuffing.svg new file mode 100644 index 0000000..a8204fc --- /dev/null +++ b/src/data/layers/factory-components/stuffing.svg @@ -0,0 +1,50 @@ + + + + + + + + + + diff --git a/src/data/layers/factory-components/stuffingmaker.svg b/src/data/layers/factory-components/stuffingmaker.svg new file mode 100644 index 0000000..f15ac12 --- /dev/null +++ b/src/data/layers/factory-components/stuffingmaker.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + From 91e3c2703de013eb96e8acc124cbb3b4c4655b20 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 02:58:14 +0000 Subject: [PATCH 03/17] hide upgrade grid until day 19 --- src/data/layers/factory.tsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index a990cf6..60c9e53 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1044,7 +1044,8 @@ const factory = createLayer(id, () => { display: { title: "Sawmill Efficiency", description: "Metal increases sawmill consumption and production by *log(metal)/10" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: paper.paper, @@ -1052,7 +1053,8 @@ const factory = createLayer(id, () => { display: { title: "News Ticker", description: "Paper boosts tick speed" // formula: *1+log(x)/100 - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: toys.trucks, @@ -1060,7 +1062,8 @@ const factory = createLayer(id, () => { display: { title: "Haul wood in trucks", description: "Trucks multiply wood gain" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: metal.metal, @@ -1068,7 +1071,8 @@ const factory = createLayer(id, () => { display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) }))], [createUpgrade(() => ({ resource: toys.woodenBlocks, @@ -1076,7 +1080,8 @@ const factory = createLayer(id, () => { display: { title: "Larger wood pieces", description: "Wooden block producers produce 3x as much" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: dyes.dyes.red.amount, @@ -1084,7 +1089,8 @@ const factory = createLayer(id, () => { display: { title: "Colorful clothes", description: "Dye producers produce 4x as much" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ resource: plastic.plastic, @@ -1092,7 +1098,8 @@ const factory = createLayer(id, () => { display: { title: "Improved plastic producers", description: "Plastic producers produce 4x as much" - } + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) }))], ] From 1a4cda25d9ef9224242b34ff1ad84f20c27036f2 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 21:03:22 -0600 Subject: [PATCH 04/17] Fix subtabs not scrolling --- src/features/tabs/TabFamily.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/features/tabs/TabFamily.vue b/src/features/tabs/TabFamily.vue index 1ae9007..e899549 100644 --- a/src/features/tabs/TabFamily.vue +++ b/src/features/tabs/TabFamily.vue @@ -135,10 +135,12 @@ export default defineComponent({ position: relative; border: solid 4px; border-color: var(--outline); + overflow-y: auto; } .layer-tab > .tab-family-container:first-child { margin: -4px -11px var(--feature-margin) -11px; + padding-bottom: 50px; } .layer-tab > .tab-family-container:first-child:nth-last-child(3) { From c9667ee249d74fcd1972c581d573b4b4dc624fa1 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:05:06 +0000 Subject: [PATCH 05/17] upgrade #8 also changed scalings --- src/data/layers/factory.tsx | 53 ++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 60c9e53..7f90a2d 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1010,7 +1010,7 @@ const factory = createLayer(id, () => { const oilFuel = createBuyable(() => ({ resource: oil.oil, cost() { - return Decimal.pow(10, this.amount.value).times(1e24); + return Decimal.pow(10, this.amount.value).times(1e23); }, display: { title: "Oil Fuel", @@ -1058,7 +1058,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: toys.trucks, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), display: { title: "Haul wood in trucks", description: "Trucks multiply wood gain" @@ -1076,7 +1076,43 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: toys.woodenBlocks, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), + display: { + title: "Larger wood pieces", + description: "Wooden block producers produce 3x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: dyes.dyes.red.amount, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + display: { + title: "Colorful clothes", + description: "Dye producers produce 4x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: plastic.plastic, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + display: { + title: "Improved plastic producers", + description: "Plastic producers produce 4x as much" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + })), + createUpgrade(() => ({ + resource: oil.oil, + cost: () =>Decimal.pow(4, upgradeAmount.value).mul(1e23), + display: { + title: "Capitalism", + description: "Console production is tripled" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + }))], + /*[createUpgrade(() => ({ + resource: coal.coal, + cost: () =>Decimal.pow(15, upgradeAmount.value).mul(1000), display: { title: "Larger wood pieces", description: "Wooden block producers produce 3x as much" @@ -1100,7 +1136,16 @@ const factory = createLayer(id, () => { description: "Plastic producers produce 4x as much" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) - }))], + })), + createUpgrade(() => ({ + resource: oil.oil, + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e23), + display: { + title: "Capitalism", + description: "Console production is tripled" + }, + visible: () => showIf(main.days[advancedDay - 1].opened.value) + }))],*/ ] // pixi From 9df82505fee9cc0c96952f25a94f4e9f541be037 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 21:09:03 -0600 Subject: [PATCH 06/17] Implemented emanresu's images --- src/data/layers/factory.tsx | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 60c9e53..b133888 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -38,18 +38,14 @@ import _metal from "../symbols/metal.png"; import _plastic from "../symbols/plastic.png"; import boxes from "./boxes"; import coal from "./coal"; -import { - default as _bear, - default as _circuitBoard, - default as _console, - default as _stuffing -} from "./factory-components/bear.svg"; -import { - default as _bearMaker, - default as _circuitBoardMaker, - default as _consoleMaker, - default as _stuffingMaker -} from "./factory-components/bearmaker.svg"; +import _bear from "./factory-components/bear.svg"; +import _bearMaker from "./factory-components/bearmaker.svg"; +import _stuffing from "./factory-components/stuffing.svg"; +import _console from "./factory-components/console.svg"; +import _circuitBoard from "./factory-components/circuit.svg"; +import _stuffingMaker from "./factory-components/stuffingmaker.svg"; +import _consoleMaker from "./factory-components/consolemaker.svg"; +import _circuitBoardMaker from "./factory-components/circuitmaker.svg"; import _block from "./factory-components/block.svg"; import _blockMaker from "./factory-components/blockmaker.svg"; import _bucket from "./factory-components/bucket.svg"; @@ -67,11 +63,10 @@ import _rotateLeft from "./factory-components/rotateLeft.svg"; import _rotateRight from "./factory-components/rotateRight.svg"; import _plankMaker from "./factory-components/sawmill.svg"; import _shed from "./factory-components/shed.svg"; -import { default as _button, default as _shovel } from "./factory-components/shovel.svg"; -import { - default as _buttonMaker, - default as _shovelMaker -} from "./factory-components/shovelmaker.svg"; +import _button from "./factory-components/button.svg"; +import _shovel from "./factory-components/shovel.svg"; +import _shovelMaker from "./factory-components/shovelmaker.svg"; +import _buttonMaker from "./factory-components/buttonmaker.svg"; import _thread from "./factory-components/thread.svg"; import _threadMaker from "./factory-components/threadmaker.svg"; import _truck from "./factory-components/truck.svg"; @@ -87,8 +82,8 @@ import trees from "./trees"; import workshop from "./workshop"; import paper from "./paper"; import metal from "./metal"; -import dyes from "./dyes" -import plastic from "./plastic" +import dyes from "./dyes"; +import plastic from "./plastic"; const id = "factory"; From b958da2b6991b8f69ffc605cdf7530a27d47a783 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:09:58 +0000 Subject: [PATCH 07/17] 4 new upgrades --- src/data/layers/factory.tsx | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 7f90a2d..841c383 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1110,42 +1110,42 @@ const factory = createLayer(id, () => { }, visible: () => showIf(main.days[advancedDay - 1].opened.value) }))], - /*[createUpgrade(() => ({ + [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(15, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(100, upgradeAmount.value).mul(1e136), display: { - title: "Larger wood pieces", - description: "Wooden block producers produce 3x as much" + title: "Brighter work rooms", + description: "Unused electricity % makes ticks faster up to 2x" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ - resource: dyes.dyes.red.amount, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e17), + resource: dyes.dyes.blue.amount, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), display: { - title: "Colorful clothes", - description: "Dye producers produce 4x as much" + title: "Colorful teddy bears", + description: "Teddy bears produce 2x as much" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ - resource: plastic.plastic, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e17), + resource: dyes.dyes.black.amount, + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e6), display: { - title: "Improved plastic producers", - description: "Plastic producers produce 4x as much" + title: "New Colors", + description: "Unlock white dye" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), createUpgrade(() => ({ - resource: oil.oil, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e23), + resource: boxes.boxes, + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), display: { - title: "Capitalism", - description: "Console production is tripled" + title: "Carry ticks in boxes", + description: "Tick speed x1.5" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) - }))],*/ + }))], ] // pixi From e462a2ae61a34fdd68c047c394d5af46fd1b887d Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:19:44 +0000 Subject: [PATCH 08/17] first row upg effects --- src/data/layers/factory.tsx | 14 ++++++++++---- src/data/layers/oil.tsx | 7 +++++++ src/data/layers/trees.tsx | 6 ++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 66aaa72..3a2d8e8 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -189,7 +189,13 @@ const factory = createLayer(id, () => { multiplier: energyEfficiency, description: "Energy Consumption", enabled: () => Decimal.gt(energyConsumption.value, computedEnergy.value) + })), + createMultiplicativeModifier(() => ({ + multiplier: Decimal.add(paper.paper.value, 1).log10().div(100).add(1), + description: "News Ticker", + enabled: () => upgrades[0][1].bought.value })) + ]); const computedTickRate = computed(() => tickRate.apply(1)); const factorySize = createSequentialModifier(() => [ @@ -395,12 +401,12 @@ const factory = createLayer(id, () => { tick: 1, inputs: { wood: { - amount: 1 + amount: computed(() => (upgrades[0][0].bought.value ? 2 : 1)) } }, outputs: { plank: { - amount: 1 + amount: computed(() => (upgrades[0][0].bought.value ? 2 : 1)) } } } as FactoryComponentDeclaration, @@ -1038,7 +1044,7 @@ const factory = createLayer(id, () => { cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), display: { title: "Sawmill Efficiency", - description: "Metal increases sawmill consumption and production by *log(metal)/10" + description: "Double sawmill consumption and production and metal supplier efficiency" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), @@ -1047,7 +1053,7 @@ const factory = createLayer(id, () => { cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e94), display: { title: "News Ticker", - description: "Paper boosts tick speed" // formula: *1+log(x)/100 + description: "Paper boosts tick speed" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index a047ba9..9b1d346 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -25,6 +25,7 @@ import { createSequentialModifier, createAdditiveModifier, createMultiplicativeModifier, + createExponentialModifier, Modifier } from "game/modifiers"; import { main } from "data/projEntry"; @@ -41,6 +42,7 @@ import workshop from "./workshop"; import { WithRequired } from "util/common"; import { ElfBuyable } from "./elves"; import toys from "./toys"; +import factory from "./factory"; const id = "oil"; const day = 9; @@ -889,6 +891,11 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: dyes.boosts.red2, description: "Red Dye", enabled: dyes.masteryEffectActive + })), + createExponentialModifier(() => ({ + exponent: 1.2, + description: "Diamond-tipped drills", + enabled: factory.upgrades[0][3].bought.value })) ]); const computedDrillPower = computed(() => drillPower.apply(0)); diff --git a/src/data/layers/trees.tsx b/src/data/layers/trees.tsx index 51a799a..034fdf3 100644 --- a/src/data/layers/trees.tsx +++ b/src/data/layers/trees.tsx @@ -39,6 +39,7 @@ import paper from "./paper"; import workshop from "./workshop"; import wrappingPaper from "./wrapping-paper"; import toys from "./toys"; +import factory from "./factory"; const id = "trees"; const day = 1; @@ -551,6 +552,11 @@ const layer = createLayer(id, function (this: BaseLayer) { description: "3000 Toys", enabled: toys.milestones.milestone7.earned })), + createMultiplicativeModifier(() => ({ + multiplier: () => Decimal.add(toys.trucks.value, 1), + description: "Haul wood in trucks", + enabled: factory.upgrades[0][2].bought + })), createExponentialModifier(() => ({ exponent: 1.2, description: "100% Foundation Completed", From 59d5c46b748f1c9fb9cde70ff2c886029620e31c Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:22:38 +0000 Subject: [PATCH 09/17] upg row 2 effects --- src/data/layers/factory.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 3a2d8e8..2d7c2a5 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -357,7 +357,7 @@ const factory = createLayer(id, () => { tick: 1, outputs: { dye: { - amount: 1 + amount: computed(() => (upgrades[1][1].bought.value ? 4 : 1)) } } } as FactoryComponentDeclaration, @@ -387,7 +387,7 @@ const factory = createLayer(id, () => { tick: 1, outputs: { plastic: { - amount: 1 + amount: computed(() => (upgrades[1][2].bought.value ? 4 : 1)) } } } as FactoryComponentDeclaration, @@ -572,7 +572,7 @@ const factory = createLayer(id, () => { }, outputs: { block: { - amount: 1, + amount: computed(() => (upgrades[1][0].bought.value ? 3 : 1)), resource: toys.woodenBlocks } } @@ -703,7 +703,7 @@ const factory = createLayer(id, () => { }, outputs: { console: { - amount: 1, + amount: computed(() => (upgrades[1][1].bought.value ? 3 : 1)), resource: consoles } }, From 3b386f590988a4fa88c27cb049664829ce712ffb Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:32:05 +0000 Subject: [PATCH 10/17] implement row 3 upg effects --- src/data/layers/dyes.tsx | 33 ++++++++++++++++++++++++++++++++- src/data/layers/factory.tsx | 19 ++++++++++++++----- src/data/layers/plastic.tsx | 4 ++++ 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index 6d94dff..e2d7f25 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -36,6 +36,7 @@ import oil from "./oil"; import paper from "./paper"; import trees from "./trees"; import toys from "./toys"; +import factory from "./factory"; interface Dye { name: string; @@ -56,7 +57,7 @@ type DyeUpg = | "blueDyeUpg2" | "coalUpg"; -export type enumColor = "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "black"; +export type enumColor = "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "black" | "white"; const id = "dyes"; const day = 11; @@ -520,6 +521,31 @@ const layer = createLayer(id, function (this: BaseLayer) { dyesToReset: [], visibility: () => showIf(toys.milestones.milestone2.earned.value) }), + white: createDye({ + name: "White Dye", + color: "white", + key: "q", + costs: () => [ + { + base: "1e60", + root: 5, + res: trees.logs + }, + { + base: computed(() => (upgrades.yellowDyeUpg2.bought.value ? "1e17" : "2e17")), + root: 2, + res: oil.oil + } + ], + listedBoosts: [ + { + visible: true, + desc: computed(() => `*${format(boosts.white1.value)} plastic gain.`) + } + ], + dyesToReset: [], + visibility: () => showIf(factory.upgrades[2][3].bought.value) + }), orange: createDye({ name: "Orange Dye", color: "orange", @@ -702,6 +728,11 @@ const layer = createLayer(id, function (this: BaseLayer) { Decimal.pow(2, Decimal.add(dyes.black.amount.value, 1).log2().sqrt()) .pow(upgrades.coalUpg.bought.value ? 1.2 : 1) .pow(management.elfTraining.clothElfTraining.milestones[3].earned.value ? 1.1 : 1) + ), + white1: computed(() => + Decimal.pow(2, Decimal.add(dyes.white.amount.value, 1).log2().sqrt()) + .pow(upgrades.coalUpg.bought.value ? 1.2 : 1) + .pow(management.elfTraining.clothElfTraining.milestones[3].earned.value ? 1.1 : 1) ) }; diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 2d7c2a5..6e3774a 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -194,8 +194,17 @@ const factory = createLayer(id, () => { multiplier: Decimal.add(paper.paper.value, 1).log10().div(100).add(1), description: "News Ticker", enabled: () => upgrades[0][1].bought.value - })) - + })), + createMultiplicativeModifier(() => ({ + multiplier: Decimal.lt(energyEfficiency.value, 1)?1:Decimal.sub(2, Decimal.div(energyConsumption.value, computedEnergy.value)), + description: "Brighter work rooms", + enabled: () => upgrades[2][1].bought.value + })), + createMultiplicativeModifier(() => ({ + multiplier: 1.5, + description: "Carry ticks in boxes", + enabled: () => upgrades[2][3].bought.value + })), ]); const computedTickRate = computed(() => tickRate.apply(1)); const factorySize = createSequentialModifier(() => [ @@ -651,7 +660,7 @@ const factory = createLayer(id, () => { }, outputs: { bear: { - amount: 1, + amount: computed(() => (upgrades[1][3].bought.value ? 2 : 1)), resource: bears } }, @@ -703,7 +712,7 @@ const factory = createLayer(id, () => { }, outputs: { console: { - amount: computed(() => (upgrades[1][1].bought.value ? 3 : 1)), + amount: computed(() => (upgrades[1][3].bought.value ? 3 : 1)), resource: consoles } }, @@ -1116,7 +1125,7 @@ const factory = createLayer(id, () => { cost: () =>Decimal.pow(100, upgradeAmount.value).mul(1e136), display: { title: "Brighter work rooms", - description: "Unused electricity % makes ticks faster up to 2x" + description: "Unused electricity makes ticks faster" }, visible: () => showIf(main.days[advancedDay - 1].opened.value) })), diff --git a/src/data/layers/plastic.tsx b/src/data/layers/plastic.tsx index b79c0b7..cf7cc2a 100644 --- a/src/data/layers/plastic.tsx +++ b/src/data/layers/plastic.tsx @@ -379,6 +379,10 @@ const layer = createLayer(id, function (this: BaseLayer) { multiplier: 50, description: "350 toys", enabled: toys.milestones.milestone4.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: () => dyes.boosts.white1.value, + description: "White Dye Boost" })) ]); const computedPlasticGain = computed(() => plasticGain.apply(0)); From 96a211aa646326c2fb16aa7a0872ebd24d2b22ec Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:47:26 +0000 Subject: [PATCH 11/17] reduce scalings by a lot --- src/data/layers/dyes.tsx | 12 +++++++++--- src/data/layers/factory.tsx | 16 ++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/data/layers/dyes.tsx b/src/data/layers/dyes.tsx index e2d7f25..d81551c 100644 --- a/src/data/layers/dyes.tsx +++ b/src/data/layers/dyes.tsx @@ -215,6 +215,7 @@ const layer = createLayer(id, function (this: BaseLayer) { case "yellow": case "blue": case "black": + case "white": dyeBook = paper.books.primaryDyeBook; break; case "orange": @@ -544,7 +545,7 @@ const layer = createLayer(id, function (this: BaseLayer) { } ], dyesToReset: [], - visibility: () => showIf(factory.upgrades[2][3].bought.value) + visibility: () => showIf(factory.upgrades[2][2].bought.value) }), orange: createDye({ name: "Orange Dye", @@ -757,6 +758,11 @@ const layer = createLayer(id, function (this: BaseLayer) { modifier: dyes.black.toGenerate, base: 0 }, + { + title: "White Dye Creation", + modifier: dyes.white.toGenerate, + base: 0 + }, { title: "Orange Dye Creation", modifier: dyes.orange.toGenerate, @@ -987,8 +993,8 @@ const layer = createLayer(id, function (this: BaseLayer) { ) : null}
- {renderRow(dyes.black.display)} - {renderRow(dyes.black.buyable)} + {renderRow(dyes.black.display, dyes.white.display)} + {renderRow(dyes.black.buyable, dyes.white.buyable)} {renderRow(dyes.red.display, dyes.yellow.display, dyes.blue.display)} {renderRow(dyes.red.buyable, dyes.yellow.buyable, dyes.blue.buyable)} diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 6e3774a..b612a59 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1050,7 +1050,7 @@ const factory = createLayer(id, () => { const factoryBuyables = { expandFactory, oilFuel, carryToys }; const upgrades = [[createUpgrade(() => ({ resource: trees.logs, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), display: { title: "Sawmill Efficiency", description: "Double sawmill consumption and production and metal supplier efficiency" @@ -1077,7 +1077,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: metal.metal, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e55), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e55), display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" @@ -1095,7 +1095,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.red.amount, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(4e16), display: { title: "Colorful clothes", description: "Dye producers produce 4x as much" @@ -1113,7 +1113,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(4, upgradeAmount.value).mul(1e23), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e23), display: { title: "Capitalism", description: "Console production is tripled" @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(100, upgradeAmount.value).mul(1e136), + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e136), display: { title: "Brighter work rooms", description: "Unused electricity makes ticks faster" @@ -1131,7 +1131,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.blue.amount, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e17), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(4e16), display: { title: "Colorful teddy bears", description: "Teddy bears produce 2x as much" @@ -1140,7 +1140,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.black.amount, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e6), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(1e6), display: { title: "New Colors", description: "Unlock white dye" @@ -1149,7 +1149,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: boxes.boxes, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), display: { title: "Carry ticks in boxes", description: "Tick speed x1.5" From b8f61a1e7ab38f54b11b85635e9b6fa2f08cde6c Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:06:57 +0000 Subject: [PATCH 12/17] reduce scaling more --- src/data/layers/factory.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index b612a59..10056dd 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1050,7 +1050,7 @@ const factory = createLayer(id, () => { const factoryBuyables = { expandFactory, oilFuel, carryToys }; const upgrades = [[createUpgrade(() => ({ resource: trees.logs, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e75), display: { title: "Sawmill Efficiency", description: "Double sawmill consumption and production and metal supplier efficiency" @@ -1059,7 +1059,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: paper.paper, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e94), + cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e90), display: { title: "News Ticker", description: "Paper boosts tick speed" @@ -1077,7 +1077,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: metal.metal, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e55), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e55), display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" @@ -1113,7 +1113,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e23), + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e23), display: { title: "Capitalism", description: "Console production is tripled" @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e136), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e136), display: { title: "Brighter work rooms", description: "Unused electricity makes ticks faster" @@ -1131,7 +1131,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: dyes.dyes.blue.amount, - cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(4e16), + cost: () =>Decimal.pow(1.4, upgradeAmount.value).mul(1e15), display: { title: "Colorful teddy bears", description: "Teddy bears produce 2x as much" @@ -1149,7 +1149,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: boxes.boxes, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e80), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e80), display: { title: "Carry ticks in boxes", description: "Tick speed x1.5" From 32709cfd78e6ebf0e41278434a36c03a22da862a Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:17:59 +0000 Subject: [PATCH 13/17] remove the .value --- src/data/layers/factory.tsx | 6 +++--- src/data/layers/oil.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 10056dd..e127681 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1077,7 +1077,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: metal.metal, - cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e55), + cost: () =>Decimal.pow(3, upgradeAmount.value).mul(1e53), display: { title: "Diamond-tipped drills", description: "Drill power ^1.2" @@ -1113,7 +1113,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e23), + cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e22), display: { title: "Capitalism", description: "Console production is tripled" @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: coal.coal, - cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e136), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e130), display: { title: "Brighter work rooms", description: "Unused electricity makes ticks faster" diff --git a/src/data/layers/oil.tsx b/src/data/layers/oil.tsx index 9b1d346..5d8e692 100644 --- a/src/data/layers/oil.tsx +++ b/src/data/layers/oil.tsx @@ -895,7 +895,7 @@ const layer = createLayer(id, function (this: BaseLayer) { createExponentialModifier(() => ({ exponent: 1.2, description: "Diamond-tipped drills", - enabled: factory.upgrades[0][3].bought.value + enabled: factory.upgrades[0][3].bought })) ]); const computedDrillPower = computed(() => drillPower.apply(0)); From 17aa5b1c592b09d2a75ff48cb9599fe993149f0e Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:32:32 +0000 Subject: [PATCH 14/17] fix bucket --- src/data/layers/factory.tsx | 15 ++++++++++----- src/data/layers/toys.tsx | 12 +++++++++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index e127681..0cdb359 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -162,7 +162,12 @@ const factory = createLayer(id, () => { })), createMultiplicativeModifier(() => ({ multiplier: 1.4, - description: "2000 toys", + description: "1500 toys", + enabled: toys.milestones.milestone6.earned + })), + createMultiplicativeModifier(() => ({ + multiplier: 1.4, + description: "6000 toys", enabled: toys.milestones.milestone6.earned })) ]); @@ -537,7 +542,7 @@ const factory = createLayer(id, () => { } }, outputs: { - shovel: { + bucket: { amount: 1 } }, @@ -1059,7 +1064,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: paper.paper, - cost: () =>Decimal.pow(10, upgradeAmount.value).mul(1e90), + cost: () =>Decimal.pow(5, upgradeAmount.value).mul(1e90), display: { title: "News Ticker", description: "Paper boosts tick speed" @@ -1068,7 +1073,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: toys.trucks, - cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.2, upgradeAmount.value).mul(1000), display: { title: "Haul wood in trucks", description: "Trucks multiply wood gain" @@ -1086,7 +1091,7 @@ const factory = createLayer(id, () => { }))], [createUpgrade(() => ({ resource: toys.woodenBlocks, - cost: () =>Decimal.pow(1.25, upgradeAmount.value).mul(1000), + cost: () =>Decimal.pow(1.2, upgradeAmount.value).mul(2000), display: { title: "Larger wood pieces", description: "Wooden block producers produce 3x as much" diff --git a/src/data/layers/toys.tsx b/src/data/layers/toys.tsx index 83c6417..370f43f 100644 --- a/src/data/layers/toys.tsx +++ b/src/data/layers/toys.tsx @@ -288,6 +288,15 @@ const layer = createLayer(id, function (this: BaseLayer) { visibility: () => showIf(milestone6.earned.value && main.days[factory.advancedDay - 1].opened.value) })) as GenericMilestone; + const milestone8 = createMilestone(() => ({ + display: { + requirement: "6000 toys", + effectDisplay: "Running out of energy? Let's increase the limit! Multiply energy capacity by 1.4" + }, + shouldEarn: () => Decimal.gte(toySum.value, 6000), + visibility: () => + showIf(milestone6.earned.value && main.days[factory.advancedDay - 1].opened.value) + })) as GenericMilestone; const milestones = { milestone1, milestone2, @@ -295,7 +304,8 @@ const layer = createLayer(id, function (this: BaseLayer) { milestone4, milestone5, milestone6, - milestone7 + milestone7, + milestone8 }; const { collapseMilestones, display: milestonesDisplay } = createCollapsibleMilestones(milestones); From 64022416b6679ce4c24ffe216c74084eb4f12487 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 22 Dec 2022 22:32:25 -0600 Subject: [PATCH 15/17] Fixed offsets on even factory sizes --- src/data/layers/factory.tsx | 86 +++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 0cdb359..943dc1c 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -100,13 +100,6 @@ const advancedToyGoal = 2000; function roundDownTo(num: number, multiple: number) { return Math.floor((num + multiple / 2) / multiple) * multiple; } -function getRelativeCoords(e: MouseEvent) { - const rect = (e.target as HTMLElement).getBoundingClientRect(); - return { - x: e.clientX - rect.left, - y: e.clientY - rect.top - }; -} function rotateDir(dir: Direction, relative = Direction.Right) { const directions = [Direction.Up, Direction.Right, Direction.Down, Direction.Left]; let index = directions.indexOf(dir); @@ -145,6 +138,15 @@ const factory = createLayer(id, () => { const bucketAndShovels = createResource(0, "shovel and pails"); const consoles = createResource(0, "consoles"); + function getRelativeCoords(e: MouseEvent) { + const rect = (e.target as HTMLElement).getBoundingClientRect(); + const offset = computedFactorySize.value % 2 === 0 ? -blockSize / 2 : 0; + return { + x: e.clientX - rect.left + offset, + y: e.clientY - rect.top + offset + }; + } + const energy = createSequentialModifier(() => [ createAdditiveModifier(() => ({ addend: () => Decimal.add(1, coal.coal.value).log10(), @@ -198,18 +200,20 @@ const factory = createLayer(id, () => { createMultiplicativeModifier(() => ({ multiplier: Decimal.add(paper.paper.value, 1).log10().div(100).add(1), description: "News Ticker", - enabled: () => upgrades[0][1].bought.value + enabled: () => upgrades[0][1].bought.value })), createMultiplicativeModifier(() => ({ - multiplier: Decimal.lt(energyEfficiency.value, 1)?1:Decimal.sub(2, Decimal.div(energyConsumption.value, computedEnergy.value)), + multiplier: Decimal.lt(energyEfficiency.value, 1) + ? 1 + : Decimal.sub(2, Decimal.div(energyConsumption.value, computedEnergy.value)), description: "Brighter work rooms", - enabled: () => upgrades[2][1].bought.value + enabled: () => upgrades[2][1].bought.value })), createMultiplicativeModifier(() => ({ multiplier: 1.5, description: "Carry ticks in boxes", - enabled: () => upgrades[2][3].bought.value - })), + enabled: () => upgrades[2][3].bought.value + })) ]); const computedTickRate = computed(() => tickRate.apply(1)); const factorySize = createSequentialModifier(() => [ @@ -1164,7 +1168,9 @@ const factory = createLayer(id, () => { ] // pixi - const upgradeAmount = computed(() => upgrades.flat().filter(u => u.bought.value).length) as ComputedRef + const upgradeAmount = computed( + () => upgrades.flat().filter(u => u.bought.value).length + ) as ComputedRef; // load every sprite here so pixi doesn't complain about loading multiple times const assetsLoading = Promise.all([ Assets.load(Object.values(FACTORY_COMPONENTS).map(x => x.imageSrc)), @@ -1231,8 +1237,6 @@ const factory = createLayer(id, () => { } } - updateGraphics(); - loaded = true; watchEffect(updateGraphics); }); @@ -1564,19 +1568,20 @@ const factory = createLayer(id, () => { graphicContainer.removeChild(hoverSprite); if (isMouseHoverShown.value && compSelected.value !== "cursor") { + // Offset half a block if factory size is even + const factorySizeOffset = computedFactorySize.value % 2 === 0 ? blockSize / 2 : 0; const { tx, ty } = spriteContainer.localTransform; + const x = + roundDownTo(mouseCoords.x - tx, blockSize) + factorySizeOffset + tx - blockSize / 2; + const y = + roundDownTo(mouseCoords.y - ty, blockSize) + factorySizeOffset + ty - blockSize / 2; graphicContainer.lineStyle(4, 0x808080, 1); - graphicContainer.drawRect( - roundDownTo(mouseCoords.x - tx, blockSize) + tx - blockSize / 2, - roundDownTo(mouseCoords.y - ty, blockSize) + ty - blockSize / 2, - blockSize, - blockSize - ); + graphicContainer.drawRect(x, y, blockSize, blockSize); const factoryBaseData = FACTORY_COMPONENTS[compSelected.value]; const sheet = Assets.get(factoryBaseData.imageSrc); hoverSprite = new Sprite(sheet); - hoverSprite.x = roundDownTo(mouseCoords.x - tx, blockSize) + tx - blockSize / 2; - hoverSprite.y = roundDownTo(mouseCoords.y - ty, blockSize) + ty - blockSize / 2; + hoverSprite.x = x; + hoverSprite.y = y; hoverSprite.width = blockSize; hoverSprite.height = blockSize; hoverSprite.alpha = 0.5; @@ -1744,7 +1749,6 @@ const factory = createLayer(id, () => { const hovered = ref(false); const componentsList = jsx(() => { return ( -
{ ); } - const hoveredComponent = jsx(() => - compHovered.value !== undefined ? ( + const hoveredComponent = jsx(() => { + if (compHovered.value == null) { + return ""; + } + const factorySizeOffset = computedFactorySize.value % 2 === 0 ? blockSize / 2 : 0; + const x = mouseCoords.x + factorySizeOffset; + const y = mouseCoords.y + factorySizeOffset; + const onRight = + x + (document.getElementById("factory-info")?.clientWidth ?? 0) > app.view.width - 30; + const onTop = + y + (document.getElementById("factory-info")?.clientHeight ?? 0) > app.view.height - 30; + return (
- app.view.width - 30 - ? { right: app.view.width - mouseCoords.x + "px" } - : { left: mouseCoords.x + 148 + "px" }), - ...(mouseCoords.y + - (document.getElementById("factory-info")?.clientHeight ?? 0) > - app.view.height - 30 - ? { bottom: app.view.height - mouseCoords.y + "px" } - : { top: mouseCoords.y + "px" }) + ...(onRight ? { right: app.view.width - x + "px" } : { left: x + 148 + "px" }), + ...(onTop ? { bottom: app.view.height - y + "px" } : { top: y + "px" }) }} >

{FACTORY_COMPONENTS[compHovered.value.type].name}

@@ -1864,10 +1870,8 @@ const factory = createLayer(id, () => { ) : undefined}
- ) : ( - "" - ) - ); + ); + }); const tabs = createTabFamily( { @@ -1930,7 +1934,7 @@ const factory = createLayer(id, () => { {renderRow(...Object.values(factoryBuyables))} - {renderGrid(...upgrades as VueFeature[][])} + {renderGrid(...(upgrades as VueFeature[][]))} )) })), From b102e720d5297c86b3aaf98137b3c46db71df564 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:42:26 +0000 Subject: [PATCH 16/17] balance --- src/data/layers/factory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 943dc1c..34c3500 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -1122,7 +1122,7 @@ const factory = createLayer(id, () => { })), createUpgrade(() => ({ resource: oil.oil, - cost: () =>Decimal.pow(2, upgradeAmount.value).mul(1e22), + cost: () =>Decimal.pow(1.5, upgradeAmount.value).mul(1e22), display: { title: "Capitalism", description: "Console production is tripled" From 957658d72a36dffd063746bb0b48440ae3048dc5 Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 04:44:22 +0000 Subject: [PATCH 17/17] finish balancing --- src/data/layers/factory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 34c3500..46384b4 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -92,7 +92,7 @@ const advancedDay = 19; const presentsDay = 20; const toyGoal = 750; -const advancedToyGoal = 2000; +const advancedToyGoal = 1500; // 20x20 block size // TODO: unhardcode stuff