From 8c3a54ee606179ab2f49c53f6f660e35cf1e3728 Mon Sep 17 00:00:00 2001
From: Skriv <skrivelese@gmail.com>
Date: Wed, 20 Mar 2019 22:24:34 +0100
Subject: [PATCH] assignJS

---
 src/js/assignJS.js | 262 ++++++++++++++++++++++-----------------------
 1 file changed, 131 insertions(+), 131 deletions(-)

diff --git a/src/js/assignJS.js b/src/js/assignJS.js
index 9da3181848d..af4e705db55 100644
--- a/src/js/assignJS.js
+++ b/src/js/assignJS.js
@@ -372,139 +372,139 @@ window.removeJob = function removeJob(slave, assignment) {
 
 		/* use .toLowerCase() to get rid of a few dupe conditions. */
 		switch (assignment.toLowerCase()) {
-		case "be confined in the arcade":
-		case "arcade":
-			slave.assignment = "work a glory hole";
-			V.ArcadeiIDs.delete(slave.ID);
-			V.arcadeSlaves--;
-			break;
-
-		case "work in the brothel":
-		case "brothel":
-			slave.assignment = "whore";
-			V.BrothiIDs.delete(slave.ID);
-			V.brothelSlaves--;
-			break;
-
-		case "be confined in the cellblock":
-		case "cellblock":
-			slave.assignment = "rest";
-			if (slave.inflation > 0) {
-				slave.inflation = 0;
-				slave.inflationType = "none";
-				slave.inflationMethod = 0;
-				SetBellySize(slave);
-			}
-			V.CellBiIDs.delete(slave.ID);
-			V.cellblockSlaves--;
-			break;
-
-		case "get treatment in the clinic":
-		case "clinic":
-			slave.assignment = "rest";
-			V.CliniciIDs.delete(slave.ID);
-			V.clinicSlaves--;
-			break;
-
-		case "serve in the club":
-		case "club":
-			slave.assignment = "serve the public";
-			V.ClubiIDs.delete(slave.ID);
-			V.clubSlaves--;
-			break;
-
-		case "work in the dairy":
-		case "dairy":
-			slave.assignment = "get milked";
-			V.DairyiIDs.delete(slave.ID);
-			V.dairySlaves--;
-			break;
-
-		case "work as a farmhand":
-		case "farmyard":
-			slave.assignment = "rest";
-			V.FarmyardiIDs.delete(slave.ID);
-			V.farmyardSlaves--;
-			break;
-
-		case "learn in the schoolroom":
-		case "schoolroom":
-			slave.assignment = "rest";
-			V.SchlRiIDs.delete(slave.ID);
-			V.schoolroomSlaves--;
-			break;
-
-		case "rest in the spa":
-		case "spa":
-			slave.assignment = "rest";
-			V.SpaiIDs.delete(slave.ID);
-			V.spaSlaves--;
-			break;
-
-		case "work as a servant":
-		case "servants' quarters":
-		case "servantsquarters":
-			slave.assignment = "be a servant";
-			V.ServQiIDs.delete(slave.ID);
-			V.servantsQuartersSlaves--;
-			break;
-
-		case "serve in the master suite":
-		case "master suite":
-		case "mastersuite":
-			slave.assignment = "please you";
-			V.MastSiIDs.delete(slave.ID);
-			V.masterSuiteSlaves--;
-			break;
-
-		case "live with your head girl":
-		case "head girl suite":
-		case "hgsuite":
-			slave.assignment = "rest";
-			V.HGSuiteiIDs.delete(slave.ID);
-			V.HGSuiteSlaves--;
-			break;
-
-		case "work as a nanny":
-		case "nursery":
-			slave.assignment = "rest";
-			V.NurseryiIDs.delete(slave.ID);
-			V.nurserySlaves--;
-			break;
-
-		case "be your head girl":
-			slave.assignment = "rest";
-			if (V.HGSuiteEquality === 0 && V.personalAttention === "HG") {
-				if (V.PC.career === "escort")
-					V.personalAttention = "whoring";
-				else if (V.PC.career === "servant")
-					V.personalAttention = "upkeep";
-				else
-					V.personalAttention = "business";
-
-				r += `You no longer have a slave assigned to be your Head Girl, so you turn your personal attention to focus on ${V.personalAttention}.`;
-			}
-			break;
-
-		case "be your agent":
-		case "live with your agent":
-			slave.assignment = "rest";
-			const _leaderIndex = V.leaders.findIndex(function(x) { return x.ID === slave.ID; });
-			if (_leaderIndex !== -1)
-				V.leaders.deleteAt(_leaderIndex);
-
-			if (slave.relationshipTarget > 0) { /* following code assumes there can be at most one companion */
-				const _lover = V.slaves.findIndex(function(s) { return haveRelationshipP(s, slave) && s.assignment === "live with your agent"; });
-				if (_lover !== -1) {
-					V.slaves[_lover].assignment = "rest";
-					V.slaves[_lover].assignmentVisible = 1;
+			case "be confined in the arcade":
+			case "arcade":
+				slave.assignment = "work a glory hole";
+				V.ArcadeiIDs.delete(slave.ID);
+				V.arcadeSlaves--;
+				break;
+
+			case "work in the brothel":
+			case "brothel":
+				slave.assignment = "whore";
+				V.BrothiIDs.delete(slave.ID);
+				V.brothelSlaves--;
+				break;
+
+			case "be confined in the cellblock":
+			case "cellblock":
+				slave.assignment = "rest";
+				if (slave.inflation > 0) {
+					slave.inflation = 0;
+					slave.inflationType = "none";
+					slave.inflationMethod = 0;
+					SetBellySize(slave);
 				}
-			}
-			break;
+				V.CellBiIDs.delete(slave.ID);
+				V.cellblockSlaves--;
+				break;
+
+			case "get treatment in the clinic":
+			case "clinic":
+				slave.assignment = "rest";
+				V.CliniciIDs.delete(slave.ID);
+				V.clinicSlaves--;
+				break;
+
+			case "serve in the club":
+			case "club":
+				slave.assignment = "serve the public";
+				V.ClubiIDs.delete(slave.ID);
+				V.clubSlaves--;
+				break;
+
+			case "work in the dairy":
+			case "dairy":
+				slave.assignment = "get milked";
+				V.DairyiIDs.delete(slave.ID);
+				V.dairySlaves--;
+				break;
+
+			case "work as a farmhand":
+			case "farmyard":
+				slave.assignment = "rest";
+				V.FarmyardiIDs.delete(slave.ID);
+				V.farmyardSlaves--;
+				break;
+
+			case "learn in the schoolroom":
+			case "schoolroom":
+				slave.assignment = "rest";
+				V.SchlRiIDs.delete(slave.ID);
+				V.schoolroomSlaves--;
+				break;
+
+			case "rest in the spa":
+			case "spa":
+				slave.assignment = "rest";
+				V.SpaiIDs.delete(slave.ID);
+				V.spaSlaves--;
+				break;
+
+			case "work as a servant":
+			case "servants' quarters":
+			case "servantsquarters":
+				slave.assignment = "be a servant";
+				V.ServQiIDs.delete(slave.ID);
+				V.servantsQuartersSlaves--;
+				break;
+
+			case "serve in the master suite":
+			case "master suite":
+			case "mastersuite":
+				slave.assignment = "please you";
+				V.MastSiIDs.delete(slave.ID);
+				V.masterSuiteSlaves--;
+				break;
+
+			case "live with your head girl":
+			case "head girl suite":
+			case "hgsuite":
+				slave.assignment = "rest";
+				V.HGSuiteiIDs.delete(slave.ID);
+				V.HGSuiteSlaves--;
+				break;
+
+			case "work as a nanny":
+			case "nursery":
+				slave.assignment = "rest";
+				V.NurseryiIDs.delete(slave.ID);
+				V.nurserySlaves--;
+				break;
+
+			case "be your head girl":
+				slave.assignment = "rest";
+				if (V.HGSuiteEquality === 0 && V.personalAttention === "HG") {
+					if (V.PC.career === "escort")
+						V.personalAttention = "whoring";
+					else if (V.PC.career === "servant")
+						V.personalAttention = "upkeep";
+					else
+						V.personalAttention = "business";
+
+					r += `You no longer have a slave assigned to be your Head Girl, so you turn your personal attention to focus on ${V.personalAttention}.`;
+				}
+				break;
+
+			case "be your agent":
+			case "live with your agent":
+				slave.assignment = "rest";
+				const _leaderIndex = V.leaders.findIndex(function(x) { return x.ID === slave.ID; });
+				if (_leaderIndex !== -1)
+					V.leaders.deleteAt(_leaderIndex);
+
+				if (slave.relationshipTarget > 0) { /* following code assumes there can be at most one companion */
+					const _lover = V.slaves.findIndex(function(s) { return haveRelationshipP(s, slave) && s.assignment === "live with your agent"; });
+					if (_lover !== -1) {
+						V.slaves[_lover].assignment = "rest";
+						V.slaves[_lover].assignmentVisible = 1;
+					}
+				}
+				break;
 
-		default:
-			slave.assignment = "rest";
-			break;
+			default:
+				slave.assignment = "rest";
+				break;
 		}
 
 		if (slave.livingRules === "luxurious" && slave.assignmentVisible !== 1)
-- 
GitLab