From 0eb739c74a50fe8e34ba0ef76c81ad0b0ebe2aaf Mon Sep 17 00:00:00 2001
From: Blank_Alt <12406-Blank_Alt@users.noreply.gitgud.io>
Date: Thu, 16 Jul 2020 19:20:04 -0700
Subject: [PATCH] Wardeness conversion (1/2)

---
 js/003-data/gameVariableData.js               |   3 +-
 src/002-config/fc-version.js                  |   2 +-
 src/004-base/specialSlavesProxy.js            |   2 +-
 .../backwardsCompatibility/datatypeCleanup.js |   2 +-
 src/endWeek/endWeek.js                        |   1 -
 src/endWeek/healthFunctions.js                |   8 +-
 src/endWeek/saGuardYou.js                     |   6 +-
 src/endWeek/saRules_old.js                    |   2 +-
 src/endWeek/saStayConfined.js                 |  22 ++--
 src/endWeek/slaveAssignmentReport.js          |  13 +--
 src/js/assayJS.js                             |   2 +-
 src/js/assignJS.js                            |   4 +-
 src/npc/descriptions/longSlave.js             |   2 +-
 src/npc/descriptions/style/clothing.js        |   8 +-
 src/uncategorized/PETS.tw                     |   2 +-
 src/uncategorized/cellblock.tw                |  12 +-
 src/uncategorized/cellblockReport.tw          | 103 +++++++++---------
 src/uncategorized/randomNonindividualEvent.tw |   2 +-
 src/uncategorized/reNickname.tw               |   2 +-
 src/uncategorized/saLongTermEffects.tw        |  18 ++-
 src/uncategorized/saRelationships.tw          |   2 +-
 src/uncategorized/saRules.tw                  |  22 ++--
 src/uncategorized/wardenessSelect.tw          |   9 +-
 23 files changed, 120 insertions(+), 129 deletions(-)

diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js
index 45fa7048a68..e6afbc72a7f 100644
--- a/js/003-data/gameVariableData.js
+++ b/js/003-data/gameVariableData.js
@@ -1056,8 +1056,7 @@ App.Data.resetOnNGPlus = {
 	Matron: 0,
 	/** @type {FC.SlaveStateOrZero} */
 	Nurse: 0,
-	/** @type {FC.SlaveStateOrZero} */
-	Wardeness: 0,
+	WardenessID: 0,
 	/** @type {FC.SlaveStateOrZero} */
 	Concubine: 0,
 
diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js
index fabf0257a38..c798b23d14c 100644
--- a/src/002-config/fc-version.js
+++ b/src/002-config/fc-version.js
@@ -2,5 +2,5 @@ App.Version = {
 	base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed.
 	pmod: "3.5.4",
 	commitHash: null,
-	release: 1074
+	release: 1075
 };
diff --git a/src/004-base/specialSlavesProxy.js b/src/004-base/specialSlavesProxy.js
index 66590bac3c9..ddfd877b081 100644
--- a/src/004-base/specialSlavesProxy.js
+++ b/src/004-base/specialSlavesProxy.js
@@ -48,7 +48,7 @@ App.SpecialSlavesProxy = class SpecialSlavesProxy {
 		return slaveStateById(V.StudID);
 	}
 	get Wardeness() {
-		return V.Wardeness;
+		return slaveStateById(V.WardenessID)
 	}
 	get activeSlave() {
 		return V.activeSlave;
diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js
index 399e8cf103d..5104a0a1979 100644
--- a/src/data/backwardsCompatibility/datatypeCleanup.js
+++ b/src/data/backwardsCompatibility/datatypeCleanup.js
@@ -1718,7 +1718,7 @@ globalThis.FacilityDatatypeCleanup = (function() {
 		V.cellblock = Math.max(+V.cellblock, 0) || 0;
 		V.cellblockUpgrade = Math.clamp(+V.cellblockUpgrade, 0, 1) || 0;
 		/* wardeness */
-		V.Wardeness = V.slaves.find(s => s.assignment === Job.WARDEN) || 0;
+		V.WardenessID = findSlaveId(s => s.assignment === Job.WARDEN);
 		V.cellblockWardenCumsInside = Math.clamp(+V.cellblockWardenCumsInside, 0, 1) || 0;
 	}
 
diff --git a/src/endWeek/endWeek.js b/src/endWeek/endWeek.js
index 947c7653719..827e5a3a2f2 100644
--- a/src/endWeek/endWeek.js
+++ b/src/endWeek/endWeek.js
@@ -297,7 +297,6 @@ globalThis.endWeek = (function() {
 		V.DJRepBonus = 0;
 		V.Milkmaid = 0;
 		V.Farmer = 0;
-		V.Wardeness = 0;
 		V.Concubine = 0;
 		V.Matron = 0;
 		V.Nurse = 0;
diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js
index 4a39a5eb130..12cc66fc876 100644
--- a/src/endWeek/healthFunctions.js
+++ b/src/endWeek/healthFunctions.js
@@ -475,16 +475,16 @@ globalThis.tired = function(slave) {
 				}
 			}
 		} else if ([Job.CELLBLOCK, Job.CONFINEMENT].includes(slave.assignment)) { // Generally not tiring unless a Wardeness is present, in which case she uses sleep deprivation to break slaves.
-			if (slave.assignment === Job.CELLBLOCK && V.Wardeness !== 0 && slave.fetish !== "mindbroken") {
-				if (V.Wardeness.fetish === "mindbroken") {
+			if (slave.assignment === Job.CELLBLOCK && V.WardenessID !== 0 && slave.fetish !== "mindbroken") {
+				if (S.Wardeness.fetish === "mindbroken") {
 					if (H.tired > 80) {
 						assignment -= 8;
 					} else {
 						assignment += 40;
 					}
-				} else if (V.Wardeness.sexualQuirk === "caring") {
+				} else if (S.Wardeness.sexualQuirk === "caring") {
 					assignment += 5;
-				} else if (V.Wardeness.sexualFlaw === "malicious" || V.Wardeness.sexualFlaw === "abusive") {
+				} else if (S.Wardeness.sexualFlaw === "malicious" || S.Wardeness.sexualFlaw === "abusive") {
 					if (H.condition > 20) {
 						assignment += 40;
 					} else if (H.tired > 80) {
diff --git a/src/endWeek/saGuardYou.js b/src/endWeek/saGuardYou.js
index 17f9fe84035..c4e5f84ec8d 100644
--- a/src/endWeek/saGuardYou.js
+++ b/src/endWeek/saGuardYou.js
@@ -298,9 +298,9 @@ App.SlaveAssignment.guardYou = (function() {
 					}
 				}
 				if (!candidate) {
-					if (V.Wardeness !== 0 && V.Wardeness.skill.combat === 0 && V.Wardeness.fetish !== "mindbroken" && bodyguardSuccessorEligible(V.Wardeness)) {
-						r.push(`${He} does ${his} best to train ${V.Wardeness.slaveName} whenever ${he} can, hoping that your Wardeness can be made capable of stepping into ${his} place.`);
-						candidate = V.Wardeness;
+					if (V.WardenessID !== 0 && S.Wardeness.skill.combat === 0 && S.Wardeness.fetish !== "mindbroken" && bodyguardSuccessorEligible(S.Wardeness)) {
+						r.push(`${He} does ${his} best to train ${S.Wardeness.slaveName} whenever ${he} can, hoping that your Wardeness can be made capable of stepping into ${his} place.`);
+						candidate = S.Wardeness;
 					}
 				}
 				if (!candidate) {
diff --git a/src/endWeek/saRules_old.js b/src/endWeek/saRules_old.js
index cf4c012f03c..67e08787a5d 100644
--- a/src/endWeek/saRules_old.js
+++ b/src/endWeek/saRules_old.js
@@ -465,7 +465,7 @@
 								case "confinement":
 									r += `When ${he} disobeys, ${he}'s`;
 									if (V.cellblock) {
-										r += `<span class="gold">put in $cellblockName</span>${V.Wardeness ? `, where ${he} can experience ${V.Wardeness.slaveName}'s tender mercies` : ``}. `;
+										r += `<span class="gold">put in $cellblockName</span>${V.WardenessID ? `, where ${he} can experience ${S.Wardeness.slaveName}'s tender mercies` : ``}. `;
 									} else {
 										r += `<span class="gold">shut up in a box</span> until ${he} behaves. `;
 									}
diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js
index d5f4ac892aa..3612af99a8f 100644
--- a/src/endWeek/saStayConfined.js
+++ b/src/endWeek/saStayConfined.js
@@ -60,17 +60,17 @@ App.SlaveAssignment.stayConfined = function(slave) {
 			}
 			t += `,</span> so ${his} misery only grows.`;
 		}
-		if (slave.assignment === Job.CELLBLOCK && V.Wardeness !== 0) {
-			t += ` The stress of confinement <span class="red">damages ${his} health.</span> ${V.Wardeness.slaveName}`;
-			if (V.Wardeness.fetish === "mindbroken") {
+		if (slave.assignment === Job.CELLBLOCK && V.WardenessID !== 0) {
+			t += ` The stress of confinement <span class="red">damages ${his} health.</span> ${S.Wardeness.slaveName}`;
+			if (S.Wardeness.fetish === "mindbroken") {
 				if (slave.health.tired > 80) {
 					t += `'s empty mind often overlooks ${him} when ${he} falls inert from exhaustion, giving ${him} <span class="green">a much needed chance to rest.</span>`;
 				} else {
 					t += `'s empty mind is void of mercy; This broken Wardeness sees <span class="red">no need for breaks nor rest.</span>`;
 				}
-			} else if (V.Wardeness.sexualQuirk === "caring") {
+			} else if (S.Wardeness.sexualQuirk === "caring") {
 				t += ` is too caring and has to focus on not coddling ${him}.`;
-			} else if (V.Wardeness.sexualFlaw === "malicious" || V.Wardeness.sexualFlaw === "abusive") {
+			} else if (S.Wardeness.sexualFlaw === "malicious" || S.Wardeness.sexualFlaw === "abusive") {
 				if (slave.health.condition > 20) {
 					t += ` enjoys <span class="red">depriving ${him} of sleep and watching ${him} succumb to fatigue.</span>`;
 				} else if (slave.health.tired > 80) {
@@ -99,14 +99,14 @@ App.SlaveAssignment.stayConfined = function(slave) {
 	}
 	tired(slave);
 
-	if (slave.assignment === Job.CELLBLOCK && V.Wardeness !== 0) {
-		if ((V.Wardeness.sexualFlaw === "malicious" || V.Wardeness.sexualFlaw === "abusive" || V.Wardeness.sexualFlaw === "breast growth") && slave.lactation === 1 && slave.lactationDuration === 0) {
-			t += ` ${V.Wardeness.slaveName} `;
-			if (V.Wardeness.sexualFlaw === "malicious") {
+	if (slave.assignment === Job.CELLBLOCK && V.WardenessID !== 0) {
+		if ((S.Wardeness.sexualFlaw === "malicious" || S.Wardeness.sexualFlaw === "abusive" || S.Wardeness.sexualFlaw === "breast growth") && slave.lactation === 1 && slave.lactationDuration === 0) {
+			t += ` ${S.Wardeness.slaveName} `;
+			if (S.Wardeness.sexualFlaw === "malicious") {
 				t += `savors the torment brought about by ${his} milk-bloated chest and makes sure to milk ${him} thoroughly every other week to maximize ${his} suffering.`;
-			} else if (V.Wardeness.sexualFlaw === "abusive") {
+			} else if (S.Wardeness.sexualFlaw === "abusive") {
 				t += `enjoys neglecting ${his} milk-bloated chest until it gets big and painfully swollen; only then does the abusive jail-keeper roughly drain ${his} sensitive mounds.`;
-			} else if (V.Wardeness.sexualFlaw === "breast growth") {
+			} else if (S.Wardeness.sexualFlaw === "breast growth") {
 				t += `loves watching ${his} breasts steadily swell with pent-up milk and only milks ${him} in order to reset the process.`;
 			}
 		}
diff --git a/src/endWeek/slaveAssignmentReport.js b/src/endWeek/slaveAssignmentReport.js
index eadc1d9ecc9..f34c71d70a7 100644
--- a/src/endWeek/slaveAssignmentReport.js
+++ b/src/endWeek/slaveAssignmentReport.js
@@ -618,24 +618,23 @@ App.EndWeek.slaveAssignmentReport = function() {
 				}
 				break;
 			case Job.WARDEN:
-				V.Wardeness = slave;
 				if (!canWalk(slave)) {
 					_printSlaveUnassignedNote(slave, "is no longer independently mobile");
-					V.Wardeness = 0;
+					V.WardenessID = 0;
 				} else if (!canHold(slave)) {
 					_printSlaveUnassignedNote(slave, `can no longer handle ${getPronouns(slave).his} charges`);
-					V.Wardeness = 0;
+					V.WardenessID = 0;
 				} else if (slave.preg > 37 && slave.broodmother === 2) {
 					_printSlaveUnassignedNote(slave, "spends so much time giving birth and laboring that", `${getPronouns(slave).he} cannot effectively serve as your Wardeness any longer`);
-					V.Wardeness = 0;
+					V.WardenessID = 0;
 				} else if (!canSee(slave)) {
 					_printSlaveUnassignedNote(slave, "can no longer see");
-					V.Wardeness = 0;
+					V.WardenessID = 0;
 				} else if (!canHear(slave)) {
 					_printSlaveUnassignedNote(slave, "can no longer hear");
-					V.Wardeness = 0;
+					V.WardenessID = 0;
 				}
-				if (V.Wardeness === 0) {
+				if (V.WardenessID === 0) {
 					removeJob(slave, Job.WARDEN);
 				}
 				break;
diff --git a/src/js/assayJS.js b/src/js/assayJS.js
index 1162f57c1e3..60710108752 100644
--- a/src/js/assayJS.js
+++ b/src/js/assayJS.js
@@ -78,7 +78,7 @@ globalThis.inferiorRaceP = function(slave) {
  */
 globalThis.isLeaderP = function(slave) {
 	/** @type {FC.SlaveStateOrZero[]} */
-	const leaders = [V.HeadGirl, V.Bodyguard, V.Recruiter, V.Concubine, V.Nurse, S.Attendant, V.Matron, V.Madam, V.DJ, V.Milkmaid, V.Farmer, S.Stewardess, S.Schoolteacher, V.Wardeness];
+	const leaders = [V.HeadGirl, V.Bodyguard, V.Recruiter, V.Concubine, V.Nurse, S.Attendant, V.Matron, V.Madam, V.DJ, V.Milkmaid, V.Farmer, S.Stewardess, S.Schoolteacher, S.Wardeness];
 
 	return leaders.some(leader => leader && leader.ID && leader.ID === slave.ID);
 };
diff --git a/src/js/assignJS.js b/src/js/assignJS.js
index 00b6676067b..099d15b1e42 100644
--- a/src/js/assignJS.js
+++ b/src/js/assignJS.js
@@ -524,8 +524,8 @@ globalThis.removeJob = function(slave, assignment, saveRecord = false) {
 			V.Nurse = 0;
 		} else if (V.StewardessID === slave.ID) {
 			V.StewardessID = 0;
-		} else if (V.Wardeness !== 0 && slave.ID === V.Wardeness.ID) {
-			V.Wardeness = 0;
+		} else if (V.WardenessID === slave.ID) {
+			V.WardenessID = 0;
 		} else if (V.Concubine !== 0 && slave.ID === V.Concubine.ID) {
 			V.Concubine = 0;
 		} else if (slave.ID === V.StudID) {
diff --git a/src/npc/descriptions/longSlave.js b/src/npc/descriptions/longSlave.js
index d011fd18066..9569c7e4b6a 100644
--- a/src/npc/descriptions/longSlave.js
+++ b/src/npc/descriptions/longSlave.js
@@ -445,7 +445,7 @@ App.Desc.longSlave = function(slave = V.activeSlave, {market = 0, eventDescripti
 		} else if ((slave.ID === V.Bodyguard.ID) && slave.scar[scarName].menacing > 0) {
 			r.push(`${His} menacing scar makes ${him} look terrifying. `);
 			break;
-		} else if ((slave.ID === V.Wardeness.ID) && scarCounter > 1) {
+		} else if ((slave.ID === V.WardenessID) && scarCounter > 1) {
 			r.push(`${His} scars make ${him} look like ${he}'s in the right place. `);
 			break;
 		}
diff --git a/src/npc/descriptions/style/clothing.js b/src/npc/descriptions/style/clothing.js
index efa5f2a91fe..72007f3310f 100644
--- a/src/npc/descriptions/style/clothing.js
+++ b/src/npc/descriptions/style/clothing.js
@@ -787,7 +787,7 @@ App.Desc.clothing = function(slave, {market, eventDescription} = {}) {
 				r.push(`${His} uniform is pinned with the`);
 				if (slave.ID === V.Bodyguard.ID || slave.ID === V.HeadGirl.ID || slave.ID === V.Recruiter.ID || slave.ID === V.Concubine.ID) {
 					r.push(`golden whip and manacles insignia of a senior slave officer,`);
-				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.Wardeness.ID)) {
+				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.WardenessID)) {
 					r.push(`golden manacles insignia of a junior slave officer,`);
 				} else if ((slave.skill.combat > 0) && getLimbCount(slave, 105) > 0) {
 					r.push(`silver spear and manacles insignia of an augmented slave soldier,`);
@@ -809,7 +809,7 @@ App.Desc.clothing = function(slave, {market, eventDescription} = {}) {
 				r.push(`${His} uniform is pinned with the`);
 				if (slave.ID === V.Bodyguard.ID || slave.ID === V.HeadGirl.ID || slave.ID === V.Recruiter.ID || slave.ID === V.Concubine.ID) {
 					r.push(`golden whip and manacles insignia of a senior slave officer,`);
-				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.Wardeness.ID)) {
+				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.WardenessID)) {
 					r.push(`golden manacles insignia of a junior slave officer,`);
 				} else if ((slave.skill.combat > 0) && getLimbCount(slave, 105)) {
 					r.push(`silver spear and manacles insignia of an augmented slave soldier,`);
@@ -831,7 +831,7 @@ App.Desc.clothing = function(slave, {market, eventDescription} = {}) {
 				r.push(`${His} uniform is pinned with the`);
 				if ((slave.ID === V.Bodyguard.ID) || (slave.ID === V.HeadGirl.ID) || (slave.ID === V.Recruiter.ID) || (slave.ID === V.Concubine.ID)) {
 					r.push(`golden whip and manacles insignia of a senior slave officer,`);
-				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.Wardeness.ID)) {
+				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.WardenessID)) {
 					r.push(`golden manacles insignia of a junior slave officer,`);
 				} else if ((slave.skill.combat > 0) && getLimbCount(slave, 105)) {
 					r.push(`silver spear and manacles insignia of an augmented slave soldier,`);
@@ -853,7 +853,7 @@ App.Desc.clothing = function(slave, {market, eventDescription} = {}) {
 				r.push(`${His} uniform is pinned with the`);
 				if ((slave.ID === V.Bodyguard.ID) || (slave.ID === V.HeadGirl.ID) || (slave.ID === V.Recruiter.ID) || (slave.ID === V.Concubine.ID)) {
 					r.push(`golden whip and manacles insignia of a senior slave officer,`);
-				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.Wardeness.ID)) {
+				} else if ((slave.ID === V.Madam.ID) || (slave.ID === V.Nurse.ID) || (slave.ID === V.AttendantID) || (slave.ID === V.Matron.ID) || (slave.ID === V.DJ.ID) || (slave.ID === V.Milkmaid.ID) || (slave.ID === V.Farmer.ID) || (slave.ID === V.StewardessID) || (slave.ID === V.SchoolteacherID) || (slave.ID === V.WardenessID)) {
 					r.push(`golden manacles insignia of a junior slave officer,`);
 				} else if ((slave.skill.combat > 0) && getLimbCount(slave, 105)) {
 					r.push(`silver spear and manacles insignia of an augmented slave soldier,`);
diff --git a/src/uncategorized/PETS.tw b/src/uncategorized/PETS.tw
index 68adec6f5e8..527a5eb531b 100644
--- a/src/uncategorized/PETS.tw
+++ b/src/uncategorized/PETS.tw
@@ -49,7 +49,7 @@
 	<<case "aggressive schoolteacher">>
 		<<set $activeSlave = _S.Schoolteacher, $subSlave = $slaves.find(function(s) { return s.assignment == "learn in the schoolroom"; })>>
 	<<case "abusive wardeness">>
-		<<set $activeSlave = $Wardeness, $subSlave = $slaves.find(function(s) { return s.assignment == "be confined in the cellblock"; })>>
+		<<set $activeSlave = _S.Wardeness, $subSlave = $slaves.find(function(s) { return s.assignment == "be confined in the cellblock"; })>>
 	<<case "comforting attendant">>
 		<<set $activeSlave = _S.Attendant, $subSlave = $slaves.find(function(s) { return s.assignment == "rest in the spa"; })>>
 <</switch>>
diff --git a/src/uncategorized/cellblock.tw b/src/uncategorized/cellblock.tw
index b6945d008a6..33ebb3147d7 100644
--- a/src/uncategorized/cellblock.tw
+++ b/src/uncategorized/cellblock.tw
@@ -73,8 +73,8 @@
 		$cellblockNameCaps is full of slaves, though it's difficult to tell at first. In many of the cells, a scene of loneliness and misery may be witnessed, but not one sound escapes them in fear of the punishment that would follow.
 	<<elseif _CL > 0>>
 		$cellblockNameCaps holds a few slaves, though it's difficult to tell at first. In several of the cells, a scene of loneliness and misery may be witnessed, but not one sound escapes them in fear of the punishment that would follow.
-	<<elseif $Wardeness != 0>>
-		$Wardeness.slaveName is alone in the cellblock, and seems rather lonely without anyone to oppress.
+	<<elseif _S.Wardeness>>
+		_S.Wardeness.slaveName is alone in the cellblock, and seems rather lonely without anyone to oppress.
 	<<else>>
 		None of your slaves are confined in the cellblock.
 		<div class="choices" style="font-style:normal">
@@ -114,17 +114,17 @@
 </div>
 
 <p>
-	<<if $Wardeness != 0 && canPenetrate($Wardeness)>>
-		<<setLocalPronouns $Wardeness>>
+	<<if _S.Wardeness && canPenetrate(_S.Wardeness)>>
+		<<setLocalPronouns _S.Wardeness>>
 		<<if $cellblockWardenCumsInside == 1>>
-			$Wardeness.slaveName is permitted to cum inside $his inmates when $he disciplines them.
+			_S.Wardeness.slaveName is permitted to cum inside $his inmates when $he disciplines them.
 			<div class="choices">
 				<<link "Forbid $him from cumming inside" "Cellblock">>
 					<<set $cellblockWardenCumsInside = 0>>
 				<</link>>
 			</div>
 		<<else>>
-			$Wardeness.slaveName is not permitted to cum inside $his inmates.
+			_S.Wardeness.slaveName is not permitted to cum inside $his inmates.
 			<div class="choices">
 				<<link "Let $him cum inside" "Cellblock">>
 					<<set $cellblockWardenCumsInside = 1>>
diff --git a/src/uncategorized/cellblockReport.tw b/src/uncategorized/cellblockReport.tw
index 4738d770d7e..96f92583c6a 100644
--- a/src/uncategorized/cellblockReport.tw
+++ b/src/uncategorized/cellblockReport.tw
@@ -9,46 +9,44 @@
 	<<set _devBonus = 0>>
 <</if>>
 
-<<if ($Wardeness != 0)>>
-	<<set _FLs = $slaveIndices[$Wardeness.ID]>>
-	<<setLocalPronouns $Wardeness>>
+<<if (_S.Wardeness)>>
+	<<setLocalPronouns _S.Wardeness>>
 
-	<<if ($slaves[_FLs].health.condition < -80)>>
-		<<run improveCondition($slaves[_FLs], 20)>>
-	<<elseif ($slaves[_FLs].health.condition < -40)>>
-		<<run improveCondition($slaves[_FLs], 15)>>
-	<<elseif ($slaves[_FLs].health.condition < 0)>>
-		<<run improveCondition($slaves[_FLs], 10)>>
-	<<elseif ($slaves[_FLs].health.condition < 90)>>
-		<<run improveCondition($slaves[_FLs], 7)>>
+	<<if (_S.Wardeness.health.condition < -80)>>
+		<<run improveCondition(_S.Wardeness, 20)>>
+	<<elseif (_S.Wardeness.health.condition < -40)>>
+		<<run improveCondition(_S.Wardeness, 15)>>
+	<<elseif (_S.Wardeness.health.condition < 0)>>
+		<<run improveCondition(_S.Wardeness, 10)>>
+	<<elseif (_S.Wardeness.health.condition < 90)>>
+		<<run improveCondition(_S.Wardeness, 7)>>
 	<</if>>
-	<<if ($slaves[_FLs].devotion <= 60)>>
-		<<set $slaves[_FLs].devotion += 2>>
+	<<if (_S.Wardeness.devotion <= 60)>>
+		<<set _S.Wardeness.devotion += 2>>
 	<</if>>
-	<<set $slaves[_FLs].devotion += _devBonus>>
-	<<if $slaves[_FLs].trust < 60>>
-		<<set $slaves[_FLs].trust += 3>>
+	<<set _S.Wardeness.devotion += _devBonus>>
+	<<if _S.Wardeness.trust < 60>>
+		<<set _S.Wardeness.trust += 3>>
 	<</if>>
-	<<if ($slaves[_FLs].rules.living != "luxurious")>>
-		<<set $slaves[_FLs].rules.living = "luxurious">>
+	<<if (_S.Wardeness.rules.living != "luxurious")>>
+		<<set _S.Wardeness.rules.living = "luxurious">>
 	<</if>>
-	<<if $slaves[_FLs].fetishStrength <= 95>>
-		<<if $slaves[_FLs].fetish != "sadist">>
-			<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
-				<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "sadist">>
+	<<if _S.Wardeness.fetishStrength <= 95>>
+		<<if _S.Wardeness.fetish != "sadist">>
+			<<if fetishChangeChance(_S.Wardeness) > random(0,100)>>
+				<<set _FLsFetish = 1, _S.Wardeness.fetishKnown = 1, _S.Wardeness.fetish = "sadist">>
 			<</if>>
-		<<elseif $slaves[_FLs].fetishKnown == 0>>
-			<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
+		<<elseif _S.Wardeness.fetishKnown == 0>>
+			<<set _FLsFetish = 1, _S.Wardeness.fetishKnown = 1>>
 		<<else>>
-			<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
+			<<set _FLsFetish = 2, _S.Wardeness.fetishStrength += 4>>
 		<</if>>
 	<</if>>
-	<<set $Wardeness = $slaves[_FLs]>>
-	<<if ($Wardeness.energy > 95) || ($Wardeness.fetish == "sadist")>>
+	<<if (_S.Wardeness.energy > 95) || (_S.Wardeness.fetish == "sadist")>>
 		<<set _devBonus++, _trustMalus++, _idleBonus++>>
 	<</if>>
-	&nbsp;&nbsp;&nbsp;&nbsp;<<= SlaveFullName($Wardeness)>> is serving as the Wardeness.
-	<<if $Wardeness.relationship == -3 && $Wardeness.devotion > 50>>
+	&nbsp;&nbsp;&nbsp;&nbsp;<<= SlaveFullName(_S.Wardeness)>> is serving as the Wardeness.
+	<<if _S.Wardeness.relationship == -3 && _S.Wardeness.devotion > 50>>
 		<<set _devBonus++, _trustMalus++, _idleBonus++>>
 		As your $wife, $he tries $his best to break the disobedient slaves to your will.
 	<</if>>
@@ -57,62 +55,62 @@
 	<<elseif (_FLsFetish == 2)>>
 		Being not only allowed but encouraged to get off while punishing prisoners @@.lightsalmon;deepens $his sadism.@@
 	<</if>>
-	<<if setup.wardenessCareers.includes($Wardeness.career)>>
+	<<if setup.wardenessCareers.includes(_S.Wardeness.career)>>
 		<<set _devBonus++, _trustMalus++, _idleBonus++>>
 		$He has experience with detecting security issues and grinding down potential miscreants from $his life before $he was a slave, making $him more effective.
-	<<elseif $Wardeness.skill.wardeness >= $masteredXP>>
+	<<elseif _S.Wardeness.skill.wardeness >= $masteredXP>>
 		<<set _devBonus++, _trustMalus++, _idleBonus++>>
 		$He has experience with detecting security issues and grinding down potential miscreants from working for you, making $him more effective.
 	<<else>>
-		<<set $slaves[_FLs].skill.wardeness += random(1,Math.ceil(($Wardeness.intelligence+$Wardeness.intelligenceImplant)/15) + 8)>>
+		<<set _S.Wardeness.skill.wardeness += random(1,Math.ceil((_S.Wardeness.intelligence+_S.Wardeness.intelligenceImplant)/15) + 8)>>
 	<</if>>
-	<<if $Wardeness.fetish == "sadist">>
+	<<if _S.Wardeness.fetish == "sadist">>
 		$He uses the prisoners to gratify $his sadism, terrifying them and quickly breaking their resistance.
-	<<elseif $Wardeness.energy > 95>>
+	<<elseif _S.Wardeness.energy > 95>>
 		$He is so sexually depraved that $he constantly molests the prisoners, breaking them to a life of servitude.
 	<</if>>
-	<<if $Wardeness.sexualFlaw == "malicious" || $Wardeness.sexualFlaw == "abusive">>
+	<<if _S.Wardeness.sexualFlaw == "malicious" || _S.Wardeness.sexualFlaw == "abusive">>
 		<<set _devBonus++, _trustMalus += 2, _idleBonus += 2>>
 		Sexual abuse of prisoners has become an end for $him, not a means. $He inspires $his prisoners to do everything possible to qualify to get away from $him, even as $he slowly grinds away their interest in sex to do it.
-	<<elseif $Wardeness.sexualQuirk == "caring">>
+	<<elseif _S.Wardeness.sexualQuirk == "caring">>
 		<<set _devBonus--, _trustMalus--, _idleBonus-->>
 		$His kindness sometimes shows through $his tough facade, letting prisoners get off easier than they should.
 	<</if>>
-	<<if ($Wardeness.dick > 2) && (canPenetrate($Wardeness))>>
+	<<if (_S.Wardeness.dick > 2) && (canPenetrate(_S.Wardeness))>>
 		<<set _devBonus++, _trustMalus++, _idleBonus++>>
 		$His molestation of the prisoners is more varied and effective because $he has a dick to fuck them with.
 	<</if>>
-	<<if ($Wardeness.muscles > 35)>>
+	<<if (_S.Wardeness.muscles > 35)>>
 		<<set _devBonus++, _trustMalus++, _idleBonus++>>
 		$He is strong enough to restrain anyone that tries anything with $his own hands.
 	<</if>>
-	<<if ($Wardeness.devotion > 95)>>
+	<<if (_S.Wardeness.devotion > 95)>>
 		<<set _devBonus++, _trustMalus++, _idleBonus++>>
 		$His devotion to you is so absolute that $he sees breaking bitches for your service as a noble calling.
 	<</if>>
 	<<for _slave range _slaves>>
-		<<if $Wardeness.rivalryTarget == _slave.ID>>
-			$He greatly enjoys breaking $his <<print rivalryTerm($Wardeness)>>, _slave.slaveName's will.
+		<<if _S.Wardeness.rivalryTarget == _slave.ID>>
+			$He greatly enjoys breaking $his <<print rivalryTerm(_S.Wardeness)>>, _slave.slaveName's will.
 			<<set _slave.devotion++, _slave.trust -= 3>>
 			<<if random(1,100) > 30>>
-				<<set $Wardeness.rivalry++, $slaves[_FLs].rivalry++, _slave.rivalry++>>
+				<<set _S.Wardeness.rivalry++, _slave.rivalry++>>
 			<</if>>
-		<<elseif $Wardeness.relationshipTarget == _slave.ID>>
-			$He hates having to break $his <<print relationshipTerm($Wardeness)>>, _slave.slaveName, but $his devotion to you wins out in the end.
+		<<elseif _S.Wardeness.relationshipTarget == _slave.ID>>
+			$He hates having to break $his <<print relationshipTerm(_S.Wardeness)>>, _slave.slaveName, but $his devotion to you wins out in the end.
 			<<set _slave.devotion++, _slave.trust -= 3>>
 			<<if random(1,100) >= 50>>
 				$His and _slave.slaveName's relationship has been shattered by these events.
-				<<set $Wardeness.relationship = 0, $Wardeness.relationshipTarget = 0, $slaves[_FLs].relationship = 0, $slaves[_FLs].relationshipTarget = 0, _slave.relationship = 0, _slave.relationshipTarget = 0>>
+				<<set _S.Wardeness.relationship = 0, _S.Wardeness.relationshipTarget = 0 _slave.relationship = 0, _slave.relationshipTarget = 0>>
 			<</if>>
-		<<elseif areRelated($Wardeness, _slave)>>
+		<<elseif areRelated(_S.Wardeness, _slave)>>
 			<<setLocalPronouns _slave 2>>
-			$He shows $his <<print relativeTerm($Wardeness,_slave)>> _slave.slaveName no mercy, making sure _he2 understands _his2 place.
+			$He shows $his <<print relativeTerm(_S.Wardeness,_slave)>> _slave.slaveName no mercy, making sure _he2 understands _his2 place.
 			<<set _slave.devotion++, _slave.trust-->>
 		<</if>>
 	<</for>>
 	<<if (_DL < $cellblock)>>
 		<<set _seed = random(1,10)+(($cellblock-_DL)*(random(150,170)+(_idleBonus*10)))>>
-		<<run cashX(_seed, "cellblock", $Wardeness)>>
+		<<run cashX(_seed, "cellblock", _S.Wardeness)>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;Since $he doesn't have enough prisoners to manage to keep $him busy, $he works on citizens' slaves, earning @@.yellowgreen;<<print cashFormat(_seed)>>.@@
 	<</if>>
 	<<if (_DL > 0)>><br><br><</if>>
@@ -122,14 +120,14 @@
 	&nbsp;&nbsp;&nbsp;&nbsp;<<if (_DL == 1)>>''One slave is being confined in $cellblockName until they are willing to obey.''<<else>>''_DL slaves are being confined in $cellblockName until they are willing to obey.''<</if>>
 <</if>>
 
-<<if ($Wardeness != 0)>>
+<<if (_S.Wardeness)>>
 	<<set $i = _FLs>> /* apply following SA passages to facility leader */
 	<<if $showEWD != 0>>
 		<br><br>
 		/* 000-250-006 */
 		<<if $seeImages && $seeReportImages>>
 		<div class="imageRef tinyImg">
-			<<= SlaveArt($slaves[_FLs], 0, 0)>>
+			<<= SlaveArt(_S.Wardeness, 0, 0)>>
 		</div>
 		<</if>>
 		/* 000-250-006 */
@@ -157,7 +155,6 @@
 		<<include "SA devotion">>
 		<</silently>>
 	<</if>>
-	<<set $Wardeness = $slaves[_FLs]>>
 <</if>>
 
 <<for _slave range _slaves>>
@@ -228,7 +225,7 @@
 		<</if>>
 	<</if>>
 	<<set _slave.devotion += _devBonus, _slave.trust -= _trustMalus>>
-	<<if ($Wardeness != 0) && ($Wardeness.sexualFlaw == "malicious") && (_slave.energy >= 2)>>
+	<<if (_S.Wardeness) && (_S.Wardeness.sexualFlaw == "malicious") && (_slave.energy >= 2)>>
 		<<set _slave.energy -= 2>>
 	<</if>>
 	<<if (_slave.health.condition < -80)>>
@@ -301,6 +298,6 @@
 		<</if>>
 	<</if>>
 <</if>>
-<<if _DL > 0 || $Wardeness != 0>>
+<<if _DL > 0 || _S.Wardeness>>
 	<br><br>
 <</if>>
diff --git a/src/uncategorized/randomNonindividualEvent.tw b/src/uncategorized/randomNonindividualEvent.tw
index 8fbf633a0ab..2c8cd52eafc 100644
--- a/src/uncategorized/randomNonindividualEvent.tw
+++ b/src/uncategorized/randomNonindividualEvent.tw
@@ -431,7 +431,7 @@
 		<<set $PETSevent.push("aggressive schoolteacher")>>
 	<</if>>
 
-	<<if ($Wardeness != 0) && (_L.cellblock > 0) && canTalk($Wardeness)>>
+	<<if (_S.Wardeness) && (_L.cellblock > 0) && canTalk(_S.Wardeness)>>
 		<<set $PETSevent.push("abusive wardeness")>>
 	<</if>>
 
diff --git a/src/uncategorized/reNickname.tw b/src/uncategorized/reNickname.tw
index 0ef60533fb0..1e934427345 100644
--- a/src/uncategorized/reNickname.tw
+++ b/src/uncategorized/reNickname.tw
@@ -128,7 +128,7 @@
 <<if ($activeSlave.ID == $Recruiter.ID)>>
 	<<set _qualifiedNicknames.push("Recruiter")>>
 <</if>>
-<<if ($activeSlave.ID == $Wardeness.ID)>>
+<<if ($activeSlave.ID == $WardenessID)>>
 	<<set _qualifiedNicknames.push("Wardeness")>>
 <</if>>
 <<if ($activeSlave.ID == $Milkmaid.ID)>>
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index 73b835ea8fc..79f05272097 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -2868,15 +2868,13 @@
 						<</if>>
 					<<case "sadist">>
 						<<if $slaves[$i].sexualFlaw != "malicious">>
-							<<if $Wardeness != 0>>
-								<<if $slaves[$i].ID == $Wardeness.ID>>
-									As Wardeness, $he becomes @@.yellow;sexually addicted to inflicting pain and anguish.@@
-									<<set $slaves[$i].sexualFlaw = "malicious">>
-									<<set $slaves[$i].fetishStrength = 100>>
-									<<if $arcologies[0].FSHedonisticDecadence != "unset">>
-										Allowing $him to indulge in $his fetish to the point of obsession advances hedonism and @@.green;bolsters your reputation.@@
-										<<= FutureSocieties.Change("Hedonistic", 2)>>
-									<</if>>
+							<<if $slaves[$i].ID == $WardenessID>>
+								As Wardeness, $he becomes @@.yellow;sexually addicted to inflicting pain and anguish.@@
+								<<set $slaves[$i].sexualFlaw = "malicious">>
+								<<set $slaves[$i].fetishStrength = 100>>
+								<<if $arcologies[0].FSHedonisticDecadence != "unset">>
+									Allowing $him to indulge in $his fetish to the point of obsession advances hedonism and @@.green;bolsters your reputation.@@
+									<<= FutureSocieties.Change("Hedonistic", 2)>>
 								<</if>>
 							<<elseif $slaves[$i].aphrodisiacs > 0 || $slaves[$i].inflationType == "aphrodisiac">>
 								<<if $slaves[$i].addict > 2>>
@@ -8661,7 +8659,7 @@
 		<</if>>
 	<</if>>
 	<<if $slaves[$i].lactationDuration == 0>>
-		<<if ($Wardeness !== 0 && $slaves[$i].assignment == "be confined in the cellblock" && ($Wardeness.sexualFlaw == "malicious" || $Wardeness.sexualFlaw == "abusive" || $Wardeness.sexualFlaw == "breast growth"))>>
+		<<if (_S.Wardeness !== null && $slaves[$i].assignment == "be confined in the cellblock" && (_S.Wardeness.sexualFlaw == "malicious" || _S.Wardeness.sexualFlaw == "abusive" || _S.Wardeness.sexualFlaw == "breast growth"))>>
 			<<set $slaves[$i].boobs -= $slaves[$i].boobsMilk>>
 			<<set $slaves[$i].boobsMilk = 0, $slaves[$i].lactationDuration = 2>>
 		<<elseif ($slaves[$i].drugs == "fertility drugs" || $slaves[$i].drugs == "super fertility drugs")>>
diff --git a/src/uncategorized/saRelationships.tw b/src/uncategorized/saRelationships.tw
index 0184c02cd4c..49822c11a94 100644
--- a/src/uncategorized/saRelationships.tw
+++ b/src/uncategorized/saRelationships.tw
@@ -152,7 +152,7 @@
 							<<set _SlaveI.trust -= 4>>
 						<</if>>
 					<</if>>
-				<<elseif (_SlaveJ.ID == $Wardeness.ID) && (_SlaveI.assignment == "be confined in the cellblock")>>
+				<<elseif (_SlaveJ.ID == $WardenessID) && (_SlaveI.assignment == "be confined in the cellblock")>>
 					<<if _SlaveJ.rules.relationship != "restrictive">>
 						_SlaveI.slaveName manages to earn the respect of the Wardeness, _SlaveJ.slaveName. The two slaves have @@.lightgreen;struck up a friendship.@@
 						<<set _SlaveJ.relationship = 1, _SlaveJ.relationshipTarget = _SlaveI.ID, _SlaveI.relationship = 1, _SlaveI.relationshipTarget = _SlaveJ.ID>>
diff --git a/src/uncategorized/saRules.tw b/src/uncategorized/saRules.tw
index 1d6a6043108..e47fed9f833 100644
--- a/src/uncategorized/saRules.tw
+++ b/src/uncategorized/saRules.tw
@@ -638,7 +638,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he
 					<<if $cellblock != 0>>
-						@@.gold;spends $his off hours in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;spends $his off hours in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						spends $his off hours @@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
@@ -1221,7 +1221,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he
 					<<if $cellblock != 0>>
-						@@.gold;spends $his off hours in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;spends $his off hours in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						spends $his off hours @@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
@@ -1885,10 +1885,10 @@
 					<<run actX(_S.Wardeness, "penetrative", _wardenFunTimes)>>
 					<<if _wardenFunTimes > 0 && canImpreg($slaves[$i], _S.Wardeness) && ($cellblockWardenCumsInside == 1 || _S.Wardeness.fetish == "mindbroken")>>
 						<<if ($slaves[$i].vagina > 0 && $slaves[$i].ovaries == 1)>>
-							<<= knockMeUp($slaves[$i], 10, 0, _S.Wardeness.ID, 1)>>
+							<<= knockMeUp($slaves[$i], 10, 0, $WardenessID, 1)>>
 							<<run seX($slaves[$i], "vaginal", _S.Wardeness, 1)>>
 						<<elseif ($slaves[$i].anus > 0 && $slaves[$i].mpreg == 1)>>
-							<<= knockMeUp($slaves[$i], 10, 1, _S.Wardeness.ID, 1)>>
+							<<= knockMeUp($slaves[$i], 10, 1, $WardenessID, 1)>>
 							<<run seX($slaves[$i], "anal", _S.Wardeness, 1)>>
 						<</if>>
 					<</if>>
@@ -2549,7 +2549,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he's
 					<<if $cellblock != 0>>
-						@@.gold;put in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;put in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						@@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
@@ -3108,7 +3108,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he's
 					<<if $cellblock != 0>>
-						@@.gold;put in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;put in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						@@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
@@ -3663,7 +3663,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he
 					<<if $cellblock != 0>>
-						@@.gold;spends after class in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's method of teaching<</if>>.
+						@@.gold;spends after class in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's method of teaching<</if>>.
 					<<else>>
 						spends $his off hours @@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
@@ -4267,7 +4267,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he
 					<<if $cellblock != 0>>
-						@@.gold;spends $his day (and night) cleaning the cells in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;spends $his day (and night) cleaning the cells in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						spends $his day @@.gold;shut up in a dirty bathroom@@ until it's spotless.
 					<</if>>
@@ -5690,7 +5690,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he's
 					<<if $cellblock != 0>>
-						@@.gold;put in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;put in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						@@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
@@ -5861,7 +5861,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he
 					<<if $cellblock != 0>>
-						@@.gold;spends $his time in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;spends $his time in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						spends $his time @@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
@@ -6345,7 +6345,7 @@
 				<<case "confinement">>
 					When $he disobeys, $he's
 					<<if $cellblock != 0>>
-						@@.gold;put in $cellblockName@@<<if $Wardeness != 0>>, where $he can experience $Wardeness.slaveName's tender mercies<</if>>.
+						@@.gold;put in $cellblockName@@<<if _S.Wardeness>>, where $he can experience _S.Wardeness.slaveName's tender mercies<</if>>.
 					<<else>>
 						@@.gold;shut up in a box@@ until $he behaves.
 					<</if>>
diff --git a/src/uncategorized/wardenessSelect.tw b/src/uncategorized/wardenessSelect.tw
index 09e2071672a..d64de5bdce2 100644
--- a/src/uncategorized/wardenessSelect.tw
+++ b/src/uncategorized/wardenessSelect.tw
@@ -1,15 +1,14 @@
 :: Wardeness Select [nobr jump-to-safe jump-hidden jump-from-safe]
 
 <<set $nextButton = "Back", $nextLink = "Cellblock", $encyclopedia = "Wardeness">>
-<<if ($Wardeness != 0)>>
-	<<set $Wardeness = getSlave($Wardeness.ID)>>
-	<<setLocalPronouns $Wardeness>>
-	<span class='slave-name'><<= SlaveFullName($Wardeness)>></span> is serving as your Wardeness.<br><br>$He will help break your prisoners.
+<<if (_S.Wardeness)>>
+	<<setLocalPronouns _S.Wardeness>>
+	<span class='slave-name'><<= SlaveFullName(_S.Wardeness)>></span> is serving as your Wardeness.<br><br>$He will help break your prisoners.
 <<else>>
 	You have not selected a Wardeness.
 <</if>>
 
 <br><br>''Appoint a Wardeness from your devoted slaves:''
-<br><br>[[None|Cellblock][removeJob($Wardeness, "be the Wardeness")]]
+<br><br>[[None|Cellblock][removeJob(_S.Wardeness, "be the Wardeness")]]
 <br><br>
 <<print App.UI.SlaveList.facilityManagerSelection(App.Entity.facilities.cellblock, "Cellblock")>>
-- 
GitLab