From 0e24c78e7108cd4e4bff65493e3583e756ba3954 Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@gmail.com>
Date: Wed, 17 Feb 2021 21:28:52 +0100
Subject: [PATCH] Adjust code style

---
 .eslintrc.json                      |  17 ++-
 js/003-data/futureSocietyData.js    | 114 ++++++----------
 src/art/artJS.js                    |   1 -
 src/endWeek/endWeekUtils.js         |   2 +-
 src/endWeek/minorInjuryResponse.js  |   4 +-
 src/endWeek/nextWeek/nextWeek.js    |  35 ++---
 src/endWeek/reports/arcadeReport.js | 204 ++++++++++++++++------------
 src/endWeek/reports/dairyReport.js  | 149 +++++++++-----------
 src/endWeek/saChoosesOwnClothes.js  |   1 +
 src/endWeek/saSocialEffects.js      |   5 +-
 10 files changed, 260 insertions(+), 272 deletions(-)

diff --git a/.eslintrc.json b/.eslintrc.json
index fd889e0a70f..3fe9eace77d 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -87,14 +87,27 @@
 		"block-scoped-var": "error",
 		"dot-notation": "warn",
 		"eol-last": "warn",
-		"unicode-bom": ["error", "never"],
-		"brace-style": ["warn", "1tbs",
+		"unicode-bom": [
+			"error",
+			"never"
+		],
+		"brace-style": [
+			"warn",
+			"1tbs",
 			{
 				"allowSingleLine": true
 			}
 		],
 		"no-sequences": "warn",
 		"no-unreachable-loop": "warn",
+		"generator-star-spacing": [
+			"warn",
+			{
+				"before": false,
+				"after": true,
+				"anonymous": "neither"
+			}
+		],
 		"jsdoc/check-alignment": 1,
 		"jsdoc/check-examples": 0, // interferes with SugarCube examples
 		"jsdoc/check-indentation": 0,
diff --git a/js/003-data/futureSocietyData.js b/js/003-data/futureSocietyData.js
index 0f1170c681a..33c41d900ad 100644
--- a/js/003-data/futureSocietyData.js
+++ b/js/003-data/futureSocietyData.js
@@ -1,61 +1,37 @@
 App.Data.FutureSociety = {
-	 /** Each future society contains a record here, along with a noun and adjective form for use in printed text, and the decoration string (normally also an adjective form).
-	  *  Most of the automatic mechanics for FS adoption, influence, facility decoration, etc, are handled directly from this data; flavor text is not.
-	  *  @type {Record<FC.FutureSociety, {noun: FC.FutureSocietyNoun, adj: FC.FutureSocietyAdj, deco: FC.FutureSocietyDeco, NPCOnly?: boolean}>} */
+	/** Each future society contains a record here, along with a noun and adjective form for use in printed text, and the decoration string (normally also an adjective form).
+	 *  Most of the automatic mechanics for FS adoption, influence, facility decoration, etc, are handled directly from this data; flavor text is not.
+	 *  @type {Record<FC.FutureSociety, {noun: FC.FutureSocietyNoun, adj: FC.FutureSocietyAdj, deco: FC.FutureSocietyDeco, NPCOnly?: boolean}>} */
 	records: ({
 		FSSupremacist: {noun: "Racial Supremacism", adj: "Supremacist", deco: "Supremacist"},
 		FSSubjugationist: {noun: "Racial Subjugationism", adj: "Subjugationist", deco: "Subjugationist"},
 		FSGenderRadicalist: {noun: "Gender Radicalism", adj: "Gender Radicalist", deco: "Gender Radicalist"},
-		 FSGenderFundamentalist: {
-			 noun: "Gender Fundamentalism",
-			 adj: "Gender Fundamentalist",
-			 deco: "Gender Fundamentalist"
-		 },
-		 FSDegradationist: {noun: "Degradationism", adj: "Degradationist", deco: "Degradationist"},
-		 FSPaternalist: {noun: "Paternalism", adj: "Paternalist", deco: "Paternalist"},
-		 FSBodyPurist: {noun: "Body Purism", adj: "Body Purist", deco: "Body Purist"},
-		 FSTransformationFetishist: {
-			 noun: "Transformation Fetishism",
-			 adj: "Transformation Fetishist",
-			 deco: "Transformation Fetishist"
-		 },
-		 FSYouthPreferentialist: {
-			 noun: "Youth Preferentialism",
-			 adj: "Youth Preferentialist",
-			 deco: "Youth Preferentialist"
-		 },
-		 FSMaturityPreferentialist: {
-			 noun: "Maturity Preferentialism",
-			 adj: "Maturity Preferentialist",
-			 deco: "Maturity Preferentialist"
-		 },
-		 FSSlimnessEnthusiast: {noun: "Slimness Enthusiasm", adj: "Slimness Enthusiast", deco: "Slimness Enthusiast"},
-		 FSAssetExpansionist: {noun: "Asset Expansionism", adj: "Asset Expansionist", deco: "Asset Expansionist"},
-		 FSPastoralist: {noun: "Pastoralism", adj: "Pastoralist", deco: "Pastoralist"},
-		 FSCummunism: {
-			 noun: "Cummunism", adj: "Cummunist", deco: "", NPCOnly: true
-		 },
-		 FSPhysicalIdealist: {noun: "Physical Idealism", adj: "Physical Idealist", deco: "Physical Idealist"},
-		 FSHedonisticDecadence: {noun: "Decadent Hedonism", adj: "Decadent Hedonist", deco: "Hedonistic"},
-		 FSChattelReligionist: {noun: "Chattel Religionism", adj: "Chattel Religionist", deco: "Chattel Religionist"},
-		 FSNull: {noun: "Multiculturalism", adj: "Multiculturalist", deco: ""},
-		 FSIncestFetishist: {
-			 noun: "Incest Fetishism", adj: "Incest Fetishist", deco: "", NPCOnly: true
-		 },
-		 FSRomanRevivalist: {noun: "Roman Revivalism", adj: "Roman Revivalist", deco: "Roman Revivalist"},
-		 FSNeoImperialist: {noun: "Neo-Imperialism", adj: "Neo-Imperialist", deco: "Neo-Imperialist"},
-		 FSEgyptianRevivalist: {noun: "Egyptian Revivalism", adj: "Egyptian Revivalist", deco: "Egyptian Revivalist"},
-		 FSEdoRevivalist: {noun: "Edo Revivalism", adj: "Edo Revivalist", deco: "Edo Revivalist"},
-		 FSArabianRevivalist: {noun: "Arabian Revivalism", adj: "Arabian Revivalist", deco: "Arabian Revivalist"},
-		 FSChineseRevivalist: {noun: "Chinese Revivalism", adj: "Chinese Revivalist", deco: "Chinese Revivalist"},
-		 FSAztecRevivalist: {noun: "Aztec Revivalism", adj: "Aztec Revivalist", deco: "Aztec Revivalist"},
-		 FSRepopulationFocus: {noun: "Repopulation Focus", adj: "Repopulationist", deco: "Repopulationist"},
-		 FSRestart: {noun: "Eugenics", adj: "Eugenics", deco: "Eugenics"},
-		 FSIntellectualDependency: {
-			 noun: "Intellectual Dependency",
-			 adj: "Intellectual Dependency",
-			 deco: "Intellectual Dependency"
-		 },
+		FSGenderFundamentalist: {noun: "Gender Fundamentalism", adj: "Gender Fundamentalist", deco: "Gender Fundamentalist"},
+		FSDegradationist: {noun: "Degradationism", adj: "Degradationist", deco: "Degradationist"},
+		FSPaternalist: {noun: "Paternalism", adj: "Paternalist", deco: "Paternalist"},
+		FSBodyPurist: {noun: "Body Purism", adj: "Body Purist", deco: "Body Purist"},
+		FSTransformationFetishist: {noun: "Transformation Fetishism", adj: "Transformation Fetishist", deco: "Transformation Fetishist"},
+		FSYouthPreferentialist: {noun: "Youth Preferentialism", adj: "Youth Preferentialist", deco: "Youth Preferentialist"},
+		FSMaturityPreferentialist: {noun: "Maturity Preferentialism", adj: "Maturity Preferentialist", deco: "Maturity Preferentialist"},
+		FSSlimnessEnthusiast: {noun: "Slimness Enthusiasm", adj: "Slimness Enthusiast", deco: "Slimness Enthusiast"},
+		FSAssetExpansionist: {noun: "Asset Expansionism", adj: "Asset Expansionist", deco: "Asset Expansionist"},
+		FSPastoralist: {noun: "Pastoralism", adj: "Pastoralist", deco: "Pastoralist"},
+		FSCummunism: {noun: "Cummunism", adj: "Cummunist", deco: "", NPCOnly: true},
+		FSPhysicalIdealist: {noun: "Physical Idealism", adj: "Physical Idealist", deco: "Physical Idealist"},
+		FSHedonisticDecadence: {noun: "Decadent Hedonism", adj: "Decadent Hedonist", deco: "Hedonistic"},
+		FSChattelReligionist: {noun: "Chattel Religionism", adj: "Chattel Religionist", deco: "Chattel Religionist"},
+		FSNull: {noun: "Multiculturalism", adj: "Multiculturalist", deco: ""},
+		FSIncestFetishist: {noun: "Incest Fetishism", adj: "Incest Fetishist", deco: "", NPCOnly: true},
+		FSRomanRevivalist: {noun: "Roman Revivalism", adj: "Roman Revivalist", deco: "Roman Revivalist"},
+		FSNeoImperialist: {noun: "Neo-Imperialism", adj: "Neo-Imperialist", deco: "Neo-Imperialist"},
+		FSEgyptianRevivalist: {noun: "Egyptian Revivalism", adj: "Egyptian Revivalist", deco: "Egyptian Revivalist"},
+		FSEdoRevivalist: {noun: "Edo Revivalism", adj: "Edo Revivalist", deco: "Edo Revivalist"},
+		FSArabianRevivalist: {noun: "Arabian Revivalism", adj: "Arabian Revivalist", deco: "Arabian Revivalist"},
+		FSChineseRevivalist: {noun: "Chinese Revivalism", adj: "Chinese Revivalist", deco: "Chinese Revivalist"},
+		FSAztecRevivalist: {noun: "Aztec Revivalism", adj: "Aztec Revivalist", deco: "Aztec Revivalist"},
+		FSRepopulationFocus: {noun: "Repopulation Focus", adj: "Repopulationist", deco: "Repopulationist"},
+		FSRestart: {noun: "Eugenics", adj: "Eugenics", deco: "Eugenics"},
+		FSIntellectualDependency: {noun: "Intellectual Dependency", adj: "Intellectual Dependency", deco: "Intellectual Dependency"},
 		FSSlaveProfessionalism: {noun: "Slave Professionalism", adj: "Slave Professional", deco: "Slave Professionalism"},
 		FSPetiteAdmiration: {noun: "Petite Admiration", adj: "Petite Admiration", deco: "Petite Admiration"},
 		FSStatuesqueGlorification: {noun: "Statuesque Glorification", adj: "Statuesque Glorification", deco: "Statuesque Glorification"}
@@ -64,24 +40,24 @@ App.Data.FutureSociety = {
 	/** Each subarray in this array contains a set of Future Societies which are to be considered mutually exclusive.
 	 *  They cannot be adopted at the same time by the same arcology, and if adopted by different arcologies,
 	 *  will automatically conflict and reduce diplomatic relations. */
-	mutexGroups: ( /** @returns {FC.FutureSociety[][]} */ function() {
+	mutexGroups: (/** @returns {FC.FutureSociety[][]} */ function() {
 		/* this tiny-but-hideous IIFE is the only way I can get typechecking to work properly here, without a JSDoc equivalent to TS "as const" to prevent literal type widening */
 		return [
-			[ "FSSupremacist" ],
-			[ "FSSubjugationist" ],
-			[ "FSGenderRadicalist", "FSGenderFundamentalist" ],
-			[ "FSDegradationist", "FSPaternalist" ],
-			[ "FSBodyPurist", "FSTransformationFetishist" ],
-			[ "FSYouthPreferentialist", "FSMaturityPreferentialist" ],
-			[ "FSSlimnessEnthusiast", "FSAssetExpansionist" ],
-			[ "FSPastoralist", "FSCummunism" ],
-			[ "FSPhysicalIdealist", "FSHedonisticDecadence" ],
-			[ "FSChattelReligionist", "FSNull" ],
-			[ "FSIncestFetishist" ],
-			[ "FSRomanRevivalist", "FSNeoImperialist", "FSEgyptianRevivalist", "FSEdoRevivalist", "FSArabianRevivalist", "FSChineseRevivalist", "FSAztecRevivalist" ],
-			[ "FSRepopulationFocus", "FSRestart" ],
-			[ "FSIntellectualDependency", "FSSlaveProfessionalism" ],
-			[ "FSPetiteAdmiration", "FSStatuesqueGlorification"]
+			["FSSupremacist"],
+			["FSSubjugationist"],
+			["FSGenderRadicalist", "FSGenderFundamentalist"],
+			["FSDegradationist", "FSPaternalist"],
+			["FSBodyPurist", "FSTransformationFetishist"],
+			["FSYouthPreferentialist", "FSMaturityPreferentialist"],
+			["FSSlimnessEnthusiast", "FSAssetExpansionist"],
+			["FSPastoralist", "FSCummunism"],
+			["FSPhysicalIdealist", "FSHedonisticDecadence"],
+			["FSChattelReligionist", "FSNull"],
+			["FSIncestFetishist"],
+			["FSRomanRevivalist", "FSNeoImperialist", "FSEgyptianRevivalist", "FSEdoRevivalist", "FSArabianRevivalist", "FSChineseRevivalist", "FSAztecRevivalist"],
+			["FSRepopulationFocus", "FSRestart"],
+			["FSIntellectualDependency", "FSSlaveProfessionalism"],
+			["FSPetiteAdmiration", "FSStatuesqueGlorification"]
 		];
 	})(),
 
diff --git a/src/art/artJS.js b/src/art/artJS.js
index d66e2e38cf7..5e4b1fc326a 100644
--- a/src/art/artJS.js
+++ b/src/art/artJS.js
@@ -179,7 +179,6 @@ App.Art.refreshSlaveArt = function(artSlave, artSize, elementID, UIDisplay = 0)
 			return jQuery('#' + elementID).empty().append(image);
 		}
 	}
-
 };
 
 globalThis.ArtControlRendered = function(slave, sizePlacement) {
diff --git a/src/endWeek/endWeekUtils.js b/src/endWeek/endWeekUtils.js
index 9823ba8fc54..2016f7ee9ec 100644
--- a/src/endWeek/endWeekUtils.js
+++ b/src/endWeek/endWeekUtils.js
@@ -63,7 +63,7 @@ App.SlaveAssignment.reportSlave = function(slave) {
  * @param {App.Entity.SlaveState[]} slaves
  * @yields {FC.ReportSlave}
  */
-App.SlaveAssignment.reportSlaves = function * (slaves) {
+App.SlaveAssignment.reportSlaves = function*(slaves) {
 	let iterationCount = 0;
 	for (const slave of slaves) {
 		iterationCount++;
diff --git a/src/endWeek/minorInjuryResponse.js b/src/endWeek/minorInjuryResponse.js
index 95d6f5b2646..e5884279ca8 100644
--- a/src/endWeek/minorInjuryResponse.js
+++ b/src/endWeek/minorInjuryResponse.js
@@ -6,10 +6,8 @@ globalThis.minorInjuryResponse = function(slave) {
 	const arcology = V.arcologies[0];
 	const arcologyUpgrade = V.arcologyUpgrade;
 	const {he, himself, He} = getPronouns(slave);
-	let r;
 
-	r = responseWithTracking(trackedCategory());
-	return r;
+	return responseWithTracking(trackedCategory());
 
 	/**
 	 * @returns {string}
diff --git a/src/endWeek/nextWeek/nextWeek.js b/src/endWeek/nextWeek/nextWeek.js
index e4085adbc96..ac272771ac3 100644
--- a/src/endWeek/nextWeek/nextWeek.js
+++ b/src/endWeek/nextWeek/nextWeek.js
@@ -27,15 +27,15 @@ App.EndWeek.nextWeek = function() {
 			}
 		}
 	}
-	if (V.menstruation !== 1) {
-		if (V.PC.geneticQuirks.superfetation === 2 && V.PC.womb.length > 0) {
-			if (V.PC.fertPeak === 0) {
-				V.PC.fertPeak = 1;
-			}
-			V.PC.fertPeak--;
-		} else if (V.PC.fertPeak !== 0) {
-			V.PC.fertPeak = 0;
-		}
+	if (V.menstruation === 1) {
+		// TODO
+	} else if (V.PC.geneticQuirks.superfetation === 2 && V.PC.womb.length > 0) {
+		if (V.PC.fertPeak === 0) {
+			V.PC.fertPeak = 1;
+		}
+		V.PC.fertPeak--;
+	} else if (V.PC.fertPeak !== 0) {
+		V.PC.fertPeak = 0;
 	}
 
 	// Adding random changes to the economy
@@ -129,15 +129,15 @@ App.EndWeek.nextWeek = function() {
 				slave.boobs += slave.boobsMilk;
 			}
 		}
-		if (V.menstruation !== 1) {
-			if (slave.geneticQuirks.superfetation === 2 && slave.womb.length > 0) {
-				if (slave.fertPeak === 0) {
-					slave.fertPeak = 1;
-				}
-				slave.fertPeak--;
-			} else if (slave.fertPeak !== 0) {
-				slave.fertPeak = 0;
+		if (V.menstruation === 1) {
+			// TODO
+		} else if (slave.geneticQuirks.superfetation === 2 && slave.womb.length > 0) {
+			if (slave.fertPeak === 0) {
+				slave.fertPeak = 1;
 			}
+			slave.fertPeak--;
+		} else if (slave.fertPeak !== 0) {
+			slave.fertPeak = 0;
 		}
 		slave.trust = Number(slave.trust.toFixed(1));
 		slave.devotion = Number(slave.devotion.toFixed(1));
@@ -336,6 +336,7 @@ App.EndWeek.nextWeek = function() {
 	App.EndWeek.resetGlobals();
 
 	if (V.autosave !== 0) {
+		// @ts-ignore
 		Save.autosave.save("Week Start Autosave");
 	}
 
diff --git a/src/endWeek/reports/arcadeReport.js b/src/endWeek/reports/arcadeReport.js
index a752eff932e..01601f365e9 100644
--- a/src/endWeek/reports/arcadeReport.js
+++ b/src/endWeek/reports/arcadeReport.js
@@ -10,8 +10,10 @@ App.EndWeek.arcadeReport = function() {
 
 	const slaves = App.Utils.sortedEmployees(App.Entity.facilities.arcade);
 	const slavesLength = slaves.length;
-	let cockmilked = 0, milked = 0, milkProfits = 0, profits = 0, boobsImplanted = 0, prostatesImplanted = 0,
-		vasectomiesUndone = 0, mSlave, bSlave, pSlave, cSlave, milkResults, growth;
+
+	const cockMilkedSlaves = [], milkedSlaves = [], boobsImplantedSlaves = [], prostatesImplantedSlaves = [];
+	let vasectomiesUndone = 0;
+	let milkProfits = 0, profits = 0;
 
 	// Statistics gathering
 	V.facility = V.facility || {};
@@ -39,7 +41,6 @@ App.EndWeek.arcadeReport = function() {
 	}
 
 	for (const slave of App.SlaveAssignment.reportSlaves(slaves)) {
-		const {He} = getPronouns(slave);
 		r = [];
 		/* for the included passages */
 
@@ -109,70 +110,7 @@ App.EndWeek.arcadeReport = function() {
 		profits += V.cash - oldCash;
 
 		if (V.arcadeUpgradeCollectors > 0) {
-			if (slave.vasectomy === 1) {
-				slave.vasectomy = 0;
-				vasectomiesUndone++;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				surgeryDamage(slave, 10);
-			} else if (slave.lactation < 2) {
-				slave.lactation = 2;
-				boobsImplanted++;
-				bSlave = slave;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				surgeryDamage(slave, 10);
-			} else if (slave.prostate === 1) {
-				slave.prostate = 2;
-				prostatesImplanted++;
-				pSlave = slave;
-				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
-				surgeryDamage(slave, 10);
-			} else if (slave.lactation > 0 || slave.balls > 0) {
-				milkResults = App.SlaveAssignment.getMilked(slave, 1.0);
-				if (V.showEWD !== 0) {
-					r = [];
-					r.push(App.UI.DOM.makeElement("div", `${He} ${milkResults.text}`, "indent"));
-					App.Events.addNode(el, r, "div", "indent");
-				}
-				milkProfits += milkResults.cash;
-				growth = 0;
-				const gigantomastiaMod = slave.geneticQuirks.gigantomastia === 2 ? (slave.geneticQuirks.macromastia === 2 ? 3 : 2) : 1;
-				if (slave.boobs < 2000) {
-					growth = 100;
-				} else if (slave.boobs < 5000 * gigantomastiaMod) {
-					growth = 50;
-				} else if (slave.boobs < 10000 * gigantomastiaMod) {
-					growth = 25;
-				}
-				if (slave.geneMods.NCS === 1) {
-					/*
-					** NCS will allow some growth for Arcade milking, but not as much as the Dairy.
-					*/
-					growth = Math.trunc(growth / 3.5);
-				}
-				slave.boobs += growth;
-				if (
-					(slave.balls > 0) &&
-					(slave.balls < 10) &&
-					(random(1, 100) > (40 + (10 * (slave.balls + (2 * slave.geneMods.NCS)))))
-				) {
-					slave.balls++;
-				}
-				if (
-					(slave.dick > 0) &&
-					(slave.dick < 10) &&
-					(random(1, 100) > (40 + (10 * slave.dick + (2 * slave.geneMods.NCS))))
-				) {
-					slave.dick++;
-				}
-				if (slave.lactation > 0) {
-					milked++;
-					mSlave = slave;
-				}
-				if (slave.balls > 0) {
-					cockmilked++;
-					cSlave = slave;
-				}
-			}
+			applyCollectors(slave);
 		}
 		if (slave.inflation > 0) {
 			deflate(slave);
@@ -186,14 +124,16 @@ App.EndWeek.arcadeReport = function() {
 
 	if (slavesLength + V.fuckdolls > 0) {
 		r = [];
-		if (milked === 1) {
-			const {his} = getPronouns(mSlave);
-			r.push(`One of them is lactating and spends ${his} time in ${V.arcadeName} being simultaneously milked and fucked.`);
-		} else if (milked > 1) {
-			r.push(`${capFirstChar(num(milked))} of them are lactating and spend their time in ${V.arcadeName} being simultaneously milked and fucked.`);
+		if (milkedSlaves.length > 0) {
+			if (milkedSlaves.length === 1) {
+				const {his} = getPronouns(milkedSlaves[0]);
+				r.push(`One of them is lactating and spends ${his} time in ${V.arcadeName} being simultaneously milked and fucked.`);
+			} else {
+				r.push(`${capFirstChar(num(milkedSlaves.length))} of them are lactating and spend their time in ${V.arcadeName} being simultaneously milked and fucked.`);
+			}
 		}
 
-		if (vasectomiesUndone) {
+		if (vasectomiesUndone > 0) {
 			if (vasectomiesUndone === 1) {
 				r.push(`One`);
 			} else {
@@ -201,29 +141,34 @@ App.EndWeek.arcadeReport = function() {
 			}
 			r.push(`of them had severed vas deferens, so they were reattached to allow sperm through, costing <span class="red">${cashFormat(V.surgeryCost * vasectomiesUndone)}.</span>`);
 		}
-		if (boobsImplanted) {
-			if (boobsImplanted === 1) {
-				const {he} = getPronouns(bSlave);
+
+		if (boobsImplantedSlaves.length > 0) {
+			if (boobsImplantedSlaves.length === 1) {
+				const {he} = getPronouns(boobsImplantedSlaves[0]);
 				r.push(`One of them was not lactating, so ${he} was`);
 			} else {
-				r.push(`${capFirstChar(num(boobsImplanted))} of them were not lactating, so they were`);
+				r.push(`${capFirstChar(num(boobsImplantedSlaves.length))} of them were not lactating, so they were`);
 			}
-			r.push(`implanted with long-acting lactation inducing drugs, costing <span class="red">${cashFormat(V.surgeryCost * boobsImplanted)}.</span>`);
+			r.push(`implanted with long-acting lactation inducing drugs, costing <span class="red">${cashFormat(V.surgeryCost * boobsImplantedSlaves.length)}.</span>`);
 		}
-		if (prostatesImplanted) {
-			if (prostatesImplanted === 1) {
-				const {he} = getPronouns(pSlave);
+
+		if (prostatesImplantedSlaves.length > 0) {
+			if (prostatesImplantedSlaves.length === 1) {
+				const {he} = getPronouns(prostatesImplantedSlaves[0]);
 				r.push(`One of them was not producing the maximum possible amount of precum, so ${he} was`);
 			} else {
-				r.push(`${capFirstChar(num(prostatesImplanted))} of them were not producing the maximum possible amount of precum, so they were`);
+				r.push(`${capFirstChar(num(prostatesImplantedSlaves.length))} of them were not producing the maximum possible amount of precum, so they were`);
 			}
-			r.push(`implanted with long-acting prostate stimulation drugs, costing <span class="red">${cashFormat(V.surgeryCost * prostatesImplanted)}.</span>`);
+			r.push(`implanted with long-acting prostate stimulation drugs, costing <span class="red">${cashFormat(V.surgeryCost * prostatesImplantedSlaves.length)}.</span>`);
 		}
-		if (cockmilked === 1) {
-			const {he} = getPronouns(cSlave);
-			r.push(`One of them retains testicles and is brutally cockmilked as ${he} is used.`);
-		} else if (cockmilked > 1) {
-			r.push(`${capFirstChar(num(cockmilked))} of them retain testicles and are brutally cockmilked as they are used.`);
+
+		if (cockMilkedSlaves.length > 0) {
+			if (cockMilkedSlaves.length === 1) {
+				const {he} = getPronouns(cockMilkedSlaves[0]);
+				r.push(`One of them retains testicles and is brutally cockmilked as ${he} is used.`);
+			} else {
+				r.push(`${capFirstChar(num(cockMilkedSlaves.length))} of them retain testicles and are brutally cockmilked as they are used.`);
+			}
 		}
 
 		r.push(`The arcade makes you`);
@@ -301,4 +246,87 @@ App.EndWeek.arcadeReport = function() {
 			}
 		}
 	}
+
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
+	function applyCollectors(slave) {
+		if (slave.vasectomy === 1) {
+			slave.vasectomy = 0;
+			vasectomiesUndone++;
+			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
+			surgeryDamage(slave, 10);
+		} else if (slave.lactation < 2) {
+			slave.lactation = 2;
+			boobsImplantedSlaves.push(slave);
+			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
+			surgeryDamage(slave, 10);
+		} else if (slave.prostate === 1) {
+			slave.prostate = 2;
+			prostatesImplantedSlaves.push(slave);
+			cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
+			surgeryDamage(slave, 10);
+		} else if (slave.lactation > 0 || slave.balls > 0) {
+			milkProfits += milk(slave);
+			slave.boobs += boobGrowth(slave);
+			if (
+				(slave.balls > 0) &&
+				(slave.balls < 10) &&
+				(random(1, 100) > (40 + (10 * (slave.balls + (2 * slave.geneMods.NCS)))))
+			) {
+				slave.balls++;
+			}
+			if (
+				(slave.dick > 0) &&
+				(slave.dick < 10) &&
+				(random(1, 100) > (40 + (10 * slave.dick + (2 * slave.geneMods.NCS))))
+			) {
+				slave.dick++;
+			}
+			if (slave.lactation > 0) {
+				milkedSlaves.push(slave);
+			}
+			if (slave.balls > 0) {
+				cockMilkedSlaves.push(slave);
+			}
+		}
+	}
+
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {number}
+	 */
+	function milk(slave) {
+		const {He} = getPronouns(slave);
+		const milkResults = App.SlaveAssignment.getMilked(slave, 1.0);
+		if (V.showEWD !== 0) {
+			r = [];
+			r.push(App.UI.DOM.makeElement("div", `${He} ${milkResults.text}`, "indent"));
+			App.Events.addNode(el, r, "div", "indent");
+		}
+		return milkResults.cash;
+	}
+
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {number}
+	 */
+	function boobGrowth(slave) {
+		let growth = 0;
+		const gigantomastiaMod = slave.geneticQuirks.gigantomastia === 2 ? (slave.geneticQuirks.macromastia === 2 ? 3 : 2) : 1;
+		if (slave.boobs < 2000) {
+			growth = 100;
+		} else if (slave.boobs < 5000 * gigantomastiaMod) {
+			growth = 50;
+		} else if (slave.boobs < 10000 * gigantomastiaMod) {
+			growth = 25;
+		}
+		if (slave.geneMods.NCS === 1) {
+			/*
+			** NCS will allow some growth for Arcade milking, but not as much as the Dairy.
+			*/
+			growth = Math.trunc(growth / 3.5);
+		}
+		return growth;
+	}
 };
diff --git a/src/endWeek/reports/dairyReport.js b/src/endWeek/reports/dairyReport.js
index 4e9d4e28565..11c056000cb 100644
--- a/src/endWeek/reports/dairyReport.js
+++ b/src/endWeek/reports/dairyReport.js
@@ -9,10 +9,8 @@ App.EndWeek.dairyReport = function() {
 	const BF = App.Data.misc.bioreactorFluids;
 	const slaves = App.Utils.sortedEmployees(App.Entity.facilities.dairy);
 	const DL = slaves.length;
-	let anusesStretched = 0, cumWeek = 0, femCumWeek = 0, FLsFetish = 0, milkWeek = 0, balltacular = 0, boobtacular = 0,
-		careerForgotten = 0, chemMinor = 0, chemSevere = 0, desterilized = 0, hateFilled = 0, horrified = 0,
-		intelligenceLost = 0, mindbroken = 0, skillsLost = 0, stupidified = 0, vaginasStretched = 0;
-	let cmSlave, dsSlave, hfSlave, hrSlave, slSlave, cfSlave, stSlave, btSlave;
+	const balltacular = [], careerForgotten = [], desterilized = [], hateFilled = [], horrified = [], skillsLost = [], stupidified = [], chemMinor = [];
+	let anusesStretched = 0, cumWeek = 0, femCumWeek = 0, milkWeek = 0, boobtacular = 0, chemSevere = 0, intelligenceLost = 0, mindbroken = 0, vaginasStretched = 0;
 	const inflatedSlaves = App.Facilities.Dairy.inflation();
 	const dairySettings = V.dairyStimulatorsSetting + V.dairyFeedersSetting + V.dairyPregSetting;
 	const restrainedInjected = V.dairyRestraintsSetting + V.injectionUpgrade;
@@ -133,6 +131,7 @@ App.EndWeek.dairyReport = function() {
 		if (S.Milkmaid.rules.rest !== "restrictive") {
 			S.Milkmaid.rules.rest = "restrictive";
 		}
+		let FLsFetish = 0;
 		if (S.Milkmaid.fetishStrength <= 95) {
 			if (milkers >= cummers && milkers >= breeders) {
 				if (S.Milkmaid.fetish !== "boobs") {
@@ -690,8 +689,7 @@ App.EndWeek.dairyReport = function() {
 							slave.balls++;
 						}
 						if (slave.balls >= 125) {
-							balltacular++;
-							btSlave = slave;
+							balltacular.push(slave);
 						}
 					} else if (slave.balls < 10) {
 						if (slave.geneMods.NCS === 0 && random(1, 100) > (40 + ballFormula)) {
@@ -701,8 +699,7 @@ App.EndWeek.dairyReport = function() {
 							slave.balls++;
 						}
 						if (slave.balls >= 10) {
-							balltacular++;
-							btSlave = slave;
+							balltacular.push(slave);
 						}
 					}
 					if (slave.dick > 0) {
@@ -839,8 +836,7 @@ App.EndWeek.dairyReport = function() {
 			if (slave.chem > 250) {
 				chemSevere++;
 			} else if (slave.chem > 100) {
-				chemMinor++;
-				cmSlave = slave;
+				chemMinor.push(slave);
 			}
 		}
 
@@ -851,35 +847,28 @@ App.EndWeek.dairyReport = function() {
 					if (slave.devotion > -75) {
 						slave.devotion -= 10;
 						if (slave.devotion < -65) {
-							hateFilled++;
-							hfSlave = slave;
+							hateFilled.push(slave);
 						}
 					} else if (slave.trust > -75) {
 						slave.trust -= 10;
 						if (slave.trust < -65) {
-							horrified++;
-							hrSlave = slave;
+							horrified.push(slave);
 						}
 					} else if (slave.skill.vaginal > 0) {
 						slave.skill.vaginal -= 10;
-						skillsLost++;
-						slSlave = slave;
+						skillsLost.push(slave);
 					} else if (slave.skill.oral > 0) {
 						slave.skill.oral -= 10;
-						skillsLost++;
-						slSlave = slave;
+						skillsLost.push(slave);
 					} else if (slave.skill.anal > 0) {
 						slave.skill.anal -= 10;
-						skillsLost++;
-						slSlave = slave;
+						skillsLost.push(slave);
 					} else if (slave.career !== "a bioreactor") {
 						slave.career = "a bioreactor";
-						careerForgotten++;
-						cfSlave = slave;
+						careerForgotten.push(slave);
 					} else if (slave.intelligenceImplant > 0) {
 						slave.intelligenceImplant = Math.clamp(slave.intelligenceImplant - 5, 0, 30);
-						skillsLost++;
-						slSlave = slave;
+						skillsLost.push(slave);
 					} else if (slave.intelligence >= -15) {
 						slave.intelligence -= 5;
 						intelligenceLost++;
@@ -889,17 +878,14 @@ App.EndWeek.dairyReport = function() {
 						slave.trust -= 10;
 					} else if (slave.skill.whoring > 0) {
 						slave.skill.whoring -= 10;
-						skillsLost++;
-						slSlave = slave;
+						skillsLost.push(slave);
 					} else if (slave.skill.entertainment > 0) {
 						slave.skill.entertainment -= 10;
-						skillsLost++;
-						slSlave = slave;
+						skillsLost.push(slave);
 					} else if (slave.intelligence >= -50) {
 						slave.intelligence -= 5;
 						if (slave.intelligence < -50) {
-							stupidified++;
-							stSlave = slave;
+							stupidified.push(slave);
 						}
 					} else if (slave.fetish !== "mindbroken") {
 						slave.fetish = "mindbroken";
@@ -914,8 +900,7 @@ App.EndWeek.dairyReport = function() {
 				)
 			) {
 				slave.career = "a bioreactor";
-				careerForgotten++;
-				cfSlave = slave;
+				careerForgotten.push(slave);
 			}
 			if (V.arcologies[0].FSBodyPuristLaw === 0 && V.healthyDrugsUpgrade === 0) {
 				slave.chem += 5;
@@ -927,35 +912,28 @@ App.EndWeek.dairyReport = function() {
 				if (slave.devotion > -75) {
 					slave.devotion -= 5;
 					if (slave.devotion < -70) {
-						hateFilled++;
-						hfSlave = slave;
+						hateFilled.push(slave);
 					}
 				} else if (slave.trust > -75) {
 					slave.trust -= 5;
 					if (slave.trust < -70) {
-						horrified++;
-						hrSlave = slave;
+						horrified.push(slave);
 					}
 				} else if (slave.skill.vaginal >= 20) {
 					slave.skill.vaginal -= 10;
-					skillsLost++;
-					slSlave = slave;
+					skillsLost.push(slave);
 				} else if (slave.skill.oral >= 20) {
 					slave.skill.oral -= 10;
-					skillsLost++;
-					slSlave = slave;
+					skillsLost.push(slave);
 				} else if (slave.skill.anal >= 20) {
 					slave.skill.anal -= 10;
-					skillsLost++;
-					slSlave = slave;
+					skillsLost.push(slave);
 				} else if (slave.career !== "a bioreactor") {
 					slave.career = "a bioreactor";
-					careerForgotten++;
-					cfSlave = slave;
+					careerForgotten.push(slave);
 				} else if (slave.intelligenceImplant > 0) {
 					slave.intelligenceImplant = Math.clamp(slave.intelligenceImplant - 5, 0, 30);
-					skillsLost++;
-					slSlave = slave;
+					skillsLost.push(slave);
 				} else if (slave.intelligence >= -15) {
 					slave.intelligence -= 5;
 					intelligenceLost++;
@@ -965,17 +943,14 @@ App.EndWeek.dairyReport = function() {
 					slave.trust -= 8;
 				} else if (slave.skill.whoring >= 20) {
 					slave.skill.whoring -= 10;
-					skillsLost++;
-					slSlave = slave;
+					skillsLost.push(slave);
 				} else if (slave.skill.entertainment >= 20) {
 					slave.skill.entertainment -= 10;
-					skillsLost++;
-					slSlave = slave;
+					skillsLost.push(slave);
 				} else if (slave.intelligence >= -50) {
 					slave.intelligence -= 5;
 					if (slave.intelligence < -50) {
-						stupidified++;
-						stSlave = slave;
+						stupidified.push(slave);
 					}
 				} else if (slave.fetish !== "mindbroken") {
 					slave.fetish = "mindbroken";
@@ -988,8 +963,7 @@ App.EndWeek.dairyReport = function() {
 				)
 			) {
 				slave.career = "a bioreactor";
-				careerForgotten++;
-				cfSlave = slave;
+				careerForgotten.push(slave);
 			}
 			if (V.arcologies[0].FSBodyPuristLaw === 0 && V.healthyDrugsUpgrade === 0) {
 				slave.chem += 2;
@@ -1004,8 +978,7 @@ App.EndWeek.dairyReport = function() {
 				femCumWeek += girlCumAmount(slave);
 				if (slave.preg === -2) {
 					slave.preg = 0;
-					desterilized++;
-					dsSlave = slave;
+					desterilized.push(slave);
 				}
 				if (isFertile(slave)) {
 					if (slave.eggType === "human") {
@@ -1121,45 +1094,45 @@ App.EndWeek.dairyReport = function() {
 		r.push(`One cow's productivity is being reduced by the long term effects of industrial use.`);
 	}
 
-	if (chemMinor > 1) {
-		r.push(`${chemMinor} cows have been drugged and used long enough that they require increased curative doses, slightly reducing their output.`);
-	} else if (chemMinor > 0) {
-		const {he, his} = getPronouns(cmSlave);
+	if (chemMinor.length > 1) {
+		r.push(`${chemMinor.length} cows have been drugged and used long enough that they require increased curative doses, slightly reducing their output.`);
+	} else if (chemMinor.length > 0) {
+		const {he, his} = getPronouns(chemMinor[0]);
 		r.push(`One cow has been drugged and used long enough that ${he} requires increased curative doses, slightly reducing ${his} output.`);
 	}
 
-	if (desterilized > 1) {
-		r.push(`${desterilized} cows had minor health issues preventing their fertile womb from conceiving; the issues have been resolved and they have been impregnated.`);
-	} else if (desterilized > 0) {
-		const {he, his} = getPronouns(dsSlave);
+	if (desterilized.length > 1) {
+		r.push(`${desterilized.length} cows had minor health issues preventing their fertile womb from conceiving; the issues have been resolved and they have been impregnated.`);
+	} else if (desterilized.length > 0) {
+		const {he, his} = getPronouns(desterilized[0]);
 		r.push(`One cow had minor health issues preventing ${his} fertile womb from conceiving; they have been resolved and ${he} has been impregnated.`);
 	}
 
-	if (hateFilled > 1) {
-		r.push(`${hateFilled} cows stopped struggling so much when fucked by the machines; it seems they have sunk into a fugue.`);
-	} else if (hateFilled > 0) {
-		const {he} = getPronouns(hfSlave);
+	if (hateFilled.length > 1) {
+		r.push(`${hateFilled.length} cows stopped struggling so much when fucked by the machines; it seems they have sunk into a fugue.`);
+	} else if (hateFilled.length > 0) {
+		const {he} = getPronouns(hateFilled[0]);
 		r.push(`One cow stopped struggling so much when fucked by the machines; it seems ${he} has sunk into a fugue.`);
 	}
 
-	if (horrified > 1) {
-		r.push(`${horrified} cows' emotional activity dropped significantly; this indicates acceptance that they are not likely to leave ${V.dairyName}, ever again.`);
-	} else if (horrified > 0) {
-		const {he} = getPronouns(hrSlave);
+	if (horrified.length > 1) {
+		r.push(`${horrified.length} cows' emotional activity dropped significantly; this indicates acceptance that they are not likely to leave ${V.dairyName}, ever again.`);
+	} else if (horrified.length > 0) {
+		const {he} = getPronouns(horrified[0]);
 		r.push(`One cow's emotional activity dropped significantly; this indicates acceptance that ${he} is not likely to leave ${V.dairyName}, ever again.`);
 	}
 
-	if (skillsLost > 1) {
-		r.push(`${skillsLost} cows forgot skills due to their inability to focus on anything but machine rape.`);
-	} else if (skillsLost > 0) {
-		const {his} = getPronouns(slSlave);
+	if (skillsLost.length > 1) {
+		r.push(`${skillsLost.length} cows forgot skills due to their inability to focus on anything but machine rape.`);
+	} else if (skillsLost.length > 0) {
+		const {his} = getPronouns(skillsLost[0]);
 		r.push(`One cow forgot skills due to ${his} inability to focus on anything but machine rape.`);
 	}
 
-	if (careerForgotten > 1) {
-		r.push(`${careerForgotten} cows forgot the details of their past professional lives; all they can remember now is this.`);
-	} else if (careerForgotten > 0) {
-		const {he, his} = getPronouns(cfSlave);
+	if (careerForgotten.length > 1) {
+		r.push(`${careerForgotten.length} cows forgot the details of their past professional lives; all they can remember now is this.`);
+	} else if (careerForgotten.length > 0) {
+		const {he, his} = getPronouns(careerForgotten[0]);
 		r.push(`One cow forgot the details of ${his} past professional life; all ${he} can remember now is this.`);
 	}
 
@@ -1181,10 +1154,10 @@ App.EndWeek.dairyReport = function() {
 		r.push(`One cow suffered some loss of intelligence due to accumulated mental stress from life attached to a milking machine.`);
 	}
 
-	if (stupidified > 1) {
-		r.push(`${stupidified} cows were so mentally dulled by use as biological factories that they were reduced to a very low level of intelligence.`);
-	} else if (stupidified > 0) {
-		const {he} = getPronouns(stSlave);
+	if (stupidified.length > 1) {
+		r.push(`${stupidified.length} cows were so mentally dulled by use as biological factories that they were reduced to a very low level of intelligence.`);
+	} else if (stupidified.length > 0) {
+		const {he} = getPronouns(stupidified[0]);
 		r.push(`One cow was so mentally dulled by use as biological factories that ${he} was reduced to a very low level of intelligence.`);
 	}
 
@@ -1200,10 +1173,10 @@ App.EndWeek.dairyReport = function() {
 		r.push(`One cow grew past 30 kilograms of breasts, a remarkable advance in capacity.`);
 	}
 
-	if (balltacular > 1) {
-		r.push(`${balltacular} cows' testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking them with extra force.`);
-	} else if (balltacular > 0) {
-		const {him} = getPronouns(btSlave);
+	if (balltacular.length > 1) {
+		r.push(`${balltacular.length} cows' testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking them with extra force.`);
+	} else if (balltacular.length > 0) {
+		const {him} = getPronouns(balltacular[0]);
 		r.push(`One cow's testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking ${him} with extra force.`);
 	}
 
diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js
index 60d198112d1..64bb9e809ee 100644
--- a/src/endWeek/saChoosesOwnClothes.js
+++ b/src/endWeek/saChoosesOwnClothes.js
@@ -98,6 +98,7 @@ App.SlaveAssignment.choosesOwnClothes = (function() {
 			if (V.arcologies[0].FSChattelReligionist > 0) {
 				selection = {text: `${he} commonly sees others wearing chattel habits and is drawn to doing so ${himself}.`, clothes: "a chattel habit"};
 			} else {
+				/** @type {string} */
 				let text;
 				/** @type {Array<FC.FutureSociety|"panties">} */
 				const clothingFS = ["panties"];
diff --git a/src/endWeek/saSocialEffects.js b/src/endWeek/saSocialEffects.js
index 640c0eaea08..3a326959129 100644
--- a/src/endWeek/saSocialEffects.js
+++ b/src/endWeek/saSocialEffects.js
@@ -488,9 +488,8 @@ App.SlaveAssignment.saSocialEffects = function(slave) {
 			let hasScar = 0;
 			for (const scarPlace in slave.scar) {
 				for (const scarType in slave.scar[scarPlace]) {
-					if (scarType === "exotic") {
-						 // exotic scars don't count
-					} else {
+					// exotic scars don't count
+					if (scarType !== "exotic") {
 						if (V.arcologies[0].FSDegradationist !== "unset") {
 							t.push(new SocialEffect("Degradationist", 1, `Scarred`,
 								`Society <span class="green">mildly approves</span> of your slave's scarring; this encourages the further abuse of slaves.`));
-- 
GitLab