From 4f1a7201302bcb7a52154cf4cd476e5372c83a15 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Wed, 3 Feb 2021 22:14:55 -0500
Subject: [PATCH] remove old surgery

---
 src/005-passages/facilitiesPassages.js        |  10 --
 .../surgery/remoteSurgeryPassage.js           | 151 ------------------
 2 files changed, 161 deletions(-)
 delete mode 100644 src/facilities/surgery/remoteSurgeryPassage.js

diff --git a/src/005-passages/facilitiesPassages.js b/src/005-passages/facilitiesPassages.js
index 6a09243338d..8aab5295314 100644
--- a/src/005-passages/facilitiesPassages.js
+++ b/src/005-passages/facilitiesPassages.js
@@ -77,13 +77,3 @@ new App.DomPassage("Toy Shop",
 		return App.UI.toyShop();
 	}, ["jump-to-safe", "jump-from-safe"]
 );
-/*
-new App.DomPassage("Remote Surgery",
-	() => {
-		V.nextButton = "Confirm changes";
-		V.nextLink = "Slave Interact";
-		V.encyclopedia = "The Remote Surgery";
-		return App.UI.remoteSurgery(getSlave(V.AS));
-	}, ["jump-to-safe", "jump-from-safe"]
-);
-*/
diff --git a/src/facilities/surgery/remoteSurgeryPassage.js b/src/facilities/surgery/remoteSurgeryPassage.js
deleted file mode 100644
index 10662f4253d..00000000000
--- a/src/facilities/surgery/remoteSurgeryPassage.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * UI for performing surgery. Refreshes without refreshing the passage.
- * @param {App.Entity.SlaveState} slave
- * @param {boolean} [cheat=false]
- * @returns {HTMLElement}
- */
-App.UI.remoteSurgery = function(slave, cheat = false) {
-	const container = document.createElement("span");
-	container.append(intro());
-	container.append(displayWithTabs());
-
-	App.UI.tabBar.handlePreSelectedTab(V.tabChoice.Options);
-
-	return container;
-
-	function intro() {
-		const el = new DocumentFragment();
-		const r = [];
-
-		App.UI.DOM.appendNewElement("h1", el, "The Remote Surgery");
-
-		r.push(`${slave.slaveName} is lying strapped down on the table in your`);
-		if (V.surgeryUpgrade === 1) {
-			r.push(`heavily upgraded and customized`);
-		}
-		r.push(`remote surgery. The surgical equipment reads`);
-		if (getSlave(V.AS).health.health < -20) {
-			r.push(App.UI.DOM.makeElement("span", "SLAVE UNHEALTHY, SURGERY NOT RECOMMENDED.", "red"));
-		} else if (getSlave(V.AS).health.health <= 20) {
-			r.push(App.UI.DOM.makeElement("span", "SLAVE HEALTHY, SURGERY SAFE.", "yellow"));
-		} else {
-			r.push(App.UI.DOM.makeElement("span", "SLAVE HEALTHY, SURGERY ENCOURAGED.", "green"));
-		}
-		if (V.PC.skill.medicine >= 100) {
-			r.push(`The remote surgery mechanisms that allow a surgeon to be brought in by telepresence are inactive, and the autosurgery is ready for your control inputs. Surgery on your slaves is a challenge and a pleasure you wouldn't dream of sharing.`);
-		}
-		App.Events.addNode(el, r, "div", "scene-intro");
-
-		if (getSlave(V.AS).indentureRestrictions >= 1) {
-			App.UI.DOM.appendNewElement("div", el, `This slave is subject to a restrictive indenture which forbids many invasive surgeries.`, "yellow");
-		}
-
-		return el;
-	}
-
-	function upper() {
-		const el = new DocumentFragment();
-		let r = [];
-
-		App.Events.addNode(el, r, "div");
-		return el;
-	}
-
-	function lower() {
-		const el = new DocumentFragment();
-		let r = [];
-
-		App.Events.addNode(el, r, "div");
-		return el;
-	}
-	function race() {
-		const el = new DocumentFragment();
-		let r = [];
-
-		App.Events.addNode(el, r, "div");
-		return el;
-	}
-	function structural() {
-		const el = new DocumentFragment();
-		let r = [];
-
-		App.Events.addNode(el, r, "div");
-		return el;
-	}
-	function extremeSurgery() {
-		const el = new DocumentFragment();
-		let r = [];
-
-		App.Events.addNode(el, r, "div");
-		return el;
-	}
-
-	function displayWithTabs() {
-		const el = new DocumentFragment();
-
-		/**
-		 * @typedef {Object} siCategory
-		 * @property {string} title
-		 * @property {string} id
-		 * @property {DocumentFragment|HTMLElement} node
-		 * @property {Function} [onClick]
-		 */
-
-		/** @type {Array<siCategory>} */
-		const buttons = [
-			{
-				title: "Hair and Face",
-				id: "hairAndFace",
-				get node() { return App.UI.surgeryPassageHairAndFace(slave, cheat); }
-			},
-			{
-				title: "Upper",
-				id: "upper",
-				get node() { return upper(); }
-			},
-			{
-				title: "Lower",
-				id: "lower",
-				get node() { return lower(); }
-			},
-			{
-				title: "Race",
-				id: "race",
-				get node() { return race(); }
-			},
-			{
-				title: "Structural",
-				id: "structural",
-				get node() { return structural(); }
-			},
-			{
-				title: "Extreme Surgery",
-				id: "extremeSurgery",
-				get node() { return extremeSurgery(); }
-			},
-
-		];
-
-		/**
-		 *
-		 * @param {string} id
-		 * @param {Node} element
-		 * @returns {HTMLSpanElement}
-		 */
-		function makeSpanIded(id, element) {
-			const span = document.createElement("span");
-			span.id = id;
-			span.append(element);
-			return span;
-		}
-
-		const tabBar = App.UI.DOM.appendNewElement("div", el, '', "tab-bar");
-
-		for (const caption of buttons) {
-			tabBar.append(App.UI.tabBar.tabButton(caption.id, caption.title));
-			el.append(App.UI.tabBar.makeTab(caption.id, makeSpanIded(`content-${caption.id}`, caption.node)));
-		}
-
-		return el;
-	}
-};
-- 
GitLab