From d46e4bc154290c78d46ad1e22ba98c1c1bdf9eb5 Mon Sep 17 00:00:00 2001
From: DCoded <dicoded@email.com>
Date: Sat, 3 Jul 2021 12:37:32 -0400
Subject: [PATCH] Penthouse tweaking

---
 src/facilities/penthouse/penthousePassage.js | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/facilities/penthouse/penthousePassage.js b/src/facilities/penthouse/penthousePassage.js
index ac96c78561f..281b29509d9 100644
--- a/src/facilities/penthouse/penthousePassage.js
+++ b/src/facilities/penthouse/penthousePassage.js
@@ -510,33 +510,34 @@ App.UI.managePenthouse = function() {
 		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.`
+			(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;
 	}
 
 	/**
+	 * Creates a new link to purchase a facility.
 	 *
 	 * @param {string} title
-	 * @param {function(void):void} func
-	 * @param {number} [cost=5000]
+	 * @param {function(void):void} handler
+	 * @param {number} [cost]
 	 * @returns {DocumentFragment}
 	 */
-	function makeLink(title, func, cost = 5000) {
+	function makeLink(title, handler, cost = 5000) {
 		const el = new DocumentFragment();
 		cost = Math.trunc(cost * V.upgradeMultiplierArcology);
 		el.append(App.UI.DOM.link(
 			title,
 			() => {
-				func();
+				handler();
+
 				cashX(forceNeg(cost), "capEx");
 				V.PC.skill.engineering += .1;
 				jQuery(container).empty().append(createPage());
-			},
+			}, [], '', `Costs ${cashFormat(cost)}.`
 		));
-		App.UI.DOM.appendNewElement("span", el, ` Costs ${cashFormat(cost)}`, "detail");
 		return el;
 	}
 };
-- 
GitLab