From 3f950f2c67a00363ac3bba505aad1241a9243dea Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Thu, 20 Dec 2018 05:15:03 -0500
Subject: [PATCH] more work

---
 devNotes/twine JS.txt                        | 12 +++++--
 player variables documentation - Pregmod.txt |  6 ++++
 src/events/intro/introSummary.tw             |  4 +--
 src/events/intro/pcBodyIntro.tw              |  8 ++---
 src/js/wombJS.tw                             | 14 ++++++--
 src/pregmod/cloningWorkaround.tw             | 12 +++----
 src/pregmod/geneLab.tw                       |  2 +-
 src/pregmod/managePersonalAffairs.tw         |  3 ++
 src/pregmod/surrogacy.tw                     | 37 +++++++++++++++-----
 src/pregmod/widgets/pregmodWidgets.tw        |  2 +-
 src/uncategorized/BackwardsCompatibility.tw  |  7 ++++
 src/uncategorized/managePenthouse.tw         |  2 +-
 src/uncategorized/slaveInteract.tw           |  6 +++-
 13 files changed, 86 insertions(+), 29 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index c79cf74bd83..13fb95bfb78 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -11311,9 +11311,17 @@ window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age
 		//gene corrections
 		tf.genetics.gender = mother.genes;
 		tf.genetics.mother = mother.mother;
-		tf.genetics.motherName = mother.slaveName;
+		if (mother.ID == -1) {
+			tf.genetics.motherName = mother.name;
+		} else {
+			tf.genetics.motherName = mother.slaveName;
+		}
 		tf.genetics.father = mother.father;
-		tf.genetics.fatherName = mother.slaveName;
+		if (mother.ID == -1) {
+			tf.genetics.fatherName = mother.name;
+		} else {
+			tf.genetics.fatherName = mother.slaveName;
+		}
 		tf.genetics.intelligence = motherOriginal.intelligence;
 		tf.genetics.face = motherOriginal.face;
 		tf.genetics.faceShape = motherOriginal.faceShape;
diff --git a/player variables documentation - Pregmod.txt b/player variables documentation - Pregmod.txt
index 6940565edbc..52321030aaf 100644
--- a/player variables documentation - Pregmod.txt	
+++ b/player variables documentation - Pregmod.txt	
@@ -24,6 +24,12 @@ ID:
 
 The player's ID is always -1.
 
+genes:
+
+Player's gender
+"XY"
+"XX"
+
 dick:
 
 (common in events)
diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw
index 96956b0af4a..ce161fc9d93 100644
--- a/src/events/intro/introSummary.tw
+++ b/src/events/intro/introSummary.tw
@@ -561,9 +561,9 @@ __''Player Character''__
 	<br>You are a $PCCreationSex.
 	<br>Change to
 		<<if $PCCreationSex != "masculine ''Master''">>
-			[[masculine Master|Intro Summary][$PC.title = 1, $PC.pronoun = "he", $PC.possessive = "his", $PC.object = "him", $PCCreationSex = "masculine ''Master''"]]
+			[[masculine Master|Intro Summary][$PC.title = 1, $PC.genes = "XY", $PC.pronoun = "he", $PC.possessive = "his", $PC.object = "him", $PCCreationSex = "masculine ''Master''"]]
 		<<elseif $PCCreationSex != "feminine ''Mistress''">>
-			[[feminine Mistress|Intro Summary][$PC.title = 0, $PC.pronoun = "her", $PC.possessive = "her", $PC.object = "her", $PCCreationSex = "feminine ''Mistress''"]]
+			[[feminine Mistress|Intro Summary][$PC.title = 0, $PC.genes = "XX", $PC.pronoun = "her", $PC.possessive = "her", $PC.object = "her", $PCCreationSex = "feminine ''Mistress''"]]
 		<</if>>
 
 	<br>Everyone calls you ''<<= PlayerName()>>.''
diff --git a/src/events/intro/pcBodyIntro.tw b/src/events/intro/pcBodyIntro.tw
index 7541ec53d2c..95f68f16afc 100644
--- a/src/events/intro/pcBodyIntro.tw
+++ b/src/events/intro/pcBodyIntro.tw
@@ -6,10 +6,10 @@ Most slaveowners in the Free Cities are male. The preexisting power structures o
 <br>
 
 <<if $PC.title > 0>>
