From 0c72c54b18dcac151926319028055edee5bd82ec Mon Sep 17 00:00:00 2001 From: DCoded <dicoded@email.com> Date: Sat, 21 Aug 2021 16:04:40 -0400 Subject: [PATCH] Updated Nursery upgrades --- src/facilities/nursery/nursery.js | 48 +++++++++++++++++++------------ 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/facilities/nursery/nursery.js b/src/facilities/nursery/nursery.js index 1687bbaf404..69624c9b949 100644 --- a/src/facilities/nursery/nursery.js +++ b/src/facilities/nursery/nursery.js @@ -16,7 +16,6 @@ App.Facilities.Nursery.nursery = class Nursery extends App.Facilities.Facility { V.nextButton = "Back to Main"; V.nextLink = "Main"; - V.returnTo = "Nursery"; V.encyclopedia = "Nursery"; } @@ -77,11 +76,13 @@ App.Facilities.Nursery.nursery = class Nursery extends App.Facilities.Facility { "": ``, }; - if (!Object.keys(FS).includes(V.nurseryDecoration)) { + const res = FS[V.nurseryDecoration]; + + if (!res) { throw new Error(`Unknown V.nurseryDecoration value of '${V.nurseryDecoration}' found in decorations().`); } - return FS[V.nurseryDecoration]; + return res; } /** @returns {FC.Facilities.Expand} */ @@ -96,52 +97,61 @@ App.Facilities.Nursery.nursery = class Nursery extends App.Facilities.Facility { }; } - /** @returns {FC.Facilities.Upgrade[]} */ + /** @returns {FC.IUpgrade[]} */ get upgrades() { return [ { property: "nurseryWeight", - prereqs: [], tiers: [ { - value: 1, - base: `${this.facility.nameCaps} has only the most basic monitoring systems available.`, - upgraded: `The monitoring systems have been upgraded and allow for monitoring children's food intakes.`, + value: 0, + upgraded: 1, + text: `${this.facility.nameCaps} has only the most basic monitoring systems available.`, link: `Upgrade the monitoring system`, - cost: Math.trunc(1000 * V.upgradeMultiplierArcology), + cost: 1000 * V.upgradeMultiplierArcology, handler: () => V.PC.skill.engineering += 0.1, note: ` and will increase upkeep costs`, }, + { + value: 1, + text: `The monitoring systems have been upgraded and allow for monitoring children's food intakes.`, + }, ], }, { property: "nurseryMuscles", - prereqs: [], tiers: [ { - value: 1, - base: `There is space in one part of ${this.facility.name} where a playground and different toys and equipment could be installed to keep children fit and healthy.`, - upgraded: `A playground and various toys and equipment have been installed in one part of ${this.facility.name}.`, + value: 0, + upgraded: 1, + text: `There is space in one part of ${this.facility.name} where a playground and different toys and equipment could be installed to keep children fit and healthy.`, link: `Install a playground`, - cost: Math.trunc(1000 * V.upgradeMultiplierArcology), + cost: 1000 * V.upgradeMultiplierArcology, handler: () => V.PC.skill.engineering += 0.1, note: ` and will increase upkeep costs`, }, + { + value: 1, + text: `A playground and various toys and equipment have been installed in one part of ${this.facility.name}.`, + }, ], }, { property: "nurseryHormones", - prereqs: [], tiers: [ { - value: 1, - base: `${this.facility.nameCaps} doesn't have any sort of artificial hormones designed for children.`, - upgraded: `Hormones designed specifically for children have been developed for ${this.facility.name}.`, + value: 0, + upgraded: 1, + text: `${this.facility.nameCaps} doesn't have any sort of artificial hormones designed for children.`, link: `Invest in purpose-built hormones`, - cost: Math.trunc(1000 * V.upgradeMultiplierArcology), + cost: 1000 * V.upgradeMultiplierArcology, handler: () => V.PC.skill.engineering += 0.1, note: ` and will increase upkeep costs`, }, + { + value: 1, + text: `Hormones designed specifically for children have been developed for ${this.facility.name}.`, + }, ], }, ]; -- GitLab