From 9f1759498223cf7bdc0edb6ab995b9b9a5a2f2db Mon Sep 17 00:00:00 2001
From: kopareigns <kopareigns@gmail.com>
Date: Sun, 9 Dec 2018 11:32:36 -0500
Subject: [PATCH] Better fix

---
 devNotes/twine JS.txt                       | 4 ++--
 src/js/wombJS.tw                            | 4 ++--
 src/pregmod/widgets/pregmodWidgets.tw       | 1 -
 src/uncategorized/BackwardsCompatibility.tw | 1 -
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index 48e3f4b3c3d..db8e6256de2 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -11203,9 +11203,9 @@ window.WombInit = function(actor) {
 			ft.genetics = generateGenetics(actor.ID, actor.pregSource, i);
 			i++;
 		});
-	} else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother == 0) {
+	} else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother == 0) {
 		WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg);
-	} else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) {
+	} else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) {
 		//sorry but for already present broodmothers it's impossible to calculate fully, approximation used.
 		var i, pw = actor.preg, bCount, bLeft;
 		if (pw > 40) pw = 40; //to avoid disaster.
diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw
index 4b56123e14c..4cd07733069 100644
--- a/src/js/wombJS.tw
+++ b/src/js/wombJS.tw
@@ -59,9 +59,9 @@ window.WombInit = function(actor) {
 			ft.genetics = generateGenetics(actor.ID, actor.pregSource, i);
 			i++;
 		});
-	} else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother == 0) {
+	} else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother == 0) {
 		WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg);
-	} else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) {
+	} else if (actor.womb.length == 0 && actor.pregType > 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) {
 		//sorry but for already present broodmothers it's impossible to calculate fully, approximation used.
 		var i, pw = actor.preg, bCount, bLeft;
 		if (pw > actor.pregData.normalBirth) pw = actor.pregData.normalBirth; //to avoid disaster.
diff --git a/src/pregmod/widgets/pregmodWidgets.tw b/src/pregmod/widgets/pregmodWidgets.tw
index cd21c718be9..c07c4d1dc72 100644
--- a/src/pregmod/widgets/pregmodWidgets.tw
+++ b/src/pregmod/widgets/pregmodWidgets.tw
@@ -1272,7 +1272,6 @@ extremely pale -5
 			s.geneMods.rapidCellGrowth = 0;
 		}
 	}
-	s.pregType = s.pregType || 0;
 	WombInit(s);
 })>>
 <</widget>>
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index 986c0315c51..102cc3266b6 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -3635,7 +3635,6 @@ Setting missing slave variables:
 <<if $nurseryNannies > 0>>
 	<<for _bci = 0; _bci < $cribs.length; _bci++>>
 		<<set _nurseryChild = $cribs[_bci]>>
-		<<set _nurseryChild.pregType = 0>>
 		<<PMODinit _nurseryChild>>
 	<</for>>
 <</if>>
-- 
GitLab