From cd280959b8f0c76c9ebc800ccc623698e9d8f681 Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Sat, 21 May 2022 14:38:39 -0400
Subject: [PATCH] Fixes & cleanup

---
 src/events/RE/reShelterInspection.js | 14 +++++++-------
 src/js/SlaveState.js                 |  2 +-
 src/npc/children/ChildState.js       |  2 +-
 src/player/js/PlayerState.js         |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/events/RE/reShelterInspection.js b/src/events/RE/reShelterInspection.js
index 414f45dc6b1..7e05c7ea0c3 100644
--- a/src/events/RE/reShelterInspection.js
+++ b/src/events/RE/reShelterInspection.js
@@ -113,23 +113,23 @@ App.Events.REShelterInspection = class REShelterInspection extends App.Events.Ba
 		if (S.Bodyguard || V.mercenaries > 1 || (V.SF.Toggle && V.SF.Active >= 1)) {
 			responses.push(new App.Events.Result(`Escort ${him2} off your property`, escortInspectorOut));
 		}
-		if ((V.dairy > 0) && (V.dairyRestraintsSetting > 1) && (inspectee.assignment === "work in the dairy")) {
+		if ((V.dairy > 0) && (V.dairyRestraintsSetting > 1) && (inspectee.assignment === Job.DAIRY)) {
 			responses.push(new App.Events.Result(
 				`The slave is attached to a milking machine in ${V.dairyName}, and so will be the inspector`,
 				dairyInspector,
 				`This will cost ${cashFormat(enslaveCost / 2)}`
 			));
-		} else if ((V.arcade > 0) && (inspectee.assignment === "be confined in the arcade")) {
+		} else if ((V.arcade > 0) && (inspectee.assignment === Job.ARCADE)) {
 			responses.push(new App.Events.Result(
 				`The slave is little more than a hole in ${V.arcadeName}, and so will be the inspector`,
 				arcadeInspector,
 				`This will cost ${cashFormat(enslaveCost / 2)}`
 			));
-		} else if ((inspectee.assignment === "be your agent") || (inspectee.assignment === "live with your agent")) {
+		} else if ((inspectee.assignment === Job.AGENT) || (inspectee.assignment === Job.AGENTPARTNER)) {
 			responses.push(new App.Events.Result(`Your slave is in another arcology`, agent));
 		} else if (inspectee.fuckdoll > 0) {
 			responses.push(new App.Events.Result(`The slave is little more than a latex wrapped doll, and so will be the inspector`, fuckdollInspector, `This will cost ${cashFormat(enslaveCost / 2)}`));
-		} else if ((V.dairyRestraintsSetting < 2) || (inspectee.assignment !== "work in the dairy")) {
+		} else {
 			responses.push(new App.Events.Result(`Allow the inspection`, allow));
 		}
 
@@ -139,7 +139,7 @@ App.Events.REShelterInspection = class REShelterInspection extends App.Events.Ba
 			const el = new DocumentFragment();
 			const r = [];
 			cashX(forceNeg(enslaveCost), "slaveTransfer", inspector);
-			r.push(`${V.assistant.name} ushers ${him2} into your penthouse and keeps ${him2} busy for the few minutes you need to circumvent the Shelter's various legal and contractual defenses to prevent slaveowners from doing exactly what you're doing. Fortunately, you're cleverer and richer than most, and you succeed. You have ${him2} brought into your office, and you are pleased to see ${him2}. ${He2}'s not young and ${he2} 's not pretty, but ${his2} suit cannot disguise ${his2} big bottom, and ${he2}'s using the tablet ${he2} has clasped protectively against ${his2} chest to conceal a huge pair of mature breasts. ${He2} knows exactly what's happened, and fixes you with a gimlet stare.`);
+			r.push(`${V.assistant.name} ushers ${him2} into your penthouse and keeps ${him2} busy for the few minutes you need to circumvent the Shelter's various legal and contractual defenses to prevent slaveowners from doing exactly what you're doing. Fortunately, you're cleverer and richer than most, and you succeed. You have ${him2} brought into your office, and you are pleased to see ${him2}. ${He2}'s not young and ${he2}'s not pretty, but ${his2} suit cannot disguise ${his2} big bottom, and ${he2}'s using the tablet ${he2} has clasped protectively against ${his2} chest to conceal a huge pair of mature breasts. ${He2} knows exactly what's happened, and fixes you with a gimlet stare.`);
 			r.push(Spoken(inspector, `"In a couple of months,"`));
 			r.push(`${he2} ${say2}s with venom,`);
 			r.push(Spoken(inspector, `"when you've filled me full of hormones and drugs and training, and I'm begging you to ${(V.PC.dick !== 0) ? `stick your tiny little dick up` : `fist`} my asshole, remember this. It'll be conditioning and self-preservation and Stockholm Syndrome talking, not me. I think you're a ${(V.PC.title === 1) ? `sad bastard` : `vile cunt`}, and I always will."`));
@@ -560,7 +560,7 @@ App.Events.REShelterInspection = class REShelterInspection extends App.Events.Ba
 						r.push(`The slave looks worried and replies,`);
 						r.push(Spoken(inspector, `"It's kinda big? And I wear it all the time. B-but I like it! It d-doesn't hurt. Well, anymore."`));
 						r.push(`The inspector is not amused. ${He2} offers you a few choice words, makes notes on ${his2} tablet, and storms out.`);
-					} else if ((inspectee.assignment === "whore") || (inspectee.assignment === "work in the brothel") || (inspectee.assignment === "serve the public") || (inspectee.assignment === "serve in the club")) {
+					} else if ([Job.WHORE, Job.BROTHEL, Job.PUBLIC, Job.CLUB].includes(inspectee.assignment)) {
 						r.push(Spoken(inspectee, `"W-well,"`));
 						r.push(`${he} ${say}s,`);
 						r.push(Spoken(inspectee, `"I get fucked there at work."`));
@@ -606,7 +606,7 @@ App.Events.REShelterInspection = class REShelterInspection extends App.Events.Ba
 						r.push(Spoken(inspectee, `It's really big, and I wear it all the time. I like it! It keeps my hole ready for anything."`));
 						r.push(`The inspector looks deflated, and reluctantly makes a positive note on ${his2} tablet.`);
 						V.shelterAbuse -= 1;
-					} else if ((inspectee.assignment === "whore") || (inspectee.assignment === "work in the brothel") || (inspectee.assignment === "serve the public") || (inspectee.assignment === "serve in the club")) {
+					} else if ([Job.WHORE, Job.BROTHEL, Job.PUBLIC, Job.CLUB].includes(inspectee.assignment)) {
 						r.push(Spoken(inspectee, `"I get fucked there at work!"`));
 						r.push(`${he} ${say}s confidently. The inspector frowns.`);
 						r.push(Spoken(inspector, `"How often!?"`));
diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js
index 4e4ffec6e55..75095eb87f0 100644
--- a/src/js/SlaveState.js
+++ b/src/js/SlaveState.js
@@ -1445,7 +1445,7 @@ App.Entity.SlaveState = class SlaveState {
 		 */
 		this.broodmotherFetuses = 0;
 		/**
-		 * If broodmother implant set to pause it 's work.
+		 * If broodmother implant set to pause its work.
 		 *
 		 * 1: implant on pause !1: working.
 		 *
diff --git a/src/npc/children/ChildState.js b/src/npc/children/ChildState.js
index febdfae4c1a..67143dd75b9 100644
--- a/src/npc/children/ChildState.js
+++ b/src/npc/children/ChildState.js
@@ -809,7 +809,7 @@ App.Facilities.Nursery.ChildState = class ChildState {
 		 */
 		this.broodmotherFetuses = 0;
 		/**
-		 * If broodmother implant set to pause it 's work.
+		 * If broodmother implant set to pause its work.
 		 *
 		 * 1: implant on pause !1: working.
 		 *
diff --git a/src/player/js/PlayerState.js b/src/player/js/PlayerState.js
index 47389648642..a62186dcdf3 100644
--- a/src/player/js/PlayerState.js
+++ b/src/player/js/PlayerState.js
@@ -995,7 +995,7 @@ App.Entity.PlayerState = class PlayerState {
 		 */
 		this.broodmotherFetuses = 0;
 		/**
-		 * If broodmother implant set to pause it 's work.
+		 * If broodmother implant set to pause its work.
 		 *
 		 * 1: implant on pause !1: working.
 		 *
-- 
GitLab