From 29f7401358c7e348cc42f5340c441a717dfc25b3 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 20 Dec 2020 03:34:00 -0500
Subject: [PATCH] slave is in scope now

---
 src/interaction/siWardrobe.js | 63 +++++++++++++++++------------------
 1 file changed, 31 insertions(+), 32 deletions(-)

diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js
index 5c6b947f062..e9bb2830ced 100644
--- a/src/interaction/siWardrobe.js
+++ b/src/interaction/siWardrobe.js
@@ -42,7 +42,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 			if (slave.clothes !== `choosing her own clothes`) {
 				let choiceOptionsArray = [];
 				choiceOptionsArray.push({text: ` Let ${him} choose`, updateSlave: {clothes: `choosing her own clothes`, choosesOwnClothes: 1}});
-				label.appendChild(generateRows(choiceOptionsArray, slave, "clothes", false));
+				label.appendChild(generateRows(choiceOptionsArray, "clothes", false));
 			}
 			el.appendChild(label);
 
@@ -85,14 +85,14 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 			links = document.createElement('div');
 			links.className = "choices";
 			links.append(`Nice: `);
-			links.appendChild(generateRows(niceOptionsArray, slave, "clothes", true));
+			links.appendChild(generateRows(niceOptionsArray, "clothes", true));
 			el.appendChild(links);
 
 			// Harsh options
 			links = document.createElement('div');
 			links.className = "choices";
 			links.append(`Harsh: `);
-			links.appendChild(generateRows(harshOptionsArray, slave, "clothes", true));
+			links.appendChild(generateRows(harshOptionsArray, "clothes", true));
 			el.appendChild(links);
 		}
 		if (slave.fuckdoll !== 0 || slave.clothes === "restrictive latex" || slave.clothes === "a latex catsuit" || slave.clothes === "a cybersuit" || slave.clothes === "a comfortable bodysuit") {
@@ -123,7 +123,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.collar !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {collar: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "collar", false));
+			label.appendChild(generateRows(choiceOptionsArray, "collar", false));
 		}
 
 		el.appendChild(label);
@@ -159,14 +159,14 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		let links = document.createElement('div');
 		links.className = "choices";
 		links.append(`Nice: `);
-		links.appendChild(generateRows(niceOptionsArray, slave, "collar", true));
+		links.appendChild(generateRows(niceOptionsArray, "collar", true));
 		el.appendChild(links);
 
 		// Harsh options
 		links = document.createElement('div');
 		links.className = "choices";
 		links.append(`Harsh: `);
-		links.appendChild(generateRows(harshOptionsArray, slave, "collar", true));
+		links.appendChild(generateRows(harshOptionsArray, "collar", true));
 		el.appendChild(links);
 
 		return el;
@@ -186,7 +186,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.faceAccessory !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {faceAccessory: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "faceAccessory", false));
+			label.appendChild(generateRows(choiceOptionsArray, "faceAccessory", false));
 		}
 
 		el.appendChild(label);
@@ -208,7 +208,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(array, slave, "faceAccessory", true));
+		links.appendChild(generateRows(array, "faceAccessory", true));
 		el.appendChild(links);
 
 		if (slave.eyewear === "corrective glasses" || slave.eyewear === "glasses" || slave.eyewear === "blurring glasses" || slave.faceAccessory === "porcelain mask") {
@@ -241,7 +241,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.mouthAccessory !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {mouthAccessory: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "mouthAccessory", false));
+			label.appendChild(generateRows(choiceOptionsArray, "mouthAccessory", false));
 		}
 
 		el.appendChild(label);
@@ -264,7 +264,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(array, slave, "mouthAccessory", true));
+		links.appendChild(generateRows(array, "mouthAccessory", true));
 		el.appendChild(links);
 
 		return el;
@@ -286,7 +286,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Choose her own
 		if (slave.armAccessory !== "none") {
 			array.push({text: ` None`, updateSlave: {armAccessory: `none`}});
-			label.appendChild(generateRows(array, slave, "armAccessory", false));
+			label.appendChild(generateRows(array, "armAccessory", false));
 		}
 
 		el.appendChild(label);
@@ -297,7 +297,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 			{text: "Hand gloves", updateSlave: {armAccessory: "hand gloves"}},
 			{text: "Elbow gloves", updateSlave: {armAccessory: "elbow gloves"}}
 		];
-		links.appendChild(generateRows(array, slave, "armAccessory", false));
+		links.appendChild(generateRows(array, "armAccessory", false));
 		el.appendChild(links);
 
 		return el;
@@ -318,7 +318,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 			if (slave.shoes !== `none`) {
 				let choiceOptionsArray = [];
 				choiceOptionsArray.push({text: `None`, updateSlave: {shoes: `none`}});
-				label.appendChild(generateRows(choiceOptionsArray, slave, "shoes", false));
+				label.appendChild(generateRows(choiceOptionsArray, "shoes", false));
 			}
 			*/
 		el.appendChild(label);
