From 1e680ffeffac2f4e9186c8ede7f2914d6d2d1915 Mon Sep 17 00:00:00 2001
From: Skriv <skrivelese@gmail.com>
Date: Fri, 29 Mar 2019 16:52:08 +0100
Subject: [PATCH] etc

---
 src/endWeek/saWorkTheFarm.js | 88 ++++++++++++++++++------------------
 1 file changed, 43 insertions(+), 45 deletions(-)

diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js
index f3a2959ecaf..f98e96e379d 100644
--- a/src/endWeek/saWorkTheFarm.js
+++ b/src/endWeek/saWorkTheFarm.js
@@ -1,15 +1,13 @@
-/* eslint-disable no-unused-vars */
-/* eslint-disable no-undef */
 window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWorkTheFarm(slave) {
 	"use strict";
 	const V = State.variables;
 	const arcology = V.arcologies[0];
-	var pronouns = getPronouns(slave);
-	var he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
-	var He = capFirstChar(he), His = capFirstChar(his);
-	var incomeStats = getSlaveStatisticData(slave, V.facility.farmyard);
+	const pronouns = getPronouns(slave);
+	const he = pronouns.pronoun; const him = pronouns.object; const his = pronouns.possessive; const hers = pronouns.possessivePronoun; const himself = pronouns.objectReflexive; const boy = pronouns.noun;
+	const He = capFirstChar(he); const His = capFirstChar(his);
+	const incomeStats = getSlaveStatisticData(slave, V.facility.farmyard);
 
-	var t = `works as a farmhand this week. `;
+	let t = `works as a farmhand this week. `;
 
 	if (V.Farmer !== 0) {
 		t += `While there, ${he} benefits from ${V.Farmer.slaveName}'s `;
@@ -85,7 +83,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 	if (slave.tired === 1) {
 		t += `${He} is so tired that ${he} doesn't have the energy to work efficiently, impacting ${his} production. `;
 	}
-	t += `As a result, ${he} produces @@.chocolate;` + massFormat(food) + `@@ of food over the week. `;
+	t += `As a result, ${he} produces @@.chocolate;${ massFormat(food) }@@ of food over the week. `;
 
 	// Close Food Production
 
@@ -105,9 +103,9 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		}
 		if (arcology.FSSubjugationist !== "unset") {
 			if (slave.race === arcology.FSSubjugationistRace) {
-				t += `Society @@.green;approves@@ of the degradation you submit your ` + arcology.FSSubjugationistRace + ` slaves to, and so ${he} earns you a bit more. `;
+				t += `Society @@.green;approves@@ of the degradation you submit your ${ arcology.FSSubjugationistRace } slaves to, and so ${he} earns you a bit more. `;
 			} else {
-				t += `Society doesn't disapprove of ${him} not being ` + arcology.FSSubjugationistRace + `, but ${he} doesn't earn as much as ${he} would if ${he} was ` + arcology.FSSubjugationistRace + `. `;
+				t += `Society doesn't disapprove of ${him} not being ${ arcology.FSSubjugationistRace }, but ${he} doesn't earn as much as ${he} would if ${he} was ${ arcology.FSSubjugationistRace }. `;
 			}
 		}
 		if (arcology.FSRepopulationFocus !== "unset") {
@@ -203,16 +201,16 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		}
 		if (arcology.FSYouthPreferentialist !== "unset") {
 			if (slave.visualAge > 25) {		// TODO: not sure about this age
-				t += arcology.name + `'s citizens @@.red;disapprove@@ of your using such old slaves to put on shows. `;
+				t += `${arcology.name }'s citizens @@.red;disapprove@@ of your using such old slaves to put on shows. `;
 			} else {
-				t += arcology.name + `'s citizens @@.green;approve@@ of your using young slaves to put on shows. `;
+				t += `${arcology.name }'s citizens @@.green;approve@@ of your using young slaves to put on shows. `;
 			}
 		}
 		if (arcology.FSMaturityPreferentialist !== "unset") {
 			if (slave.visualAge > 25) {		// TODO: not sure about this age
-				t += arcology.name + `'s citizens @@.green;approve@@ of your using mature slaves to put on shows. `;
+				t += `${arcology.name }'s citizens @@.green;approve@@ of your using mature slaves to put on shows. `;
 			} else {
-				t += arcology.name + `'s citizens @@.red;disapprove@@ of your using such young slaves to put on shows. `;
+				t += `${arcology.name }'s citizens @@.red;disapprove@@ of your using such young slaves to put on shows. `;
 			}
 		}
 		if (arcology.FSSlimnessEnthusiast !== "unset") {
@@ -418,7 +416,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		}
 	}
 	if (slave.behavioralQuirk === "fitness") {
-		t += slave.slaveName + ` @@.hotpink;privately enjoys@@ the exercise ${he} receives while working in ${farmyardName}. `;
+		t += `${slave.slaveName } @@.hotpink;privately enjoys@@ the exercise ${he} receives while working in ${farmyardName}. `;
 		slave.devotion += 1;
 	}
 
