From cae195203b43ed540c9ef9eaa57d47017585a622 Mon Sep 17 00:00:00 2001
From: DCoded <dcoded@live.com>
Date: Wed, 5 Aug 2020 00:41:34 -0400
Subject: [PATCH] Added missing const, formatting, began DOMifiying
 musclesRulesEffects()

---
 src/endWeek/reports/childrenReport.js | 37 ++++++++++++++-------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/src/endWeek/reports/childrenReport.js b/src/endWeek/reports/childrenReport.js
index 6d563c937aa..f7d09b4fa89 100644
--- a/src/endWeek/reports/childrenReport.js
+++ b/src/endWeek/reports/childrenReport.js
@@ -113,25 +113,26 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
 			randomNanny = jsRandom(0, nannies.length),
 			slave = nannies[randomNanny];
 
-			if (slave.fetish !== "none") {
-				if (chance > 85) {
-					if (child.fetish === "none") {
-						child.fetish = slave.fetish;
+		if (slave.fetish !== "none") {
+			if (chance > 85) {
+				if (child.fetish === "none") {
+					child.fetish = slave.fetish;
 
-						return `${slave.slaveName} has left quite an impression on ${child.slaveName}, and ${he} ${newChildFetish(child.fetish)}.`;
-					} else {
-						if (chance > 90) {
-							child.fetish = slave.fetish;
+					return `${slave.slaveName} has left quite an impression on ${child.slaveName}, and ${he} ${newChildFetish(child.fetish)}.`;
+				} else {
+					if (chance > 90) {
+						child.fetish = slave.fetish;
 
-							return `${child.slaveName} seems to have taken to ${slave.slaveName}'s example, and ${newChildFetish(child.fetish)}.`;
-						}
+						return `${child.slaveName} seems to have taken to ${slave.slaveName}'s example, and ${newChildFetish(child.fetish)}.`;
 					}
 				}
 			}
+		}
 	}
 
 	function nannyEducationEffects(child) {
 		// TODO: expand this
+		const
 			firstNanny = nannies[0],
 			theNanniesAre = NL > 1 ? `The nannies are mostly` : `${firstNanny.slaveName} is`,
 			theChildren = CL > 1 ? `the children` : child.slaveName;
@@ -223,36 +224,36 @@ App.Facilities.Nursery.childrenReport = function childrenReport() {
 	}
 
 	function musclesRulesEffects(child) {
-		let r = [];
+		const div = document.createElement("div");
 
 		// TODO: rewrite these
 		if (V.nurseryMuscles) {
-			r.push(`${He} is being given anabolic steroids causing <span class="green">rapid muscle development.</span> `);	// TODO: not happy with this
+			div.append(`${He} is being given anabolic steroids causing <span class="green">rapid muscle development.</span> `);	// TODO: not happy with this
 
 			if (V.nurseryMusclesSetting === 2) {
 				if (child.muscles < 100) {
 					child.muscles += 5;
 				}
-				r.push(`${Matron ? Matron : NL > 1 ? `A nanny` : firstNanny.slaveName} notices ${he} is overly muscular and <span class="green">decreases ${his} steroid dosage.</span> `);
+				div.append(`${Matron ? Matron : NL > 1 ? `A nanny` : firstNanny.slaveName} notices ${he} is overly muscular and <span class="green">decreases ${his} steroid dosage.</span> `);
 			} else if (V.nurseryMusclesSetting === 1) {
 				if (child.muscles > 10) {
 					child.muscles--;
-					r.push(`${Matron ? Matron : NL > 1 ? `A nanny` : firstNanny.slaveName} notices ${he} is weak and <span class="green">increases ${his} steroid dosage.</span> `);
+					div.append(`${Matron ? Matron : NL > 1 ? `A nanny` : firstNanny.slaveName} notices ${he} is weak and <span class="green">increases ${his} steroid dosage.</span> `);
 				} else if (child.muscles < -10) {
 					child.muscles++;
-					r.push(`${He} has <span class="lime">a healthy musculature;</span> efforts will be made to maintain it. `);
+					div.append(`${He} has <span class="lime">a healthy musculature;</span> efforts will be made to maintain it. `);
 				} else {
-					r.push(`${His} developing body <span class="red">quickly loses its gained muscle.</span> `);
+					div.append(`${His} developing body <span class="red">quickly loses its gained muscle.</span> `);
 				}
 			} else if (V.nurseryMusclesSetting === 0) {
 				if (child.muscles > -100) {
 					child.muscles -= 40;
-					r.push(`${His} developing body <span class="red">quickly loses its gained muscle.</span> `);
+					div.append(`${His} developing body <span class="red">quickly loses its gained muscle.</span> `);
 				}
 			}
 		}
 
-		return r.join(' ');
+		return div;
 	}
 
 
-- 
GitLab