@@ -341,7 +341,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "shoes", true));
+		links.appendChild(generateRows(optionsArray, "shoes", true));
 		el.appendChild(links);
 
 		if (V.seeImages === 1 && V.imageChoice === 1 && slave.shoes !== "none") {
@@ -371,7 +371,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Choose her own
 		if (slave.legAccessory !== "none") {
 			array.push({text: ` None`, updateSlave: {legAccessory: `none`}});
-			label.appendChild(generateRows(array, slave, "legAccessory", false));
+			label.appendChild(generateRows(array, "legAccessory", false));
 		}
 
 		el.appendChild(label);
@@ -382,7 +382,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 			{text: "Short stockings", updateSlave: {legAccessory: "short stockings"}},
 			{text: "Long stockings", updateSlave: {legAccessory: "long stockings"}}
 		];
-		links.appendChild(generateRows(array, slave, "legAccessory", false));
+		links.appendChild(generateRows(array, "legAccessory", false));
 		el.appendChild(links);
 
 		return el;
@@ -420,7 +420,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 
 		// Choose her own
 		if (slave.bellyAccessory !== `none`) {
-			label.appendChild(generateRows(choiceOptionsArray, slave, "bellyAccessory", false));
+			label.appendChild(generateRows(choiceOptionsArray, "bellyAccessory", false));
 		}
 
 		el.appendChild(label);
@@ -428,7 +428,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "bellyAccessory", true));
+		links.appendChild(generateRows(optionsArray, "bellyAccessory", true));
 		if (slave.pregKnown === 1) {
 			let note = document.createElement('span');
 			note.className = "note";
@@ -454,7 +454,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.buttplug !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {buttplug: `none`, buttplugAttachment: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "buttplug", false));
+			label.appendChild(generateRows(choiceOptionsArray, "buttplug", false));
 		}
 		el.appendChild(label);
 
@@ -479,7 +479,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "buttplug", true));
+		links.appendChild(generateRows(optionsArray, "buttplug", true));
 		el.appendChild(links);
 
 		return el;
@@ -501,7 +501,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.buttplugAttachment !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {buttplugAttachment: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "buttplugAttachment", false));
+			label.appendChild(generateRows(choiceOptionsArray, "buttplugAttachment", false));
 		}
 		el.appendChild(label);
 
@@ -526,7 +526,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "buttplugAttachment", true));
+		links.appendChild(generateRows(optionsArray, "buttplugAttachment", true));
 		el.appendChild(links);
 
 		return el;
@@ -547,7 +547,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.vaginalAccessory !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {vaginalAccessory: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "vaginalAccessory", false));
+			label.appendChild(generateRows(choiceOptionsArray, "vaginalAccessory", false));
 		}
 		el.appendChild(label);
 
@@ -572,7 +572,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "vaginalAccessory", true));
+		links.appendChild(generateRows(optionsArray, "vaginalAccessory", true));
 		el.appendChild(links);
 
 		return el;
@@ -594,7 +594,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.vaginalAttachment !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {vaginalAttachment: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "vaginalAttachment", false));
+			label.appendChild(generateRows(choiceOptionsArray, "vaginalAttachment", false));
 		}
 		el.appendChild(label);
 
@@ -619,7 +619,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "vaginalAttachment", true));
+		links.appendChild(generateRows(optionsArray, "vaginalAttachment", true));
 		el.appendChild(links);
 
 		return el;
@@ -638,7 +638,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		if (slave.dickAccessory !== `none`) {
 			let choiceOptionsArray = [];
 			choiceOptionsArray.push({text: ` None`, updateSlave: {dickAccessory: `none`}});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "dickAccessory", false));
+			label.appendChild(generateRows(choiceOptionsArray, "dickAccessory", false));
 		}
 		el.appendChild(label);
 
@@ -663,7 +663,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "dickAccessory", true));
+		links.appendChild(generateRows(optionsArray, "dickAccessory", true));
 		el.appendChild(links);
 
 		return el;
@@ -713,7 +713,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 					chastityVagina: 0
 				}
 			});
-			label.appendChild(generateRows(choiceOptionsArray, slave, "chastity", false));
+			label.appendChild(generateRows(choiceOptionsArray, "chastity", false));
 		}
 		el.appendChild(label);
 
@@ -739,7 +739,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 		// Options
 		let links = document.createElement('div');
 		links.className = "choices";
-		links.appendChild(generateRows(optionsArray, slave, "chastity", true));
+		links.appendChild(generateRows(optionsArray, "chastity", true));
 		el.appendChild(links);
 
 		return el;
@@ -989,12 +989,11 @@ App.UI.SlaveInteract.wardrobe = function(slave) {
 
 	/** Generate a row of choices
 	 * @param {RowItem[]} array
-	 * @param {App.Entity.SlaveState} slave
 	 * @param {string} [category] - should be in the form of slave.category, the thing we want to update.
 	 * @param {boolean} [accessCheck=false]
 	 * @returns {HTMLSpanElement}
 	 */
-	function generateRows(array, slave, category, accessCheck = false) {
+	function generateRows(array, category, accessCheck = false) {
 		const linkArray = [];
 		for (const item of array) {
 			let link;
-- 
GitLab