From 5d465aee54063dbbbcc562d4e4d560e77b85364c Mon Sep 17 00:00:00 2001
From: pregmodfan <pregmodfan@cock.li>
Date: Fri, 23 Nov 2018 21:34:37 +0200
Subject: [PATCH] transpant review, and random sanity check fixes

---
 src/facilities/nursery/longChildDescription.tw |  2 +-
 src/pregmod/sePlayerBirth.tw                   |  2 +-
 src/pregmod/surrogacy.tw                       | 14 ++++++--------
 src/pregmod/surrogacyWorkaround.tw             |  8 ++++----
 4 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/facilities/nursery/longChildDescription.tw b/src/facilities/nursery/longChildDescription.tw
index 7988d22a6de..fdc53a0b27d 100644
--- a/src/facilities/nursery/longChildDescription.tw
+++ b/src/facilities/nursery/longChildDescription.tw
@@ -1945,7 +1945,7 @@ $He is
 
 /*
 <span id="naming">
-if $cribs[$i].mother > 0>>
+<<if $cribs[$i].mother > 0>>
     <<set _tempMom = getSlave($cribs[$i].mother)>>
 <</if>>
 <<if $cribs[$i].father > 0>>
diff --git a/src/pregmod/sePlayerBirth.tw b/src/pregmod/sePlayerBirth.tw
index 404fa76f9aa..1a4814937ce 100644
--- a/src/pregmod/sePlayerBirth.tw
+++ b/src/pregmod/sePlayerBirth.tw
@@ -454,7 +454,7 @@ You arrange yourself to give birth, relaxing until your body urges you to begin
 		<<if $PC.curBabies[_p].genetics.skin == $PC.origSkin>>
 			<<set _PCDegree++>>
 		<</if>>
-		<<if $PC.curBabies[_p].genetics.eyeColor == $PC.OrigEye>>
+		<<if $PC.curBabies[_p].genetics.eyeColor == $PC.origEye>>
 			<<set _PCDegree++>>
 		<</if>>
 
diff --git a/src/pregmod/surrogacy.tw b/src/pregmod/surrogacy.tw
index ec1a5096f8c..8c8fc5492ae 100644
--- a/src/pregmod/surrogacy.tw
+++ b/src/pregmod/surrogacy.tw
@@ -10,11 +10,11 @@
 		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 new life growing within you.
 		<<set $PC.pregKnown = 1>>
 		<<run WombSurrogate($PC, 1, $donatrix, $impregnatrix.ID, 1)>>
-		<<run WombUpdatePregVars($PC)>>
+		<<run WombNormalizePreg($PC)>>
 	<<else>>
 		<<set $receptrix.pregKnown = 1>>
 		<<run WombSurrogate($receptrix, 1, $donatrix, $impregnatrix.ID, 1)>>
-		<<run WombUpdatePregVars($receptrix)>>
+		<<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.
@@ -62,16 +62,14 @@
 		Since the surgery required only a local anesthetic, you are very aware that you are now carrying $activeSlave.slaveName's child. You slowly rise to your feet, a hand to your lower belly, appreciating the new life growing within you.
 		<<set _fetus = WombRemoveFetus($activeSlave, $wombIndex)>>
 		<<run WombAddFetus($PC, _fetus)>>
-		<<set $PC.pregKnown = 1, $PC.preg = 1>>
-		<<run WombUpdatePregVars($PC)>>
-		<<set $activeSlave.pregType-->>
+		<<set $PC.pregKnown = 1, $PC.preg = WombMaxPreg($PC)>>
+		<<run WombNormalizePreg($PC)>>
 		<<run WombNormalizePreg($activeSlave)>>
 	<<else>>
 		<<set _fetus = WombRemoveFetus($donatrix, $wombIndex)>>
 		<<run WombAddFetus($receptrix, _fetus)>>
-		<<set $receptrix.pregKnown = 1, $receptrix.preg = 1>>
-		<<run WombUpdatePregVars($receptrix)>>
-		<<set $donatrix.pregType-->>
+		<<set $receptrix.pregKnown = 1, $receptrix.preg = WombMaxPreg($receptrix)>>
+		<<run WombNormalizePreg($receptrix)>>
 		<<run WombNormalizePreg($donatrix)>>
 		<<if $donatrix.ID == -1>>
 			<<set $PC = $donatrix>>
diff --git a/src/pregmod/surrogacyWorkaround.tw b/src/pregmod/surrogacyWorkaround.tw
index 0af1ce22840..fa4482b808d 100644
--- a/src/pregmod/surrogacyWorkaround.tw
+++ b/src/pregmod/surrogacyWorkaround.tw
@@ -7,15 +7,15 @@
 	<<set _donatrixID = 0>>
 <</if>>
 <<if $impregnatrix != "Undecided" && $impregnatrix.ID == -1>><<set _impreg = PlayerName()>><<elseif $impregnatrix != "Undecided">><<set _impreg = SlaveFullName($impregnatrix)>><<else>><<set _impreg = $impregnatrix>><</if>>
-<<if $receptrix != "Undecided" && $receptrix.ID == -1>><<set _recieve = PlayerName()>><<elseif $receptrix != "Undecided">><<set _recieve = SlaveFullName($receptrix)>><<else>><<set _recieve = $receptrix>><</if>>
+<<if $receptrix != "Undecided" && $receptrix.ID == -1>><<set _receive = PlayerName()>><<elseif $receptrix != "Undecided">><<set _receive = SlaveFullName($receptrix)>><<else>><<set _receive = $receptrix>><</if>>
 
 //<<if _donatrixID == -1>>You've prepared yourself to have an egg taken from your ovaries<<else>>$activeSlave.slaveName is prepped to have an egg harvested from $his ovaries<</if>>; now you must select a target to fertilize it and who will carry it to term.//
 
 <br><br>
 
 
-_impreg will provide the seed and _recieve shall carry it.
-<<if _impreg != "Undecided" && _recieve != "Undecided">>
+_impreg will provide the seed and _receive shall carry it.
+<<if _impreg != "Undecided" && _receive != "Undecided">>
 	[[Implant fertilized ovum|Surrogacy][$cash -= ($surgeryCost*2), $surgeryType = 'surrogacy']]
 <</if>>
 
@@ -64,7 +64,7 @@ __Semen donatrix: _impreg __
 
 <br><br>
 
-__Chosen surrogate: _recieve __
+__Chosen surrogate: _receive __
 
 <br>
 
-- 
GitLab