From d4fa3bd156f64f88453e76a69b9dee45a0d06a27 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Fri, 4 Dec 2020 20:39:08 -0500
Subject: [PATCH] more

---
 .../slaveOnSlaveFeedingWorkAround.js          | 56 ++++++++++---------
 1 file changed, 31 insertions(+), 25 deletions(-)

diff --git a/src/interaction/slaveOnSlaveFeedingWorkAround.js b/src/interaction/slaveOnSlaveFeedingWorkAround.js
index 885a9749ef0..7143b93a45e 100644
--- a/src/interaction/slaveOnSlaveFeedingWorkAround.js
+++ b/src/interaction/slaveOnSlaveFeedingWorkAround.js
@@ -1,7 +1,9 @@
+/**
+ *
+ * @param {App.Entity.SlaveState} slave
+ */
 App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) {
 	const el = new DocumentFragment();
-	let inflationLevel;
-	let inflationMethod;
 	let inflationType;
 	setup();
 	el.append(intro());
@@ -11,7 +13,7 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) {
 
 	function intro() {
 		const el = new DocumentFragment();
-		const { his } = getPronouns(slave);
+		const {his} = getPronouns(slave);
 
 		App.UI.DOM.appendNewElement("div", el, `${slave.slaveName} is prepped to drink ${his} fill; now you must select a slave capable of producing the required amount of milk or ejaculate.`);
 		App.UI.DOM.appendNewElement("h2", el, "Select an eligible slave to serve as the tap");
@@ -48,16 +50,13 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) {
 		}
 	}
 
-	/**
-	 * 
-	 * @param {App.Entity.SlaveState} slave
-	 */
-	function milkSlaves(slave) { // Tabs maybe?
+	function milkSlaves() { // Tabs maybe?
 		const el = new DocumentFragment();
 		const twoLiterSlaves = [];
 		const fourLiterSlaves = [];
 		const eightLiterSlaves = [];
 		const {he, his} = getPronouns(slave);
+		inflationType = "milk";
 
 		App.UI.DOM.appendNewElement("h3", el, "Milk Slaves");
 		const table = document.createElement("table");
@@ -75,12 +74,11 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) {
 		for (const tapSlave of V.slaves) {
 			if (tapSlave.ID !== slave.ID && tapSlave.nipples !== "fuckable") {
 				if (tapSlave.milkOutput >= 2) {
-					const tapLink = createTapLink(tapSlave);
-					twoLiterSlaves.push(tapLink);
+					twoLiterSlaves.push(createTapLink(tapSlave, 1));
 					if (tapSlave.milkOutput >= 4 && slave.pregKnown === 0) {
-						fourLiterSlaves.push(tapLink);
+						fourLiterSlaves.push(createTapLink(tapSlave, 2));
 						if (tapSlave.milkOutput >= 8) {
-							eightLiterSlaves.push(tapLink);
+							eightLiterSlaves.push(createTapLink(tapSlave, 3));
 						}
 					}
 				}
@@ -88,16 +86,17 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) {
 		}
 
 		if (twoLiterSlaves.length === 0) {
-			twoLiterSlaves.push(App.UI.DOM.makeElement("td", `Due to ${his} pregnancy, ${he} is incapable of keeping down more than two liters of milk.`));
-		}
-		if (slave.pregKnown === 0) {
-			fourLiterSlaves.push(App.UI.DOM.makeElement("td", "You have no slaves capable of producing four liters of milk."));
+			twoLiterSlaves.push(App.UI.DOM.makeElement("td", "You have no slaves capable of producing two liters of milk."));
 		} else {
-			if (fourLiterSlaves.length === 0) {
-				fourLiterSlaves.push(App.UI.DOM.makeElement("td", "You have no slaves capable of producing four liters of milk."));
-			}
-			if (eightLiterSlaves.length === 0) {
-				eightLiterSlaves.push(App.UI.DOM.makeElement("td", "You have no slaves capable of producing eight liters of milk."));
+			if (slave.pregKnown !== 0) {
+				fourLiterSlaves.push(App.UI.DOM.makeElement("td", `Due to ${his} pregnancy, ${he} is incapable of keeping down more than two liters of milk.`));
+			} else {
+				if (fourLiterSlaves.length === 0) {
+					fourLiterSlaves.push(App.UI.DOM.makeElement("td", "You have no slaves capable of producing four liters of milk."));
+				}
+				if (eightLiterSlaves.length === 0) {
+					eightLiterSlaves.push(App.UI.DOM.makeElement("td", "You have no slaves capable of producing eight liters of milk."));
+				}
 			}
 		}
 
@@ -109,16 +108,15 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) {
 
 		return el;
 	}
-	function createTapLink(tapSlave) {
+	function createTapLink(tapSlave, inflationLevel) {
 		const el = document.createElement("div");
 		el.append(
 			App.UI.DOM.link(
 				tapSlave.slaveName,
 				() => {
 					V.milkTap = tapSlave;
-					slave.inflation = inflationLevel;
 					slave.inflationType = inflationType;
-					slave.inflationMethod = inflationMethod;
+					slave.inflationMethod = 3;
 				},
 				[],
 				"FSlaveFeed"
@@ -129,28 +127,36 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) {
 			el.append(` ${relTerm}`);
 		}
 		if (tapSlave.relationshipTarget === slave.ID) {
-			const { wife } = getPronouns(tapSlave);
+			const {wife} = getPronouns(tapSlave);
 			switch (tapSlave.relationship) {
 				case 1:
 					el.append(` friends`);
+					break;
 				case 2:
 					el.append(` best friends`);
+					break;
 				case 3:
 					el.append(` friends with benefits`);
+					break;
 				case 4:
 					el.append(` lover`);
+					break;
 				case 5:
 					el.append(` slave${wife}`);
+					break;
 			}
 		}
 		if (tapSlave.rivalryTarget === getSlave(V.AS).ID) {
 			switch (tapSlave.relationship) {
 				case 1:
 					el.append(`dislikes`);
+					break;
 				case 2:
 					el.append(`rival`);
+					break;
 				case 3:
 					el.append(`bitterly hates`);
+					break;
 			}
 		}
 		return el;
-- 
GitLab