-	You have a masculine figure and will be referred to as ''Master.''
+	You are a <<if $PC.genes == "XX">>wo<</if>>man with a masculine figure and will be referred to as ''Master.''
 	[[Switch to a feminine appearance|PC Body Intro][$PC.title = 0, $PC.pronoun = "her", $PC.possessive = "her", $PC.object = "her"]]
 <<else>>
-	You have a feminine figure and will be referred to as ''Mistress.''
+	You are a <<if $PC.genes == "XX">>wo<</if>>man with a feminine figure and will be referred to as ''Mistress.''
 	[[Switch to a masculine appearance|PC Body Intro][$PC.title = 1, $PC.pronoun = "he", $PC.possessive = "his", $PC.object = "him"]]
 <</if>>
 <br>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -41,11 +41,11 @@ Behind the front of my tailored
 		[[Remove the penis|PC Body Intro][$PC.dick = 0]] | [[Remove the vagina|PC Body Intro][$PC.vagina = 0]]
 	<<else>>
 		slacks, a ''penis.''
-		[[Switch to vagina|PC Body Intro][$PC.dick = 0, $PC.vagina = 1]] | [[Add a vagina|PC Body Intro][$PC.vagina = 1]]
+		[[Switch to vagina|PC Body Intro][$PC.dick = 0, $PC.genes = "XX", $PC.vagina = 1]] | [[Add a vagina|PC Body Intro][$PC.vagina = 1]]
 	<</if>>
 <<else>>
 	skirt, a ''vagina.''
-	[[Switch to penis|PC Body Intro][$PC.dick = 1, $PC.vagina = 0]] | [[Add a penis|PC Body Intro][$PC.dick = 1]]
+	[[Switch to penis|PC Body Intro][$PC.dick = 1, $PC.genes = "XY", $PC.vagina = 0]] | [[Add a penis|PC Body Intro][$PC.dick = 1]]
 <</if>>
 <br>&nbsp;&nbsp;&nbsp;&nbsp;
 //These options will affect sex scenes. Feminine options will increase difficulty.//
diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw
index d64eb0ad9fa..1fe53a23f93 100644
--- a/src/js/wombJS.tw
+++ b/src/js/wombJS.tw
@@ -141,16 +141,24 @@ window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age
 			State.variables.missingParentID--;
 		}
 		if (mother.mother === 0 || (mother.mother < -1 && mother.mother >= -20 && mother.mother !== -3)) {
-			mother.father = State.variables.missingParentID;
+			mother.mother = State.variables.missingParentID;
 			State.variables.missingParentID--;
 		}
 
 		//gene corrections
 		tf.genetics.gender = mother.genes;
 		tf.genetics.mother = mother.mother;
-		tf.genetics.motherName = mother.slaveName;
+		if (mother.ID == -1) {
+			tf.genetics.motherName = mother.name;
+		} else {
+			tf.genetics.motherName = mother.slaveName;
+		}
 		tf.genetics.father = mother.father;
-		tf.genetics.fatherName = mother.slaveName;
+		if (mother.ID == -1) {
+			tf.genetics.fatherName = mother.name;
+		} else {
+			tf.genetics.fatherName = mother.slaveName;
+		}
 		tf.genetics.intelligence = motherOriginal.intelligence;
 		tf.genetics.face = motherOriginal.face;
 		tf.genetics.faceShape = motherOriginal.faceShape;
diff --git a/src/pregmod/cloningWorkaround.tw b/src/pregmod/cloningWorkaround.tw
index b1217fc5bab..8fa5af3e7fb 100644
--- a/src/pregmod/cloningWorkaround.tw
+++ b/src/pregmod/cloningWorkaround.tw
@@ -10,11 +10,11 @@ __Select a slave to serve as the host for the clone__
 
 <br>
 
