From b11c2e851fe3a6d14f01ee5d70a2f400f7b6b6f7 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Fri, 21 Dec 2018 02:03:57 -0500
Subject: [PATCH] slave cloning works now?

---
 devNotes/VersionChangeLog-Premod+LoliMod.txt | 4 ++--
 src/pregmod/surrogacy.tw                     | 8 ++++++--
 src/uncategorized/slaveInteract.tw           | 2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt
index 7abdece0982..0232c8d80f8 100644
--- a/devNotes/VersionChangeLog-Premod+LoliMod.txt
+++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt
@@ -2,14 +2,14 @@
 
 0.10.7.1-1.4.x
 
-	12/21/2018
+12/21/2018
 
 	1
 	-enabled first run of cloning in cheatmode (slave cloning has issues)
 	-fixes
 	-more economy work
 
-	12/19/2018
+12/19/2018
 
 	0
 	-dispensary broken down into pharm fabricator, organ farm, implant manufactory and gene lab
diff --git a/src/pregmod/surrogacy.tw b/src/pregmod/surrogacy.tw
index faa29826b61..96a203fc5e5 100644
--- a/src/pregmod/surrogacy.tw
+++ b/src/pregmod/surrogacy.tw
@@ -186,8 +186,12 @@
 			$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; })>>
-		<<set $slaves[_surr] = $receptrix>>
+		<<if $activeSlave.ID != $receptrix.ID>>
+			<<set _surr = $slaves.findIndex(function(s) { return s.ID == $receptrix.ID; })>>
+			<<set $slaves[_surr] = $receptrix>>
+		<<else>>
+			<<set $activeSlave = $receptrix>>
+		<</if>>
 	<</if>>
 	<<set $receptrix = 0, $impregnatrix = 0, $donatrix = 0>>
 
diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw
index cdf1a63f734..8d2c802f913 100644
--- a/src/uncategorized/slaveInteract.tw
+++ b/src/uncategorized/slaveInteract.tw
@@ -1466,7 +1466,7 @@ Aphrodisiacs: <span id="aphrodisiacs"><strong><<if $activeSlave.aphrodisiacs > 1
 
 <<if $cloningSystem == 1>>
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
-	<<link "Clone $him" "Cloning Workaround">><<set $returnTo = "Main", $donatrix = $activeSlave>><</link>>
+	<<link "Clone $him" "Cloning Workaround">><<set $returnTo = "Slave Interact", $donatrix = $activeSlave>><</link>>
 <</if>>
 <<if $propOutcome == 1 && $arcologies[0].FSRestart != "unset">>
 	<<if $activeSlave.breedingMark == 0 && $activeSlave.fuckdoll == 0 && $activeSlave.eggType == "human" && isFertile($activeSlave)>>
-- 
GitLab