From 8a1f63e8b88dd026eaac132d368371b83104c8fe Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Thu, 22 Dec 2022 02:49:51 +0000 Subject: [PATCH] add energy costs to wood stuff --- src/data/layers/factory.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index f51a103..ac9349c 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -16,6 +16,7 @@ import cursor from "./factory-components/cursor.jpg"; import rotate from "./factory-components/rotate_rectangle.png"; import Factory from "./Factory.vue"; import "./styles/factory.css"; +import coal from "./coal"; const id = "factory"; @@ -74,7 +75,7 @@ const factory = createLayer(id, () => { const name = "The Factory"; const color = "grey"; - const energy = computed(() => 100); + const energy = computed(() => Decimal.add(1, coal.coal.value).log10()); const energyConsumption = computed(() => Object.values(components.value) .map(c => FACTORY_COMPONENTS[c.type].energyCost ?? 0) @@ -118,6 +119,7 @@ const factory = createLayer(id, () => { imageSrc: wood, name: "Wood Machine", description: "Produces 1 wood every 1 second.", + energyCost: 10, tick: 1, outputs: { wood: { @@ -130,6 +132,7 @@ const factory = createLayer(id, () => { imageSrc: blocks, name: "Wooden Block Maker", description: "Turns 1 wood into 1 wooden block every second.", + energyCost: 20, tick: 1, inputs: { wood: {