From f2c88bb14434fe304a0da45489a9273bfdaa3c9e Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Thu, 29 Oct 2020 16:23:50 -0400
Subject: [PATCH] Fix cheat edit pregnancy

---
 .../mod_EditSlaveCheatDatatypeCleanupNew.tw      | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw
index 41ee8e1e832..fd55cbd63b4 100644
--- a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw
+++ b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw
@@ -20,21 +20,7 @@
 <<set $rep = Number($rep) || 0>>
 <<set $cash = Number($cash) || 0>>
 <<set $week = Number($week) || 1>>
-<<set $tempSlave.preg = Number($tempSlave.preg) || 0>>
-<<set $tempSlave.pregType = Number($tempSlave.pregType) || 0>>
-<<if $tempSlave.broodmother == 0>>
-	<<set WombInit($tempSlave)>> /* just to make sure */
-	<<set $tempSlave.womb.length = 0>> /* simple way to delete all fetuses */
-	<<set WombImpregnate($tempSlave, $tempSlave.pregType, $tempSlave.pregSource, $tempSlave.preg)>> /* recreates fetuses */
-<<else>>
-	<<set WombNormalizePreg($tempSlave)>>
-<</if>>
-<<set $tempSlave.pregWeek = Number($tempSlave.pregWeek) || Math.max($tempSlave.preg, 0)>>
-<<if $tempSlave.preg <= 0>>
-	<<set $tempSlave.pregKnown = 0>>
-<<elseif $tempSlave.preg > 0>>
-	<<set $tempSlave.pregKnown = 1>>
-<</if>>
+<<set WombUpdatePregVars($tempSlave)>>
 <<set $tempSlave.pregAdaptation = Number($tempSlave.pregAdaptation) || 0>>
 <<if $tempSlave.pregAdaptation <= 0>>
 	<<if $tempSlave.genes === "XY">> /* copied from GenerateXYPregAdaptation */
-- 
GitLab