-<<for _otw = 0; _otw < $slaves.length; _otw++>>
-<<capture _otw>>
-	<<if ($slaves[_otw].ovaries > 0 || $slaves[_otw].mpreg > 0) && isSlaveAvailable($slaves[_otw]) && $slaves[_otw].preg >= 0 && $slaves[_otw].preg < $slaves[_otw].pregData.normalBirth/10 && $slaves[_otw].pregWeek >= 0 && $slaves[_otw].pubertyXX == 1 && $slaves[_otw].pregType < 12 && $slaves[_otw].bellyImplant == -1 && $slaves[_otw].broodmother == 0 && $slaves[_otw].inflation <= 2 && $slaves[_otw].physicalAge < 70>>
-		<<set _name = SlaveFullName($slaves[_otw])>>
-		<br><<print "[[_name|Surrogacy][$receptrix = $slaves[" + _otw + "], $cash -= ($surgeryCost*2), $surgeryType = 'clone']]">> <<if $slaves[_otw].pregType >= 4>>//Using a slave carrying multiples is unadvisable//<</if>>
+<<for _cw = 0; _cw < $slaves.length; _cw++>>
+<<capture _cw>>
+	<<if ($slaves[_cw].ovaries > 0 || $slaves[_cw].mpreg > 0) && isSlaveAvailable($slaves[_cw]) && $slaves[_cw].preg >= 0 && $slaves[_cw].preg < $slaves[_cw].pregData.normalBirth/10 && $slaves[_cw].pregWeek >= 0 && $slaves[_cw].pubertyXX == 1 && $slaves[_cw].pregType < 12 && $slaves[_cw].bellyImplant == -1 && $slaves[_cw].broodmother == 0 && $slaves[_cw].inflation <= 2 && $slaves[_cw].physicalAge < 70>>
+		<<set _name = SlaveFullName($slaves[_cw])>>
+		<br><<print "[[_name|Surrogacy][$receptrix = $slaves[" + _cw + "], $cash -= ($surgeryCost*2), $surgeryType = 'clone']]">> <<if $slaves[_cw].pregType >= 4>>//Using a slave carrying multiples is unadvisable//<</if>>
 		<<set _eligibility = 1>>
 	<</if>>
 <</capture>>
@@ -23,7 +23,7 @@ __Select a slave to serve as the host for the clone__
 	<br>//You have no slaves capable of acting as an incubator.//
 <</if>>
 
-<<if $PC.vagina == 1 && $donatrix.ID != -1 && $PC.preg >= 0 && $PC.preg < 4 && $PC.pregType < 8 && $PC.physicalAge < 70>>
+<<if $PC.vagina == 1 && $PC.preg >= 0 && $PC.preg < 4 && $PC.pregType < 8 && $PC.physicalAge < 70>>
 	<br>
 	[[Use your own womb|Surrogacy][$receptrix = $PC, $cash -= ($surgeryCost*2), $surgeryType = 'clone']]
 <</if>>
diff --git a/src/pregmod/geneLab.tw b/src/pregmod/geneLab.tw
index 6eafad5e682..e4f28b253dc 100644
--- a/src/pregmod/geneLab.tw
+++ b/src/pregmod/geneLab.tw
@@ -9,7 +9,7 @@ The Gene Lab
 
 //The gene lab is fully operational. It can identify genetic traits in slaves. It can be used to modify a slave's genome should you obtain the data necessary to adjust it.//
 
-<br>
+<br><br>
 Genetic Harvesting
 <hr>
 
diff --git a/src/pregmod/managePersonalAffairs.tw b/src/pregmod/managePersonalAffairs.tw
index df0e3a73b1e..3454c93d64d 100644
--- a/src/pregmod/managePersonalAffairs.tw
+++ b/src/pregmod/managePersonalAffairs.tw
@@ -592,6 +592,9 @@ __Other Personal Business__
 <br> You lack the reputation to be invited to the underground Black Market.
 <</if>>
 
+<<if $cloningSystem == 1>>
+	<br> [[Clone yourself|Cloning Workaround][$returnTo = "Manage Personal Affairs", $donatrix = $PC]]
+<</if>>
 
 <<if $propOutcome == 1 && $arcologies[0].FSRestart != "unset">>
 	<br><br>
diff --git a/src/pregmod/surrogacy.tw b/src/pregmod/surrogacy.tw
index c354345b273..faa29826b61 100644
--- a/src/pregmod/surrogacy.tw
+++ b/src/pregmod/surrogacy.tw
@@ -123,20 +123,41 @@
 	<<if $receptrix.ID == -1>>
 		Since the surgery required only a local anesthetic, you remain fully aware of the procedure as the autosurgery carries it out. You slowly rise to your feet, a hand to your lower belly, appreciating the clone growing within you.
 		<<set $PC.pregKnown = 1>>
