From 0e664d366667c1ebed495e1c0369e99e3f75b747 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sun, 11 Nov 2018 21:18:45 -0500
Subject: [PATCH] variable initialization

---
 devNotes/VersionChangeLog-Premod+LoliMod.txt |  5 +++
 src/init/storyInit.tw                        |  1 +
 src/uncategorized/BackwardsCompatibility.tw  |  3 ++
 src/uncategorized/dispensary.tw              | 37 ++++++++----------
 src/uncategorized/managePenthouse.tw         | 41 +++++++++++++++++---
 5 files changed, 60 insertions(+), 27 deletions(-)

diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt
index 48fbedbf721..bf78a9ccf19 100644
--- a/devNotes/VersionChangeLog-Premod+LoliMod.txt
+++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt
@@ -1,5 +1,10 @@
 Pregmod 
 
+	1
+	-WIP content added to nursery/farmyard
+	-genetic sequencing moved out of dispensary
+	-added advanced pregnancy tracking
+
 0.10.7.1-0.10.x
 
 11/08/2018
diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index d671c860f4a..0ee5a4f859a 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -1005,6 +1005,7 @@ DairyRestraintsSetting($dairyRestraintsSetting)
 <<set $animalMpreg = 0>> /*{pigMpreg: 0, dogMpreg: 0, horseMpreg: 0, cowMpreg: 0} currently unused*/
 <<set $prostheticsUpgrade = 0>>
 <<set $geneticMappingUpgrade = 0>>
+<<set $pregnancyMonitoringUpgrade = 0>>
 
 <<set $surgeryUpgrade = 0>>
 
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index a52cbba39cf..a7259717352 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -2192,6 +2192,9 @@ Setting missing global variables:
 <<if ndef $geneticMappingUpgrade>>
 	<<set $geneticMappingUpgrade = 0>>
 <</if>>
+<<if ndef $pregnancyMonitoringUpgrade>>
+	<<set $pregnancyMonitoringUpgrade = 0>>
+<</if>>
 <<if ndef $permaPregImplant>>
 	<<set $permaPregImplant = 0>>
 <</if>>
diff --git a/src/uncategorized/dispensary.tw b/src/uncategorized/dispensary.tw
index b44b8f0ab86..0f9cbde8459 100644
--- a/src/uncategorized/dispensary.tw
+++ b/src/uncategorized/dispensary.tw
@@ -610,30 +610,25 @@ Implant Production
 	
 <</if>>
 
-<br>
-Gene Mods
-<hr>
-
-<<if $dispensaryUpgrade == 0>>
-	//The fabricator must upgraded before it can be fitted with genetic sequencers//
-	<br>
-<<elseif ($rep <= 14000*_PCSkillCheck)>>
-	//You lack the reputation to purchase a cutting edge genetic sequencer//
-<<elseif $geneticMappingUpgrade == 0>>
-	[[Upgrade the fabricator with a genetic sequencer|Dispensary][$cash -= 120000, $geneticMappingUpgrade = 1]]
-	//Costs <<print cashFormat(120000)>>//
-	<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will allow for the identification of genetic abnormalities and production of specialized treatments.//
-	<br>
-<<else>>
-	The fabricator is capable of mapping a slave's genes and identifying abnormalities.
+<<if $geneticMappingUpgrade == 1>>
 	<br>
-	<<if $arcologies[0].childhoodFertilityInducedNCSResearch == 1>>
-		The fabricator is capable of producing treatments to induce NCS.
+	Gene Mods
+	<hr>
+
+	<<if $dispensaryUpgrade == 0>>
+		//The fabricator must upgraded before it can produce treatments to alter genes//
 		<br>
-	<</if>>
-	<<if $RapidCellGrowthFormula == 1>>
-		The fabricator is capable of producing treatments to accelerate cellular reproduction.
+	<<else>>
+		The fabricator is capable of mapping a slave's genes, identifying abnormalities and producing treatments to correct them.
 		<br>
+		<<if $arcologies[0].childhoodFertilityInducedNCSResearch == 1>>
+			The fabricator is capable of producing treatments to induce NCS.
+			<br>
+		<</if>>
+		<<if $RapidCellGrowthFormula == 1>>
+			The fabricator is capable of producing treatments to accelerate cellular reproduction.
+			<br>
+		<</if>>
 	<</if>>
 <</if>>
 
diff --git a/src/uncategorized/managePenthouse.tw b/src/uncategorized/managePenthouse.tw
index 7a1d984ac2d..4f2f1b36b59 100644
--- a/src/uncategorized/managePenthouse.tw
+++ b/src/uncategorized/managePenthouse.tw
@@ -282,6 +282,19 @@ __Penthouse Upgrades__
 
 <br>
 
+<<if $dispensary == 0>>
+<<if $rep > 2000>>
+	[[Install a pharmaceutical fabricator|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $dispensary = 1, $drugsCost = $drugsCost*.75, $PC.engineering += .1]]
+	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
+<<else>>
+	//You lack the reputation to obtain cutting-edge pharmaceutical technology//
+<</if>>
+<<else>>
+	There is a [[pharmaceutical fabricator|Dispensary]] attached to the surgery.
+<</if>>
+
+<br>
+
 <<if $surgeryUpgrade == 0>>
 <<if $rep > 10000>>
 	[[Upgrade the remote surgery|Manage Penthouse][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $surgeryUpgrade = 1, $PC.engineering += 1]]
@@ -293,17 +306,33 @@ __Penthouse Upgrades__
 	Your remote surgery has been heavily upgraded and customized.
 <</if>>
 
+<<if $seePreg == 1>>
+	<br>
+
+	<<if $pregnancyMonitoringUpgrade == 0>>
+	<<if $rep > 10000>>
+		[[Upgrade the pregnancy monitoring systems|Manage Penthouse][$cash -= Math.trunc(30000*$upgradeMultiplierArcology), $pregnancyMonitoringUpgrade = 1, $PC.engineering += 1]]
+		//Costs <<print cashFormat(Math.trunc(30000*$upgradeMultiplierArcology))>>//
+	<<else>>
+		//You lack the reputation to purchase improved pregnancy monitoring systems//
+	<</if>>
+	<<else>>
+		Your pregnancy monitoring systems have been heavily upgraded.
+	<</if>>
+<</if>>
+
 <br>
 
-<<if $dispensary == 0>>
-<<if $rep > 2000>>
-	[[Install a pharmaceutical fabricator|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $dispensary = 1, $drugsCost = $drugsCost*.75, $PC.engineering += .1]]
-	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
+<<if $geneticMappingUpgrade == 0>>
+<<if $rep > 14000>>
+	[[Install a genetic sequencer|Dispensary][$cash -= 120000, $geneticMappingUpgrade = 15, $PC.engineering += .1]]
+	//Costs <<print cashFormat(120000)>>//
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will allow for the identification of genetic abnormalities and production of specialized treatments.//
 <<else>>
-	//You lack the reputation to obtain cutting-edge pharmaceutical technology//
+	//You lack the reputation to purchase a cutting-edge genetic sequencer//
 <</if>>
 <<else>>
-	There is a [[pharmaceutical fabricator|Dispensary]] attached to the surgery.
+	There is a genetic sequencer linked with the pharmaceutical fabricator.
 <</if>>
 
 <br>
-- 
GitLab