From 5909e9066f86f3a69815864626e96d42fe2bac33 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Mon, 15 Jun 2020 02:26:52 -0400
Subject: [PATCH] more long slave tw depretiation

---
 src/gui/multipleInspect.js    | 14 +-------------
 src/js/utilsSC.js             |  9 +--------
 src/uncategorized/reRebels.tw |  2 +-
 3 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/src/gui/multipleInspect.js b/src/gui/multipleInspect.js
index 508a63e29e7..145853bd3f8 100644
--- a/src/gui/multipleInspect.js
+++ b/src/gui/multipleInspect.js
@@ -1,16 +1,4 @@
 App.UI.MultipleInspect = (function() {
-	function _LSDDOM(slave, saleDescription, applyLaw) {
-		// LSD will reset these globals, so we have to set them every single time
-		V.saleDescription = (saleDescription ? 1 : 0);
-		V.applyLaw = (applyLaw ? 1 : 0);
-
-		const oldAS = V.activeSlave;
-		V.activeSlave = slave;
-		const frag = App.UI.DOM.renderPassage("Long Slave Description");
-		V.activeSlave = oldAS;
-		return frag;
-	}
-
 	/**
 	 * Provide a mechanism to inspect multiple slaves at once (for example, for Household Liquidators and recETS).
 	 * Intended for use from DOM passages.
@@ -26,7 +14,7 @@ App.UI.MultipleInspect = (function() {
 
 		for (const slave of slaves) {
 			tabbar.append(App.UI.tabbar.tabButtonDOM(`slave${slave.ID}`, slave.slaveName));
-			frag.append(App.UI.tabbar.makeTabDOM(`slave${slave.ID}`, _LSDDOM(slave, saleDescription, applyLaw)));
+			frag.append(App.UI.tabbar.makeTabDOM(`slave${slave.ID}`, App.Desc.longSlave({slave: slave, saleDescription: saleDescription, applyLaw: applyLaw});));
 		}
 
 		if (slaves.length > 1 && showFamilyTree) {
diff --git a/src/js/utilsSC.js b/src/js/utilsSC.js
index 7220553e704..09b8e589e2f 100644
--- a/src/js/utilsSC.js
+++ b/src/js/utilsSC.js
@@ -273,17 +273,10 @@ App.UI.disabledLink = function(link, reasons) {
 
 /** handler function for slaveDescriptionDialog. do not call directly. */
 App.UI._showDescriptionDialog = function(slave) {
-	const oldEventDescription = V.eventDescription;
-	V.eventDescription = 1; // should be easy enough to use this for non-event cases too, but you'll need to fix the art display
-	const oldActiveSlave = V.activeSlave;
-	V.activeSlave = slave;
 	Dialog.setup(SlaveFullName(slave));
 	const image = App.UI.DOM.makeElement("div", App.Art.SlaveArtElement(slave, 2, 0), ["imageRef", "medImg"]);
-	const lsd = App.UI.DOM.renderPassage("Long Slave Description");
-	Dialog.append(image).append(lsd);
+	Dialog.append(image).append(App.Desc.longSlave({slave: slave, eventDescription: 1}));
 	Dialog.open();
-	V.activeSlave = oldActiveSlave;
-	V.eventDescription = oldEventDescription;
 };
 
 /**
diff --git a/src/uncategorized/reRebels.tw b/src/uncategorized/reRebels.tw
index 3c7b80e779f..7f4f398b3ef 100644
--- a/src/uncategorized/reRebels.tw
+++ b/src/uncategorized/reRebels.tw
@@ -27,7 +27,7 @@
 <<set $slaves[_i].clothes = _clothesTemp>>
 <<set $slaves[_j].clothes = _clothesTemp2>>
 
-You have a rebel problem. <<link "$slaves[_i].slaveName" "Long Slave Description">><<set $nextLink = passage(), $returnTo = "Back to Event", $activeSlave = $slaves[_i]>><</link>> and <<link "$slaves[_j].slaveName" "Long Slave Description">><<set $nextLink = passage(), $returnTo = "Back to Event", $activeSlave = $slaves[_j]>><</link>> are both unbroken, and they seem to draw strength from each other. They're discreet about it, but the arcology's always-vigilant systems occasionally catch them nodding to one another after one of them is punished, or giving each other quiet words of encouragement when they think no one is listening. This is extremely dangerous and should be addressed promptly.
+You have a rebel problem. <<= App.UI.slaveDescriptionDialog($slaves[_i])>> and <<= App.UI.slaveDescriptionDialog($slaves[_j])>> are both unbroken, and they seem to draw strength from each other. They're discreet about it, but the arcology's always-vigilant systems occasionally catch them nodding to one another after one of them is punished, or giving each other quiet words of encouragement when they think no one is listening. This is extremely dangerous and should be addressed promptly.
 
 <br><br>
 
-- 
GitLab