-		<<run WombImpregnate($PC, 1, $donatrix.ID, $impregnatrix.ID, 1)>>
+		<<if $donatrix.ID != -1>>
+			<<set _babyDaddy = $genePool.find(function(s) { return s.ID == $donatrix.ID; })>>
+			<<if ndef _babyDaddy>>
+				<<set _babyDaddy = $slaveIndices[$donatrix.ID]>>
+			<</if>>
+		<<else>>
+			<<set _babyDaddy = $PC>>
+		<</if>>
+		<<run WombImpregnateClone($PC, 1, $donatrix, _babyDaddy, 1)>>
 		<<run WombNormalizePreg($PC)>>
 	<<else>>
 		<<set $receptrix.pregKnown = 1>>
-		<<run WombSurrogate($receptrix, 1, $donatrix, $impregnatrix.ID, 1)>>
+		<<if $donatrix.ID != -1>>
+			<<set _babyDaddy = $genePool.find(function(s) { return s.ID == $donatrix.ID; })>>
+			<<if ndef _babyDaddy>>
+				<<set _babyDaddy = $slaveIndices[$donatrix.ID]>>
+			<</if>>
+		<<else>>
+			<<set _babyDaddy = $PC>>
+		<</if>>
+		<<run WombImpregnateClone($receptrix, 1, $donatrix, _babyDaddy, 1)>>
 		<<run WombNormalizePreg($receptrix)>>
 		<<setLocalPronouns $receptrix>>
 		<<if $receptrix.fetish == "mindbroken">>
-			 $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
+			 $receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen,
+			 <<if $receptrix.ID == $donatrix.ID>>
+				but has no idea $he carries $his own clone.
+			 <<else>>
+				$he knows that $he has been impregnated.
+			<</if>>
 		<<elseif ($receptrix.fetish == "pregnancy") && ($receptrix.fetishStrength > 60) && ($receptrix.fetishKnown == 1)>>
 			<<if canSee($receptrix)>>
-				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He was overjoyed at the sight of the syringe containing $his future child emptying into $his womb.
+				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He was overjoyed at the sight of the syringe containing $his <<if $receptrix.ID == $donatrix.ID>>clone<<else>>future child<</if>> emptying into $his womb.
 			<<else>>
-				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
+				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated<<if $receptrix.ID == $donatrix.ID>>, but not that $he now bears $his own clone<</if>>.
 			<</if>>
 			$He is @@.hotpink; filled with joy@@ over the life settling into $his womb and can't wait to see the result. $He's so pleased that $he now @@.mediumaquamarine;trusts@@ your plans for $his body.
 			<<set $receptrix.trust += 4, $receptrix.devotion += 10>>
@@ -144,7 +165,7 @@
 			<<if canSee($receptrix)>>
 				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. $He watched the syringe containing $his new pregnancy empty into $his womb with rapt attention.
 			<<else>>
-				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
+				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated<<if $receptrix.ID == $donatrix.ID>>, but not that $he now bears $his own clone<</if>>.
 			<</if>>
 			$He's @@.hotpink;grateful@@ that you think $him worthy of carrying this child, and a little nervous about how $he'll perform as a surrogate.
 			<<set $receptrix.devotion += 4>>
@@ -152,7 +173,7 @@
 			<<if canSee($receptrix)>>
 				Since the surgery required only a local anesthetic, $receptrix.slaveName remained fully aware throughout the procedure. From the syringe making contact with $his skin, to the egg's delivery into $his womb and $his subsequent impregnation, $he couldn't look away.
 			<<else>>
-				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
+				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated<<if $receptrix.ID == $donatrix.ID>>, but not that $he now bears $his own clone<</if>>.
 			<</if>>
 			$He understands the realities of $his life as a slave, so it isn't much of a shock. $He is @@.gold;sensibly fearful@@ of your total power over $his body.
 			<<set $receptrix.trust -= 10>>
