From 35349780c66a976c3e6dcd43b043c0e08580164d Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 3 Jan 2021 14:19:54 -0500 Subject: [PATCH] progress --- src/facilities/penthouse/penthousePassage.js | 153 ++++++++++++++++++- 1 file changed, 152 insertions(+), 1 deletion(-) diff --git a/src/facilities/penthouse/penthousePassage.js b/src/facilities/penthouse/penthousePassage.js index dda1a9f2565..6439c7c8bfc 100644 --- a/src/facilities/penthouse/penthousePassage.js +++ b/src/facilities/penthouse/penthousePassage.js @@ -45,8 +45,9 @@ App.UI.managePenthouse = function() { function capacity() { const el = new DocumentFragment(); - const cost = Math.trunc(V.dormitory * 1000 * V.upgradeMultiplierArcology); + const cost = Math.trunc(V.dormitory * 1000 * V.upgradeMultiplierArcology); const options = new App.UI.OptionsGroup(); + App.UI.DOM.appendNewElement("h2", el, "Penthouse Capacity"); options.addOption(`The main penthouse dormitory has a capacity of ${V.dormitory} slaves.`) .customButton( "Expand the dormitory", @@ -79,18 +80,168 @@ App.UI.managePenthouse = function() { function facilities() { const el = new DocumentFragment(); const options = new App.UI.OptionsGroup(); + let option; + let desc; + const cost = Math.trunc(5000 * V.upgradeMultiplierArcology); + + App.UI.DOM.appendNewElement("h2", el, "Penthouse Facilities"); + option = options.addOption("Upgrade for master bedroom which turns it a harem for personal toys", "masterSuite", V); + if (!V.masterSuite) { + option.addValue("Purchase", 1, + () => { + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + option = options.addOption("Dormitory to house large numbers of house servants", "servantsQuarters", V); + if (!V.servantsQuarters) { + option.addValue("Purchase", 1, + () => { + V.servantsQuarters = 5; + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + option = options.addOption("A schoolroom where slaves can be educated", "schoolroom", V); + if (!V.schoolroom) { + option.addValue("Purchase", 5, + () => { + V.schoolroom = 5; + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + option = options.addOption("Open baths that provide relaxation space for resting slaves", "spa", V); + if (!V.spa) { + option.addValue("Purchase", 5, + () => { + V.spa = 5; + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + option = options.addOption("Clinic; a surgical recovery area to accommodate patients and a nurse", "clinic", V); + if (!V.clinic) { + option.addValue("Purchase", 5, + () => { + V.clinic = 5; + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + option = options.addOption("Cells to properly confine disobedient slaves", "cellblock", V); + if (!V.cellblock) { + option.addValue("Purchase", 5, + () => { + V.cellblock = 5; + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + if (V.seePreg !== 0) { + if (V.experimental.nursery === 1) { + option = options.addOption("A nursery to raise children from birth", "schoolroom", V); + if (!V.nursery) { + option.addValue("Purchase", 5, + () => { + V.nursery = 5; + V.nurseryNannies = 1; + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + } + if (V.arcologyUpgrade.grid === 1) { + option = options.addOption("Incubation chamber to rapidly age children", "incubator", V); + if (!V.incubator) { + option.addValue("Purchase", 1, + () => { + V.readySlaves = 0; + V.PC.skill.engineering += 1; + cashX(forceNeg(20 * cost), "capEx"); + } + ); + } + } else if (V.arcologyUpgrade.hydro === 1 || V.arcologyUpgrade.apron === 1) { + options.addOption("Installation of a child aging facility will require the arcology's electrical infrastructure to be overhauled."); + } + } + + option = options.addOption("A a small suite for a Head Girl to live in", "HGSuite", V); + if (V.HGSuite !== 1) { + option.addValue("Purchase", 1, + () => { + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + if (!V.dojo) { + desc = "Set up a personal armory to support a bodyguard"; + } else if (V.dojo === 1) { + desc = "There is a small armory next to your office that can support a bodyguard."; + } else { + desc = "There is a small armory next to your office that can support a bodyguard, with a little room for them to rest in when off duty."; + } + + option = options.addOption(desc, "dojo", V); + if (!V.dojo) { + option.addValue("Set up a personal armory to support a bodyguard", 1, + () => { + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } else if (V.dojo === 1) { + option.addValue("Upgrade the armory with a private room for the bodyguard", 2, + () => { + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + option = options.addOption("Workshop for making custom toys", "toyShop", V); + if (!V.toyShop) { + option.addValue("Purchase", true, + () => { + V.PC.skill.engineering += 1; + cashX(forceNeg(cost), "capEx"); + } + ); + } + + el.append(options.render()); return el; } function surgery() { const el = new DocumentFragment(); const options = new App.UI.OptionsGroup(); + + el.append(options.render()); return el; } function upgrades() { const el = new DocumentFragment(); const options = new App.UI.OptionsGroup(); + + el.append(options.render()); return el; } function refresh() { -- GitLab