From 4b651b416f5b3bb09dd928b5ea89207679b2ba9d Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 3 Jan 2021 20:09:41 -0500
Subject: [PATCH] convert manage penthouse page to js

---
 src/005-passages/facilitiesPassages.js       |   3 +-
 src/facilities/penthouse/managePenthouse.tw  | 454 -------------------
 src/facilities/penthouse/penthousePassage.js | 359 ++++++++++++++-
 3 files changed, 355 insertions(+), 461 deletions(-)
 delete mode 100644 src/facilities/penthouse/managePenthouse.tw

diff --git a/src/005-passages/facilitiesPassages.js b/src/005-passages/facilitiesPassages.js
index 546d9423f83..095beed8ac1 100644
--- a/src/005-passages/facilitiesPassages.js
+++ b/src/005-passages/facilitiesPassages.js
@@ -77,7 +77,7 @@ new App.DomPassage("Toy Shop",
 		return App.UI.toyShop();
 	}, ["jump-to-safe", "jump-from-safe"]
 );
-/*
+
 new App.DomPassage("Manage Penthouse",
 	() => {
 		V.nextButton = "Back";
@@ -86,4 +86,3 @@ new App.DomPassage("Manage Penthouse",
 		return App.UI.managePenthouse();
 	}, ["jump-to-safe", "jump-from-safe"]
 );
-*/
\ No newline at end of file
diff --git a/src/facilities/penthouse/managePenthouse.tw b/src/facilities/penthouse/managePenthouse.tw
deleted file mode 100644
index 0173649ed66..00000000000
--- a/src/facilities/penthouse/managePenthouse.tw
+++ /dev/null
@@ -1,454 +0,0 @@
-:: Manage Penthouse [nobr jump-to-safe jump-from-safe]
-
-<<set $nextButton = "Back", $nextLink = "Main", $encyclopedia = "What the Upgrades Do">>
-<h1>DOM</h1>
-	<<includeDOM App.UI.managePenthouse()>>
-<h1>SC</h1>
-<<if $cheatMode == 1>>
-	<div class="cheat-menu">[[Cheat Edit Arcology|MOD_Edit Arcology Cheat][$cheater = 1]]</div>
-<</if>>
-
-<h1>Penthouse</h1>
-
-<p>
-	<div class="scene-intro">
-		<<includeDOM App.Desc.officeDescription($PC.career == "mercenary" ? "You look back at the rifle. It could never hold a zero, and would fail to feed if it wasn't given just the right amount of lubricant. But sometimes, you'd give anything for one more mission with that shitty old rifle." :"")>>
-	</div>
-
-	<div>
-	<<if $SF.Toggle && $SF.Active >= 1>>
-		<br>
-		<<link "Take your express elevator down to $SF.Lower""Firebase">> <</link>>
-	<<elseif $SF.FS.Tension > 100>>
-		<<= App.SF.fsIntegration.badOutcome_Firebase()>>
-	<</if>>
-	</div>
-</p>
-
-<h2>Penthouse Capacity</h2>
-
-<p>
-	<div>
-	The main penthouse dormitory, which houses slaves who aren't living in a facility and aren't granted a luxurious standard of living, has a capacity of ''$dormitory'' slaves.
-	[[Expand the dormitory|Manage Penthouse][cashX(forceNeg(Math.trunc($dormitory*1000*$upgradeMultiplierArcology)), "capEx"), $dormitory += 10, $PC.skill.engineering += .1]]
-	<span class="detail">
-		Costs <<print cashFormat(Math.trunc($dormitory*1000*$upgradeMultiplierArcology))>>
-		<div class="indent">Exceeding this limit is bad for slaves' health, devotion and trust.</div>
-	</span>
-	</div>
-
-	<div>
-	The penthouse also features little individual rooms, which house slaves who do enjoy a luxurious standard of living. They have a capacity of ''$rooms'' slaves.
-	[[Expand the rooms|Manage Penthouse][cashX(forceNeg(Math.trunc($rooms*1000*$upgradeMultiplierArcology)), "capEx"), $rooms += 5, $PC.skill.engineering += .1]]
-	<span class="detail">
-		Costs <<print cashFormat(Math.trunc($rooms*1000*$upgradeMultiplierArcology))>>
-		<div class="indent">The number of rooms determines the number of slaves that can be granted luxury.</div>
-	</span>
-	</div>
-</p>
-
-<h2>Penthouse Facilities</h2>
-
-<p>
-	<div>
-		<<if $masterSuite == 0>>
-			[[Improve your master bedroom to house a harem of personal toys|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $masterSuite = 1, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			Your penthouse is capped by a master suite with room for an entire harem of personal toys.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $servantsQuarters == 0>>
-			[[Build a dormitory to house large numbers of house servants|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $servantsQuarters = 5, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			Your penthouse includes a dormitory to house large numbers of house servants.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $schoolroom == 0>>
-			[[Build a schoolroom where slaves can be educated|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $schoolroom = 5, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			Your penthouse includes a schoolroom where slaves can be educated.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $spa == 0>>
-			[[Install open baths to provide relaxation space for resting slaves|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $spa = 5, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			The penthouse includes a fully appointed spa where slaves can rest and recuperate.
-		<</if>>
-	</div>
-
-	<<if $seePreg != 0>>
-		<<if $experimental.nursery == 1>>
-			<div>
-				<<if $nursery == 0>>
-					[[Build a nursery to raise children from birth|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $nursery = 5, $nurseryNannies = 1, $PC.skill.engineering += 1]]
-					<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-				<<else>>
-					The penthouse has a nursery built where infants can be brought up.
-				<</if>>
-			</div>
-		<</if>>
-	<</if>>
-
-	<div>
-		<<if $clinic == 0>>
-			[[Expand the surgical recovery area to accommodate patients and a nurse|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $clinic = 5, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			The surgical recovery area has been expanded to take in more unhealthy slaves and be staffed by a nurse.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $cellblock == 0>>
-			[[Construct cells to properly confine disobedient slaves|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $cellblock = 5, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			The lower level of the penthouse includes a hallway of cells to confine slaves in.
-		<</if>>
-	</div>
-
-	<<if $seePreg != 0>>
-		<div>
-			<<if $arcologyUpgrade.grid == 1>>
-				<<if $incubator == 0>>
-					[[Install an incubation chamber to rapidly age children|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $incubator = 1, $PC.skill.engineering += 1, $readySlaves = 0]]
-					<span class="detail">Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>></span>
-				<<else>>
-					The penthouse has a specialized facility dedicated to rapidly aging children.
-				<</if>>
-			<<elseif $arcologyUpgrade.hydro == 1 || $arcologyUpgrade.apron == 1>>
-				<span class="note">Installation of a child aging facility will require the arcology's electrical infrastructure to be overhauled.</span>
-			<</if>>
-		</div>
-	<</if>>
-</p>
-
-<h2>Minor Facilities</h2>
-
-<p>
-	<div>
-		<<if $HGSuite != 1>>
-			[[Build a small suite for a Head Girl to live in|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $HGSuite = 1, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			There is a small but handsome suite next to yours reserved for the Head Girl.
-		<</if>>
-	</div>
-	<div>
-		<<if $dojo == 0>>
-			[[Set up a personal armory to support a bodyguard|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $dojo = 1, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<elseif $dojo == 1>>
-			There is a small armory next to your office that can support a bodyguard. [[Upgrade the armory with a private room for the bodyguard|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $dojo = 2, $PC.skill.engineering += .5]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			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.
-		<</if>>
-	</div>
-	<div>
-		<<if !$toyShop>>
-			[[Install a workshop for making custom toys|Manage Penthouse][cashX(-10000, "capEx"), $toyShop = true, $PC.skill.engineering += .1]]
-			<span class="detail">Costs <<print cashFormat(10000)>></span>
-		<<else>>
-			There is a [[workshop|Toy Shop]] for making custom toys.
-		<</if>>
-	</div>
-	<div>
-		<<if $surgeryUpgrade == 0>>
-			<<if $rep > 10000>>
-				[[Upgrade the remote surgery|Manage Penthouse][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $surgeryUpgrade = 1, $PC.skill.engineering += 1]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>></span>
-			<<else>>
-				<span class="note">You lack the reputation to secure rare surgery upgrades.</span>
-			<</if>>
-		<<else>>
-			Your remote surgery has been heavily upgraded and customized.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $dispensary == 0>>
-			<<if $rep > 2000>>
-				[[Install a pharmaceutical fabricator|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $dispensary = 1, $drugsCost = $drugsCost*.75, $PC.skill.engineering += .1]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>></span>
-			<<else>>
-				<span class="note">You lack the reputation to obtain cutting-edge pharmaceutical technology.</span>
-			<</if>>
-		<<else>>
-			There is a [[pharmaceutical fabricator|Dispensary]] attached to the surgery.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $ImplantProductionUpgrade == 0>>
-			<<if $rep > 2000>>
-				[[Install an implant manufactory|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $ImplantProductionUpgrade = 1, $PC.skill.engineering += .1]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>></span>
-			<<else>>
-				<span class="note">You lack the reputation to obtain cutting-edge implant fabrication technology.</span>
-			<</if>>
-		<<else>>
-			There is a [[implant manufactory|Implant Manufactory]] attached to the surgery.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $organFarmUpgrade == 0>>
-			<<if $rep > 10000>>
-				[[Install an experimental organ farm|Manage Penthouse][cashX(forceNeg(Math.trunc(70000*$upgradeMultiplierArcology)), "capEx"), $organFarmUpgrade = 1, $PC.skill.engineering += .1]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(70000*$upgradeMultiplierArcology))>></span>
-			<<else>>
-				<span class="note">You lack the reputation to obtain an experimental organ fabricator.</span>
-			<</if>>
-		<<else>>
-			There is an [[organ farm|Organ Farm]] attached to the surgery.
-		<</if>>
-	</div>
-
-	<div>
-		<<if $geneticMappingUpgrade == 0>>
-			<<if $rep > 14000>>
-				[[Install a genetic sequencer|Manage Penthouse][cashX(-120000, "capEx"), $geneticMappingUpgrade = 1, $PC.skill.engineering += .1]]
-				<span class="detail">Costs <<print cashFormat(120000)>></span>
-			<<else>>
-				<span class="note">You lack the reputation to purchase a cutting-edge genetic sequencer</span>
-			<</if>>
-		<<else>>
-			There is a [[genetic sequencer|Gene Lab]] attached to the surgery.
-		<</if>>
-	</div>
-
-	<div>
-		<<switch $prostheticsUpgrade>>
-			<<case 0>>
-				<<if ($rep > 8000)>>
-					[[Install basic equipment for attaching and maintenance of prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 1, $PC.skill.engineering += 1]]
-					<span class="detail">Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>></span>
-				<<else>>
-					<span class="note">You lack the reputation to buy basic equipment for attaching and maintenance of prosthetics.</span>
-				<</if>>
-			<<case 1>>
-				You have basic equipment for attaching and maintenance of prosthetics.
-				<<if ($rep > 12000)>>
-					[[Buy a contract for advanced prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 2]]
-					<span class="detail">Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>></span>
-				<<else>>
-					<span class="note">You lack the reputation to get a contract for advanced prosthetics.</span>
-				<</if>>
-			<<case 2>>
-				You have basic equipment for attaching and maintenance of prosthetics and a contract to guarantee the availability of advanced prosthetics.
-				<<if ($rep > 16000)>>
-					[[Buy a contract for high-tech prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 3]]
-					<span class="detail">Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>></span>
-				<<else>>
-					<span class="note">You lack the reputation to get a contract for high-tech prosthetics.</span>
-				<</if>>
-			<<case 3>>
-				You have basic equipment for attaching and maintenance of prosthetics and a contract to guarantee the availability of high-tech prosthetics.
-		<</switch>>
-	</div>
-
-	<<if $prostheticsUpgrade > 0>>
-		<div>
-			<<if $researchLab.level > 0>>
-				Your penthouse is equipped with an advanced prosthetic lab.
-			<<else>>
-				[[Clear out one of the floors and install equipment to construct prosthetics yourself|Manage Penthouse][cashX(forceNeg(Math.trunc(150000*$upgradeMultiplierArcology)), "capEx"), $researchLab.level = 1, $researchLab.maxSpace = 5, $PC.skill.engineering += 1]]
-				<span class="detail">
-					Costs <<print cashFormat(Math.trunc(150000*$upgradeMultiplierArcology))>>
-					<div class="indent">
-						Buying the equipment to construct prosthetics yourself is expensive but if you plan to construct many prosthetics it will pay out in the long run.
-					</div>
-				</span>
-			<</if>>
-		</div>
-	<</if>>
-
-	<<if $seePreg == 1>>
-		<div>
-			<<if $pregnancyMonitoringUpgrade == 0>>
-				<<if $rep > 10000>>
-					[[Upgrade the pregnancy monitoring systems|Manage Penthouse][cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "capEx"), $pregnancyMonitoringUpgrade = 1, $PC.skill.engineering += 1]]
-					<span class="detail">Costs <<print cashFormat(Math.trunc(30000*$upgradeMultiplierArcology))>></span>
-				<<else>>
-					<span class="note">You lack the reputation to purchase improved pregnancy monitoring systems.</span>
-				<</if>>
-			<<else>>
-				Your pregnancy monitoring systems have been heavily upgraded.
-			<</if>>
-		</div>
-	<</if>>
-</p>
-
-<h2>Penthouse Upgrades</h2>
-
-<p>
-	<div>
-	<<if $servantMilkers != 1>>
-		Your penthouse is equipped with basic milkers for lactating slaves. [[Install more and tie them into the liquid systems|Manage Penthouse][cashX(forceNeg(Math.trunc(25000*$upgradeMultiplierArcology)), "capEx"), $servantMilkers = 1, $PC.skill.engineering += .1]]
-		<span class="detail">Costs <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>></span>
-	<<else>>
-		Every room in the penthouse is equipped with milkers tied into the liquid systems, letting slaves with full udders drain them anywhere.
-	<</if>>
-	</div>
-
-	<div>
-	<<if $boobAccessibility != 1>>
-		<<if $pregAccessibility == 1 || $ballsAccessibility || $buttAccessibility>>
-			Your penthouse has already been widened for overly wide slaves but there are no special accommodations for slaves with enormous breasts. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $boobAccessibility = 1, $PC.skill.engineering += .5]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			Your penthouse has no special accessibility provisions for slaves with enormous breasts. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $boobAccessibility = 1, $PC.skill.engineering += 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>></span>
-		<</if>>
-	<<else>>
-		The entire penthouse has been remodeled to make life with enormous breasts easier. The doorways have been widened, and tables, sinks, and other items now have two levels: one at shoulder height for slaves to use, and another at waist height for them to rest their tits on while they do.
-	<</if>>
-	</div>
-
-	<<if $seeHyperPreg == 1>>
-		<div>
-		<<if $pregAccessibility != 1>>
-			<<if $boobAccessibility == 1 || $ballsAccessibility || $buttAccessibility>>
-				Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with enormous pregnancies. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $pregAccessibility = 1, $PC.skill.engineering += .5]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>></span>
-			<<else>>
-				Your penthouse has no special accessibility provisions for slaves with enormous pregnancies. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $pregAccessibility = 1, $PC.skill.engineering += 1]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>></span>
-			<</if>>
-		<<else>>
-			The entire penthouse has been remodeled to make life with enormous pregnancies easier. The doorways have been widened, and tables, sinks, and other items are now designed to work around a massively distended belly.
-		<</if>>
-		</div>
-	<</if>>
-
-	<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
-		<div>
-		<<if $dickAccessibility != 1>>
-			Your penthouse has no special accessibility provisions for slaves with enormous dicks. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $dickAccessibility = 1, $PC.skill.engineering += .5]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			The entire penthouse has been remodeled to make life with enormous dicks easier. Carts, slings and harnesses are available to keep things from dragging and there is now plenty of room for huge genitals to occupy when a slave must use appliances, tables and seats.
-		<</if>>
-		</div>
-
-		<div>
-		<<if $ballsAccessibility != 1>>
-			<<if $boobAccessibility == 1 || $buttAccessibility || $pregAccessibility>>
-				Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with enormous testicles. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $ballsAccessibility = 1, $PC.skill.engineering += .5]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>></span>
-			<<else>>
-				Your penthouse has no special accessibility provisions for slaves with enormous testicles. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $ballsAccessibility = 1, $PC.skill.engineering += 1]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>></span>
-			<</if>>
-		<<else>>
-			The entire penthouse has been remodeled to make life with enormous testicles easier. The doorways have been widened, tables, sinks, and other items are now designed to fit over giant balls, drains have been widened to allow excessive cum to flow easier, and seats have been specially altered to allow plenty of ball room for seated slaves.
-		<</if>>
-		</div>
-
-		<div>
-		<<if $buttAccessibility != 1>>
-			<<if $boobAccessibility == 1 || $dickAccessibility || $ballsAccessibility>>
-				Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with gigantic posteriors. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $buttAccessibility = 1, $PC.skill.engineering += .5]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>></span>
-			<<else>>
-				Your penthouse has no special accessibility provisions for slaves with enormous posteriors. [[Remodel for accessibility|Manage Penthouse][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $buttAccessibility = 1, $PC.skill.engineering += 1]]
-				<span class="detail">Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>></span>
-			<</if>>
-		<<else>>
-			The entire penthouse has been remodeled to make life with enormous rears easier. The doorways have been widened, and anything that can be sat on is now extra, extra wide and reinforced to allow even the heaviest, biggest asses to comfortably rest upon it.
-		<</if>>
-		</div>
-	<</if>>
-
-	<<if $boobAccessibility > 0 || $pregAccessibility > 0 || $dickAccessibility > 0 || $ballsAccessibility > 0 || $buttAccessibility > 0>>
-		<<set _removeCost = Math.trunc(((5000*($boobAccessibility+$pregAccessibility+$dickAccessibility+$ballsAccessibility+$buttAccessibility)))*$upgradeMultiplierArcology)>>
-		<div class="detail">
-			[[Remove the accessibility renovations|Manage Penthouse][cashX(forceNeg(_removeCost), "capEx"), $boobAccessibility = 0, $pregAccessibility = 0, $dickAccessibility = 0, $ballsAccessibility = 0, $buttAccessibility = 0]] Will cost <<print cashFormat(_removeCost)>>
-		</div>
-	<</if>>
-
-	<div>
-	<<if $feeder == 0>>
-		[[Upgrade the kitchen's nutritional sensing systems|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $feeder = 1, $PC.skill.engineering += .1]]
-		<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-	<<else>>
-		The kitchen mounts sensors to refine diets in real time.
-	<</if>>
-	</div>
-
-	<div>
-	<<if $cockFeeder == 0>>
-		[[Enhance the feeding system with faux phalli|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $cockFeeder = 1, $PC.skill.engineering += .1]]
-		<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-	<<else>>
-		The kitchen dispenses food from phalli slaves must suck off in order to eat. <span class="detail">[[Remove them|Manage Penthouse][$cockFeeder = 0]]</span>
-	<</if>>
-	</div>
-
-	<div>
-	<<if $suppository == 0>>
-		[[Replace the drug dispensers with reciprocating dildo suppositories|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $suppository = 1, $PC.skill.engineering += .1]]
-		<span class="detail">Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>></span>
-	<<else>>
-		The kitchen applies drugs that can be absorbed rectally by assfucking slaves with dildos that cum the pharmaceuticals. <span class="detail">[[Remove them|Manage Penthouse][$suppository = 0]]</span>
-	<</if>>
-	</div>
-
-	<div>
-	<<if $dairy != 0>>
-		<<if $dairyPiping == 0>>
-			[[Install pipes connecting the Dairy to the rest of your penthouse for use in enema play|Manage Penthouse][cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx"), $dairyPiping = 1, $PC.skill.engineering += .5]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			Various taps around the penthouse supply product from $dairyName for use in enema play and force-feeding.
-		<</if>>
-	<<elseif $dairyPiping == 1>>
-		Various taps around the penthouse supply product from $dairyName for use in enema play and force-feeding. With no dairy to draw from, they are currently unused.
-	<</if>>
-	</div>
-
-	<<if $seePee == 1>>
-		<div>
-		<<if $wcPiping == 0>>
-			[[Install pipes connecting the slave bathrooms to the rest of your penthouse for use in watersports|Manage Penthouse][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $wcPiping = 1, $PC.skill.engineering += .5]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			The plumbing underneath the slave bathrooms connects to various taps throughout the penthouse that can dispense its contents when needed.
-		<</if>>
-		</div>
-	<</if>>
-
-	<div>
-	<<if $studio == 0>>
-		[[Install a media hub to convert slave video feeds into pornography|Manage Penthouse][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $studio = 1, $PC.skill.engineering += 1]]
-		<span class="detail">Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>></span>
-	<<else>>
-		The arcology's video systems are connected to a media hub that can convert slave video feeds into pornography.
-		<<if $studioFeed == 0>>
-			[[Upgrade the media hub to allow better control of pornographic content|Manage Penthouse][cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx"), $studioFeed = 1]]
-			<span class="detail">Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>></span>
-		<<else>>
-			It has been upgraded to allow superior control of a slave's pornographic content.
-		<</if>>
-	<</if>>
-	</div>
-</p>
-
-<p>
-	<<if $rep >= 10000>>
-		[[Black Market|The Black Market]]
-	<<else>>
-		You lack the reputation (<<= num(10000)>>) to be invited to the underground Black Market.
-	<</if>>
-</p>
diff --git a/src/facilities/penthouse/penthousePassage.js b/src/facilities/penthouse/penthousePassage.js
index 1ef262cde6c..86b55fd2434 100644
--- a/src/facilities/penthouse/penthousePassage.js
+++ b/src/facilities/penthouse/penthousePassage.js
@@ -13,6 +13,7 @@ App.UI.managePenthouse = function() {
 		el.append(major());
 		el.append(minor());
 		el.append(upgrades());
+		el.append(blackMarket());
 		return el;
 	}
 
@@ -106,27 +107,33 @@ App.UI.managePenthouse = function() {
 		} else {
 			r.push(`Your penthouse is capped by a master suite with room for an entire harem of personal toys.`);
 		}
+		App.Events.addNode(el, r, "div");
 
+		r = [];
 		if (V.servantsQuarters === 0) {
 			r.push(makeLink("Build a dormitory to house large numbers of house servants", () => { V.servantsQuarters = 5; }));
 		} else {
 			r.push(`Your penthouse includes a dormitory to house large numbers of house servants.`);
 		}
+		App.Events.addNode(el, r, "div");
 
-
-
+		r = [];
 		if (V.schoolroom === 0) {
 			r.push(makeLink("Build a schoolroom where slaves can be educated", () => { V.schoolroom = 5; }));
 		} else {
 			r.push(`Your penthouse includes a schoolroom where slaves can be educated.`);
 		}
+		App.Events.addNode(el, r, "div");
 
+		r = [];
 		if (V.spa === 0) {
 			r.push(makeLink("Install open baths to provide relaxation space for resting slaves", () => { V.spa = 5; }));
 		} else {
 			r.push(`The penthouse includes a fully appointed spa where slaves can rest and recuperate.`);
 		}
+		App.Events.addNode(el, r, "div");
 
+		r = [];
 		if (V.seePreg !== 0) {
 			if (V.experimental.nursery === 1) {
 				if (V.nursery === 0) {
@@ -139,21 +146,25 @@ App.UI.managePenthouse = function() {
 				}
 			}
 		}
+		App.Events.addNode(el, r, "div");
 
-
+		r = [];
 		if (V.clinic === 0) {
 			r.push(makeLink("Expand the surgical recovery area to accommodate patients and a nurse", () => { V.clinic = 5; }));
 		} else {
 			r.push(`The surgical recovery area has been expanded to take in more unhealthy slaves and be staffed by a nurse.`);
 		}
+		App.Events.addNode(el, r, "div");
 
+		r = [];
 		if (V.cellblock === 0) {
 			r.push(makeLink("Construct cells to properly confine disobedient slaves", () => { V.cellblock = 5; }));
 		} else {
 			r.push(`The lower level of the penthouse includes a hallway of cells to confine slaves in.`);
 		}
+		App.Events.addNode(el, r, "div");
 
-
+		r = [];
 		if (V.seePreg !== 0) {
 			if (V.arcologyUpgrade.grid === 1) {
 				if (V.incubator === 0) {
@@ -168,21 +179,358 @@ App.UI.managePenthouse = function() {
 				r.push(App.UI.DOM.makeElement("span", "Installation of a child aging facility will require the arcology's electrical infrastructure to be overhauled.", "note"));
 			}
 		}
-
+		App.Events.addNode(el, r, "div");
 
 		return el;
 	}
 
 	function minor() {
 		const el = new DocumentFragment();
+		let r = [];
 		App.UI.DOM.appendNewElement("h2", el, "Minor Penthouse Facilities");
 
+		if (V.HGSuite !== 1) {
+			r.push(makeLink("Build a small suite for a Head Girl to live in", () => { V.HGSuite = 1; }));
+		} else {
+			r.push(`There is a small but handsome suite next to yours reserved for the Head Girl.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.dojo === 0) {
+			r.push(makeLink("Set up a personal armory to support a bodyguard", () => { V.dojo = 1; }));
+		} else if (V.dojo === 1) {
+			r.push(`There is a small armory next to your office that can support a bodyguard.`);
+			r.push(makeLink("Upgrade the armory with a private room for the bodyguard", () => { V.dojo = 2; }));
+		} else {
+			r.push(`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.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (!V.toyShop) {
+			r.push(makeLink("Install a workshop for making custom toys", () => { V.toyShop = true; }));
+		} else {
+			r.push(`There is a`);
+			r.push(App.UI.DOM.passageLink("workshop", "Toy Shop"));
+			r.push(`for making custom toys.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.surgeryUpgrade === 0) {
+			if (V.rep > 10000) {
+				r.push(makeLink("Upgrade the remote surgery", () => { V.surgeryUpgrade = 1; }, 50000));
+			} else {
+				r.push(App.UI.DOM.makeElement("span", "You lack the reputation to secure rare surgery upgrades.", "note"));
+			}
+		} else {
+			r.push(`Your remote surgery has been heavily upgraded and customized.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.dispensary === 0) {
+			if (V.rep > 2000) {
+				r.push(makeLink("Install a pharmaceutical fabricator", () => {
+					V.dispensary = 1;
+					V.drugsCost = V.drugsCost * .75;
+				}, 20000));
+			} else {
+				r.push(App.UI.DOM.makeElement("span", "You lack the reputation to obtain cutting-edge pharmaceutical technology.", "note"));
+			}
+		} else {
+			r.push(`There is a`);
+			r.push(App.UI.DOM.passageLink("pharmaceutical fabricator", "Dispensary"));
+			r.push(`attached to the surgery.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.ImplantProductionUpgrade === 0) {
+			if (V.rep > 2000) {
+				r.push(makeLink("Install an implant manufactory", () => { V.ImplantProductionUpgrade = 1; }, 20000));
+			} else {
+				r.push(App.UI.DOM.makeElement("span", "You lack the reputation to obtain cutting-edge implant fabrication technology.", "note"));
+			}
+		} else {
+			r.push(`There is a`);
+			r.push(App.UI.DOM.passageLink("implant manufactory", "Implant Manufactory"));
+			r.push(`attached to the surgery.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.organFarmUpgrade === 0) {
+			if (V.rep > 10000) {
+				r.push(makeLink("Install an experimental organ farm", () => { V.organFarmUpgrade = 1; }, 70000));
+			} else {
+				r.push(App.UI.DOM.makeElement("span", "You lack the reputation to obtain an experimental organ fabricator.", "note"));
+			}
+		} else {
+			r.push(`There is a`);
+			r.push(App.UI.DOM.passageLink("organ farm", "Organ Farm"));
+			r.push(`attached to the surgery.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.geneticMappingUpgrade === 0) {
+			if (V.rep > 14000) {
+				r.push(makeLink("Install a genetic sequencer", () => { V.geneticMappingUpgrade = 1; }, 120000));
+			} else {
+				r.push(App.UI.DOM.makeElement("span", "You lack the reputation to purchase a cutting-edge genetic sequencer.", "note"));
+			}
+		} else {
+			r.push(`There is a`);
+			r.push(App.UI.DOM.passageLink("genetic sequencer", "Gene Lab"));
+			r.push(`attached to the surgery.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		switch (V.prostheticsUpgrade) {
+			case 0:
+				if (V.rep > 8000) {
+					r.push(makeLink("Install basic equipment for attaching and maintenance of prosthetics", () => { V.prostheticsUpgrade = 1; }, 120000));
+				} else {
+					r.push(App.UI.DOM.makeElement("span", "You lack the reputation to buy basic equipment for attaching and maintenance of prosthetics.", "note"));
+				}
+				break;
+			case 1:
+				r.push(`You have basic equipment for attaching and maintenance of prosthetics.`);
+				if (V.rep > 12000) {
+					r.push(makeLink("Buy a contract for advanced prosthetics", () => { V.prostheticsUpgrade = 2; }, 100000));
+				} else {
+					r.push(App.UI.DOM.makeElement("span", "You lack the reputation to get a contract for advanced prosthetics.", "note"));
+				}
+				break;
+			case 2:
+				r.push(`You have basic equipment for attaching and maintenance of prosthetics and a contract to guarantee the availability of advanced prosthetics.`);
+				if (V.rep > 16000) {
+					r.push(makeLink("Buy a contract for high-tech prosthetics", () => { V.prostheticsUpgrade = 3; }, 100000));
+				} else {
+					r.push(App.UI.DOM.makeElement("span", "You lack the reputation to get a contract for high-tech prosthetics.", "note"));
+				}
+				break;
+			case 3:
+				r.push(`You have basic equipment for attaching and maintenance of prosthetics and a contract to guarantee the availability of high-tech prosthetics.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.prostheticsUpgrade > 0) {
+			if (V.researchLab.level > 0) {
+				r.push(`Your penthouse is equipped with an advanced prosthetic lab.`);
+			} else {
+				r.push(makeLink("Clear out one of the floors and install equipment to construct prosthetics yourself|Manage Penthouse", () => {
+					V.researchLab.level = 1;
+					V.researchLab.maxSpace = 5;
+				}, 150000));
+				r.push(App.UI.DOM.makeElement("div", `Buying the equipment to construct prosthetics yourself is expensive but if you plan to construct many prosthetics it will pay out in the long run.`, "indent"));
+			}
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.seePreg === 1) {
+			if (V.pregnancyMonitoringUpgrade === 0) {
+				if (V.rep > 10000) {
+					r.push(makeLink("Upgrade the pregnancy monitoring systems", () => { V.pregnancyMonitoringUpgrade = 3; }, 30000));
+				} else {
+					r.push(App.UI.DOM.makeElement("span", "You lack the reputation to purchase improved pregnancy monitoring systems.", "note"));
+				}
+			} else {
+				r.push(`Your pregnancy monitoring systems have been heavily upgraded.`);
+			}
+		}
+
 		return el;
 	}
 
 	function upgrades() {
 		const el = new DocumentFragment();
+		let r = [];
+		App.UI.DOM.appendNewElement("h2", el, "Penthouse Upgrades");
+
+		if (V.servantMilkers !== 1) {
+			r.push("Your penthouse is equipped with basic milkers for lactating slaves.");
+			r.push(makeLink("Install more and tie them into the liquid systems", () => { V.servantMilkers = 1; }, 25000));
+		} else {
+			r.push(`Every room in the penthouse is equipped with milkers tied into the liquid systems, letting slaves with full udders drain them anywhere.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.boobAccessibility !== 1) {
+			if (V.pregAccessibility === 1 || V.ballsAccessibility || V.buttAccessibility) {
+				r.push(`Your penthouse has already been widened for overly wide slaves but there are no special accommodations for slaves with enormous breasts.`);
+				r.push(makeLink("Remodel for accessibility", () => { V.boobAccessibility = 1; }, 20000));
+			} else {
+				r.push(`Your penthouse has no special accessibility provisions for slaves with enormous breasts.`);
+				r.push(makeLink("Remodel for accessibility", () => { V.boobAccessibility = 1; }, 50000));
+			}
+		} else {
+			r.push(`The entire penthouse has been remodeled to make life with enormous breasts easier. The doorways have been widened, and tables, sinks, and other items now have two levels: one at shoulder height for slaves to use, and another at waist height for them to rest their tits on while they do.`);
+		}
+		App.Events.addNode(el, r, "div");
 
+		r = [];
+		if (V.seeHyperPreg === 1) {
+			if (V.pregAccessibility !== 1) {
+				if (V.boobAccessibility === 1 || V.ballsAccessibility || V.buttAccessibility) {
+					r.push(`Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with enormous pregnancies.`);
+					r.push(makeLink("Remodel for accessibility", () => { V.pregAccessibility = 1; }, 20000));
+				} else {
+					r.push(`Your penthouse has no special accessibility provisions for slaves with enormous pregnancies.`);
+					r.push(makeLink("Remodel for accessibility", () => { V.pregAccessibility = 1; }, 50000));
+				}
+			} else {
+				r.push(`The entire penthouse has been remodeled to make life with enormous pregnancies easier. The doorways have been widened, and tables, sinks, and other items are now designed to work around a massively distended belly.`);
+			}
+		}
+		App.Events.addNode(el, r, "div");
+
+		if (V.arcologies[0].FSAssetExpansionistResearch === 1) {
+			r = [];
+			if (V.dickAccessibility !== 1) {
+				r.push(`Your penthouse has no special accessibility provisions for slaves with enormous dicks.`);
+				r.push(makeLink("Remodel for accessibility", () => { V.dickAccessibility = 1; }, 20000));
+			} else {
+				r.push(`The entire penthouse has been remodeled to make life with enormous dicks easier. Carts, slings and harnesses are available to keep things from dragging and there is now plenty of room for huge genitals to occupy when a slave must use appliances, tables and seats.`);
+			}
+			App.Events.addNode(el, r, "div");
+
+			r = [];
+			if (V.ballsAccessibility !== 1) {
+				if (V.boobAccessibility === 1 || V.buttAccessibility || V.pregAccessibility) {
+					r.push(`Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with enormous testicles.`);
+					r.push(makeLink("Remodel for accessibility", () => { V.ballsAccessibility = 1; }, 20000));
+				} else {
+					r.push(`Your penthouse has no special accessibility provisions for slaves with enormous testicles.`);
+					r.push(makeLink("Remodel for accessibility", () => { V.ballsAccessibility = 1; }, 50000));
+				}
+			} else {
+				r.push(`The entire penthouse has been remodeled to make life with enormous testicles easier. The doorways have been widened, tables, sinks, and other items are now designed to fit over giant balls, drains have been widened to allow excessive cum to flow easier, and seats have been specially altered to allow plenty of ball room for seated slaves.`);
+			}
+			App.Events.addNode(el, r, "div");
+
+			r = [];
+			if (V.buttAccessibility !== 1) {
+				if (V.boobAccessibility === 1 || V.dickAccessibility || V.ballsAccessibility) {
+					r.push(`Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with gigantic posteriors.`);
+					r.push(makeLink("Remodel for accessibility", () => { V.buttAccessibility = 1; }, 20000));
+				} else {
+					r.push(`Your penthouse has no special accessibility provisions for slaves with enormous posteriors.`);
+					r.push(makeLink("Remodel for accessibility", () => { V.buttAccessibility = 1; }, 50000));
+				}
+			} else {
+				r.push(`The entire penthouse has been remodeled to make life with enormous rears easier. The doorways have been widened, and anything that can be sat on is now extra, extra wide and reinforced to allow even the heaviest, biggest asses to comfortably rest upon it.`);
+			}
+			App.Events.addNode(el, r, "div");
+		}
+
+		r = [];
+		if (V.boobAccessibility > 0 || V.pregAccessibility > 0 || V.dickAccessibility > 0 || V.ballsAccessibility > 0 || V.buttAccessibility > 0) {
+			const _removeCost = Math.trunc((5000 * (V.boobAccessibility + V.pregAccessibility + V.dickAccessibility + V.ballsAccessibility + V.buttAccessibility)) * V.upgradeMultiplierArcology);
+			App.UI.DOM.appendNewElement(
+				"div",
+				el,
+				App.UI.DOM.link(
+					"Remove the accessibility renovations",
+					() => {
+						cashX(forceNeg(_removeCost), "capEx");
+						V.boobAccessibility = 0;
+						V.pregAccessibility = 0;
+						V.dickAccessibility = 0;
+						V.ballsAccessibility = 0;
+						V.buttAccessibility = 0;
+					},
+					[],
+					"Manage Penthouse",
+					`Will cost ${cashFormat(_removeCost)}`
+				),
+				"detail"
+			);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.feeder === 0) {
+			r.push(makeLink("Upgrade the kitchen's nutritional sensing systems", () => { V.feeder = 1; }));
+		} else {
+			r.push(`The kitchen mounts sensors to refine diets in real time.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.cockFeeder === 0) {
+			r.push(makeLink("Enhance the feeding system with faux phalli", () => { V.cockFeeder = 1; }));
+		} else {
+			r.push(`The kitchen dispenses food from phalli slaves must suck off in order to eat.`);
+			r.push(makeLink("Remove them", () => { V.cockFeeder = 0; }, 0));
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.suppository === 0) {
+			r.push(makeLink("Replace the drug dispensers with reciprocating dildo suppositoriess", () => { V.suppository = 1; }));
+		} else {
+			r.push(`The kitchen applies drugs that can be absorbed rectally by assfucking slaves with dildos that cum the pharmaceuticals.`);
+			r.push(makeLink("Remove them", () => { V.suppository = 0; }, 0));
+		}
+		App.Events.addNode(el, r, "div");
+
+		r = [];
+		if (V.dairy !== 0) {
+			if (V.dairyPiping === 0) {
+				r.push(makeLink("Install pipes connecting the Dairy to the rest of your penthouse for use in enema play", () => { V.dairyPiping = 1; }));
+			} else {
+				r.push(`Various taps around the penthouse supply product from ${V.dairyName} for use in enema play and force-feeding.`);
+			}
+		} else if (V.dairyPiping === 1) {
+			r.push(`Various taps around the penthouse supply product from ${V.dairyName} for use in enema play and force-feeding. With no dairy to draw from, they are currently unused.`);
+		}
+		App.Events.addNode(el, r, "div");
+
+		if (V.seePee === 1) {
+			r = [];
+			if (V.wcPiping === 0) {
+				r.push(makeLink("Install pipes connecting the slave bathrooms to the rest of your penthouse for use in watersports", () => { V.wcPiping = 1; }), 10000);
+			} else {
+				r.push(`The plumbing underneath the slave bathrooms connects to various taps throughout the penthouse that can dispense its contents when needed.`);
+			}
+			App.Events.addNode(el, r, "div");
+		}
+
+		r = [];
+		if (V.studio === 0) {
+			r.push(makeLink("Install a media hub to convert slave video feeds into pornography", () => { V.studio = 1; }), 10000);
+		} else {
+			r.push(`The arcology's video systems are connected to a media hub that can convert slave video feeds into pornography.`);
+			if (V.studioFeed === 0) {
+				r.push(makeLink("Upgrade the media hub to allow better control of pornographic content|Manage Penthouse", () => { V.studioFeed = 1; }), 15000);
+			} else {
+				r.push(`It has been upgraded to allow superior control of a slave's pornographic content.`);
+			}
+		}
+		App.Events.addNode(el, r, "div");
+
+		return el;
+	}
+
+	function blackMarket() {
+		const el = new DocumentFragment();
+		App.UI.DOM.appendNewElement("h2", el, "Black Market");
+		const rep = 10000;
+
+		App.UI.DOM.appendNewElement(
+			"div",
+			el,
+			(V.rep >= rep) ?
+				App.UI.DOM.passageLink("Visit the market", "The Black Market") :
+				`You lack the ${num(rep)} reputation to be invited to the underground Black Market.`
+		);
 		return el;
 	}
 
@@ -198,6 +546,7 @@ App.UI.managePenthouse = function() {
 		return App.UI.DOM.link(
 			title,
 			() => {
+				func();
 				cashX(forceNeg(cost), "capEx");
 				V.PC.skill.engineering += .1;
 				jQuery(container).empty().append(createPage());
-- 
GitLab