@@ -162,7 +183,7 @@
 			<<else>>
 				$receptrix.slaveName leaves the surgery with a certain warmth in $his lower abdomen, $he knows that $he has been impregnated.
 			<</if>>
-			$He does not understand the realities of $his life as a slave at a core level, so $he's @@.mediumorchid;terrified and angry@@ that you have forced $him to bear this child, even more so as $he realizes $he doesn't know who the father is. $He is @@.gold;sensibly fearful@@ of your total power over $his body and the future of the life $he now harbors within $him.
+			$He does not understand the realities of $his life as a slave at a core level, so $he's @@.mediumorchid;terrified and angry@@ that you have forced $him to bear <<if $receptrix.ID == $donatrix.ID>>$his own clone and potential replacement<<else>>this child, even more so as $he realizes $he doesn't know who the father is<</if>>. $He is @@.gold;sensibly fearful@@ of your total power over $his body and the future of the life $he now harbors within $him.
 			<<set $receptrix.trust -= 15, $receptrix.devotion -= 15>>
 		<</if>>
 		<<set _surr = $slaves.findIndex(function(s) { return s.ID == $receptrix.ID; })>>
diff --git a/src/pregmod/widgets/pregmodWidgets.tw b/src/pregmod/widgets/pregmodWidgets.tw
index 73fd353e12c..162e9a684e1 100644
--- a/src/pregmod/widgets/pregmodWidgets.tw
+++ b/src/pregmod/widgets/pregmodWidgets.tw
@@ -1,7 +1,7 @@
 :: pregmod widgets [nobr widget]
 
 <<widget "initPC">>
-	<<set $PC = {name: "Anonymous", surname: 0, title: 1, ID: -1, pronoun: "he", possessive: "him", object: "his", dick: 1, vagina: 0, preg: 0, pregType: 0, pregWeek: 0, pregKnown: 0, belly: 0, bellyPreg: 0, mpreg: 0, pregSource: 0, pregMood: 0, labor: 0, births: 0, boobsBonus: 0, degeneracy: 0, voiceImplant: 0, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 0, lactation: 0, lactationDuration: 0, career: "capitalist", rumor: "wealth", birthWeek: random(0,51), age: 2, sexualEnergy: 4, refreshment: "cigar", refreshmentType: 0, trading: 0, warfare: 0, slaving: 0, engineering: 0, medicine: 0, hacking: 0, cumTap: 0, race: "white", origRace: "white", skin: "white", origSkin: "white", markings: "none", eyeColor: "blue", origEye: "blue", pupil: "circular", sclerae: "white", hColor: "blonde", origHColor: "blonde", nationality: "Stateless", father: 0, mother: 0, sisters: 0, daughters: 0, birthElite: 0, birthMaster: 0, birthDegenerate: 0, birthClient: 0, birthOther: 0, birthArcOwner: 0, birthCitizen: 0, birthSelf: 0, birthLab: 0, slavesFathered: 0, slavesKnockedUp: 0, intelligence: 100, face: 100, faceShape: "normal", actualAge: 35, physicalAge: 35, visualAge: 35, boobsImplant: 0, butt: 0, buttImplant: 0, balls: 0, ballsImplant: 0, ageImplant: 0, newVag: 0, reservedChildren: 0, reservedChildrenNursery: 0, fertDrugs: 0, forcedFertDrugs: 0, staminaPills: 0, ovaryAge: 35, eggType: "human", ballType: "human", storedCum: 0, behavioralFlaw: "none", behavioralQuirk: "none", sexualFlaw: "none", sexualQuirk: "none", fetish: "none", pubicHStyle: "hairless", underArmHStyle: "hairless", geneticQuirks: {macromastia: 0, gigantomastia: 0, fertility: 0, hyperFertility: 0, superfetation: 0, gigantism: 0, dwarfism: 0, pFace: 0, uFace: 0, albinism: 0, rearLipedema: 0, wellHung: 0, wGain: 0, wLoss: 0, androgyny: 0}}>>
+	<<set $PC = {name: "Anonymous", surname: 0, title: 1, ID: -1, genes: "XY", pronoun: "he", possessive: "him", object: "his", dick: 1, vagina: 0, preg: 0, pregType: 0, pregWeek: 0, pregKnown: 0, belly: 0, bellyPreg: 0, mpreg: 0, pregSource: 0, pregMood: 0, labor: 0, births: 0, boobsBonus: 0, degeneracy: 0, voiceImplant: 0, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 0, lactation: 0, lactationDuration: 0, career: "capitalist", rumor: "wealth", birthWeek: random(0,51), age: 2, sexualEnergy: 4, refreshment: "cigar", refreshmentType: 0, trading: 0, warfare: 0, slaving: 0, engineering: 0, medicine: 0, hacking: 0, cumTap: 0, race: "white", origRace: "white", skin: "white", origSkin: "white", markings: "none", eyeColor: "blue", origEye: "blue", pupil: "circular", sclerae: "white", hColor: "blonde", origHColor: "blonde", nationality: "Stateless", father: 0, mother: 0, sisters: 0, daughters: 0, birthElite: 0, birthMaster: 0, birthDegenerate: 0, birthClient: 0, birthOther: 0, birthArcOwner: 0, birthCitizen: 0, birthSelf: 0, birthLab: 0, slavesFathered: 0, slavesKnockedUp: 0, intelligence: 100, face: 100, faceShape: "normal", actualAge: 35, physicalAge: 35, visualAge: 35, boobsImplant: 0, butt: 0, buttImplant: 0, balls: 0, ballsImplant: 0, ageImplant: 0, newVag: 0, reservedChildren: 0, reservedChildrenNursery: 0, fertDrugs: 0, forcedFertDrugs: 0, staminaPills: 0, ovaryAge: 35, eggType: "human", ballType: "human", storedCum: 0, behavioralFlaw: "none", behavioralQuirk: "none", sexualFlaw: "none", sexualQuirk: "none", fetish: "none", pubicHStyle: "hairless", underArmHStyle: "hairless", geneticQuirks: {macromastia: 0, gigantomastia: 0, fertility: 0, hyperFertility: 0, superfetation: 0, gigantism: 0, dwarfism: 0, pFace: 0, uFace: 0, albinism: 0, rearLipedema: 0, wellHung: 0, wGain: 0, wLoss: 0, androgyny: 0}}>>
 
 	<<set WombInit($PC)>>
 
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index 2978c748126..1a747b3d6ac 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -388,6 +388,13 @@
 		<<set $PC.pregSource = -2>>
 	<</if>>
 <</if>>