@@ -427,14 +425,14 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 	// Open Vignettes
 
 	if (V.showVignettes) {
-		let vignette = GetVignette(slave);
-		t += `__This week__ ` + vignette.text;
+		const vignette = GetVignette(slave);
+		t += `__This week__ ${ vignette.text}`;
 		if (vignette.type === "cash") {
 			FResult(slave);
 			if (vignette.effect > 0) {
-				t += ` @@.yellowgreen;making you an extra ` + cashFormat(Math.trunc(V.FResult*vignette.effect)) + `.@@ `;
+				t += ` @@.yellowgreen;making you an extra ${ cashFormat(Math.trunc(V.FResult*vignette.effect)) }.@@ `;
 			} else if (vignette.effect < 0) {
-				t += ` @@.red;losing you ` + cashFormat(Math.abs(Math.trunc(V.FResult*vignette.effect))) + `.@@ `;
+				t += ` @@.red;losing you ${ cashFormat(Math.abs(Math.trunc(V.FResult*vignette.effect))) }.@@ `;
 			} else {
 				t += ` an incident without lasting effect. `;
 			}
@@ -514,82 +512,82 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 	// Open Facility Decorations
 
 	if (V.farmyardDecoration !== "standard") {
-		let fsGain = Math.min(0.0001*V.FSSingleSlaveRep*(food), 1);
+		const fsGain = Math.min(0.0001*V.FSSingleSlaveRep*(food), 1);
 		switch (V.farmyardDecoration) {
 			case "Roman Revivalist":
-				arcology.FSRomanRevivalist = Math.clamp(arcology.FSRomanRevivalist += fsGain,0,100);
+				arcology.FSRomanRevivalist = Math.clamp(arcology.FSRomanRevivalist += fsGain, 0, 100);
 				break;
 			case "Aztec Revivalist":
-				arcology.FSAztecRevivalist = Math.clamp(arcology.FSAztecRevivalist += fsGain,0,100);
+				arcology.FSAztecRevivalist = Math.clamp(arcology.FSAztecRevivalist += fsGain, 0, 100);
 				break;
 			case "Egyptian Revivalist":
-				arcology.FSEgyptianRevivalist = Math.clamp(arcology.FSEgyptianRevivalist += fsGain,0,100);
+				arcology.FSEgyptianRevivalist = Math.clamp(arcology.FSEgyptianRevivalist += fsGain, 0, 100);
 				break;
 			case "Edo Revivalist":
-				arcology.FSEdoRevivalist = Math.clamp(arcology.FSEdoRevivalist += fsGain,0,100);
+				arcology.FSEdoRevivalist = Math.clamp(arcology.FSEdoRevivalist += fsGain, 0, 100);
 				break;
 			case "Arabian Revivalist":
-				arcology.FSArabianRevivalist = Math.clamp(arcology.FSArabianRevivalist += fsGain,0,100);
+				arcology.FSArabianRevivalist = Math.clamp(arcology.FSArabianRevivalist += fsGain, 0, 100);
 				break;
 			case "Chinese Revivalist":
-				arcology.FSChineseRevivalist = Math.clamp(arcology.FSChineseRevivalist += fsGain,0,100);
+				arcology.FSChineseRevivalist = Math.clamp(arcology.FSChineseRevivalist += fsGain, 0, 100);
 				break;
 			case "Chattel Religionist":
-				arcology.FSChattelReligionist = Math.clamp(arcology.FSChattelReligionist += fsGain,0,100);
+				arcology.FSChattelReligionist = Math.clamp(arcology.FSChattelReligionist += fsGain, 0, 100);
 				break;
 			case "Degradationist":
-				arcology.FSDegradationist = Math.clamp(arcology.FSDegradationist += fsGain,0,100);
+				arcology.FSDegradationist = Math.clamp(arcology.FSDegradationist += fsGain, 0, 100);
 				break;
 			case "Repopulation Focus":
-				arcology.FSRepopulationFocus = Math.clamp(arcology.FSRepopulationFocus += fsGain,0,100);
+				arcology.FSRepopulationFocus = Math.clamp(arcology.FSRepopulationFocus += fsGain, 0, 100);
 				break;
 			case "Eugenics":
-				arcology.FSRestart = Math.clamp(arcology.FSRestart += fsGain,0,100);
+				arcology.FSRestart = Math.clamp(arcology.FSRestart += fsGain, 0, 100);
 				break;
 			case "Asset Expansionist":
-				arcology.FSAssetExpansionist = Math.clamp(arcology.FSAssetExpansionist += fsGain,0,100);
+				arcology.FSAssetExpansionist = Math.clamp(arcology.FSAssetExpansionist += fsGain, 0, 100);
 				break;
 			case "Transformation Fetishist":
-				arcology.FSTransformationFetishist = Math.clamp(arcology.FSTransformationFetishist += fsGain,0,100);
+				arcology.FSTransformationFetishist = Math.clamp(arcology.FSTransformationFetishist += fsGain, 0, 100);
 				break;
 			case "Gender Radicalist":
-				arcology.FSGenderRadicalist = Math.clamp(arcology.FSGenderRadicalist += fsGain,0,100);
+				arcology.FSGenderRadicalist = Math.clamp(arcology.FSGenderRadicalist += fsGain, 0, 100);
 				break;
 			case "Gender Fundamentalist":
-				arcology.FSGenderFundamentalist = Math.clamp(arcology.FSGenderFundamentalist += fsGain,0,100);
+				arcology.FSGenderFundamentalist = Math.clamp(arcology.FSGenderFundamentalist += fsGain, 0, 100);
 				break;
 			case "Physical Idealist":
-				arcology.FSPhysicalIdealist = Math.clamp(arcology.FSPhysicalIdealist += fsGain,0,100);
+				arcology.FSPhysicalIdealist = Math.clamp(arcology.FSPhysicalIdealist += fsGain, 0, 100);
 				break;
 			case "Hedonistic":
-				arcology.FSHedonisticDecadence = Math.clamp(arcology.FSHedonisticDecadence += fsGain,0,100);
+				arcology.FSHedonisticDecadence = Math.clamp(arcology.FSHedonisticDecadence += fsGain, 0, 100);
 				break;
 			case "Supremacist":
-				arcology.FSSupremacist = Math.clamp(arcology.FSSupremacist += fsGain,0,100);
+				arcology.FSSupremacist = Math.clamp(arcology.FSSupremacist += fsGain, 0, 100);
 				break;
 			case "Subjugationist":
-				arcology.FSSubjugationist = Math.clamp(arcology.FSSubjugationist += fsGain,0,100);
+				arcology.FSSubjugationist = Math.clamp(arcology.FSSubjugationist += fsGain, 0, 100);
 				break;
 			case "Paternalist":
-				arcology.FSPaternalist = Math.clamp(arcology.FSPaternalist += fsGain,0,100);
+				arcology.FSPaternalist = Math.clamp(arcology.FSPaternalist += fsGain, 0, 100);
 				break;
 			case "Pastoralist":
-				arcology.FSPastoralist = Math.clamp(arcology.FSPastoralist += fsGain,0,100);
+				arcology.FSPastoralist = Math.clamp(arcology.FSPastoralist += fsGain, 0, 100);
 				break;
 			case "Maturity Preferentialist":
-				arcology.FSMaturityPreferentialist = Math.clamp(arcology.FSMaturityPreferentialist += fsGain,0,100);
+				arcology.FSMaturityPreferentialist = Math.clamp(arcology.FSMaturityPreferentialist += fsGain, 0, 100);
 				break;
 			case "Youth Preferentialist":
-				arcology.FSYouthPreferentialist = Math.clamp(arcology.FSYouthPreferentialist += fsGain,0,100);
+				arcology.FSYouthPreferentialist = Math.clamp(arcology.FSYouthPreferentialist += fsGain, 0, 100);
 				break;
 			case "Body Purist":
-				arcology.FSBodyPurist = Math.clamp(arcology.FSBodyPurist += fsGain,0,100);
+				arcology.FSBodyPurist = Math.clamp(arcology.FSBodyPurist += fsGain, 0, 100);
 				break;
 			case "Slimness Enthusiast":
-				arcology.FSSlimnessEnthusiast = Math.clamp(arcology.FSSlimnessEnthusiast += fsGain,0,100);
+				arcology.FSSlimnessEnthusiast = Math.clamp(arcology.FSSlimnessEnthusiast += fsGain, 0, 100);
 				break;
 		}
 	}
 
 	return t;
-};
\ No newline at end of file
+};
-- 
GitLab