+<<if ndef $PC.genes>>
+	<<if $PC.title == 1>>
+		<<set $PC.genes == "XY">>
+	<<else>>
+		<<set $PC.genes == "XX">>
+	<</if>>
+<</if>>
 <<run PCDatatypeCleanup()>>
 <<run BCReserveInit()>>
 
diff --git a/src/uncategorized/managePenthouse.tw b/src/uncategorized/managePenthouse.tw
index 76651976159..535e2d9e2c4 100644
--- a/src/uncategorized/managePenthouse.tw
+++ b/src/uncategorized/managePenthouse.tw
@@ -338,7 +338,7 @@ __Penthouse Upgrades__
 	//You lack the reputation to purchase a cutting-edge genetic sequencer//
 <</if>>
 <<else>>
-	There is a genetic sequencer linked with the pharmaceutical fabricator.
+	There is a [[genetic sequencer|Gene Lab]] attached to the surgery.
 <</if>>
 
 <br>
diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw
index 81c155c869a..2e34c849085 100644
--- a/src/uncategorized/slaveInteract.tw
+++ b/src/uncategorized/slaveInteract.tw
@@ -1463,7 +1463,11 @@ Aphrodisiacs: <span id="aphrodisiacs"><strong><<if $activeSlave.aphrodisiacs > 1
 <</if>>
 <</if>>
 <</if>>
-/**/
+
+<<if $cloningSystem == 1>>
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;
+	<<link "Clone $him" "Cloning Workaround">><<set $returnTo = "main", $donatrix = $activeSlave>><</link>>
+<</if>>
 <<if $propOutcome == 1 && $arcologies[0].FSRestart != "unset">>
 	<<if $activeSlave.breedingMark == 0 && $activeSlave.fuckdoll == 0 && $activeSlave.eggType == "human" && isFertile($activeSlave)>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
-- 
GitLab