From 066d802575dd1d7774a8b96fad16e717abb080ba Mon Sep 17 00:00:00 2001
From: DCoded <dcoded@live.com>
Date: Mon, 8 Jun 2020 00:05:11 -0400
Subject: [PATCH] Bugfixes

---
 .../nursery/widgets/infants/InfantState.js    | 11 +++++++--
 .../nursery/widgets/utils/nurseryUtils.js     | 23 ++-----------------
 src/js/generateChild.js                       |  4 ++++
 3 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/src/facilities/nursery/widgets/infants/InfantState.js b/src/facilities/nursery/widgets/infants/InfantState.js
index a15b44a7fda..14d320f7430 100644
--- a/src/facilities/nursery/widgets/infants/InfantState.js
+++ b/src/facilities/nursery/widgets/infants/InfantState.js
@@ -23,6 +23,10 @@ App.Facilities.Nursery.InfantState = class InfantState {
 		this.birthWeek = jsRandom(0, 51);
 		/** How old she really is. */
 		this.actualAge = 18;
+		/** How old her body looks. */
+		this.visualAge = 18;
+		/** How old her body is. */
+		this.physicalAge = 18;
 		/** child's race */
 		this.race = "white";
 		/**
@@ -33,8 +37,11 @@ App.Facilities.Nursery.InfantState = class InfantState {
 		 * * "heavily freckled"
 		 */
 		this.markings = "none";
-		/** eye color */
-		this.eyeColor = "brown";
+		/**
+		 * The infant's eyes
+		 * @type App.Entity.EyeState
+		 */
+		this.eye = new App.Entity.EyeState();
 		/** hair color */
 		this.hColor = "brown";
 		/** pubic hair color */
diff --git a/src/facilities/nursery/widgets/utils/nurseryUtils.js b/src/facilities/nursery/widgets/utils/nurseryUtils.js
index 00aa06fd24f..7e6c6c7c207 100644
--- a/src/facilities/nursery/widgets/utils/nurseryUtils.js
+++ b/src/facilities/nursery/widgets/utils/nurseryUtils.js
@@ -123,7 +123,8 @@ App.Facilities.Nursery.infantToChild = function infantToChild(child) {
 	child.choosesOwnClothes = 0;
 	child.clit = jsRandom(0, 2);
 	child.clitPiercing = 0;
-	child.clone = 0;
+	child.clone = child.clone || 0;
+	child.cloneID = child.cloneID || 0;
 	child.clothes = "no clothing";
 	child.collar = "none";
 	child.corsetPiercing = 0;
@@ -188,26 +189,6 @@ App.Facilities.Nursery.infantToChild = function infantToChild(child) {
 		NCS: 0,
 		rapidCellGrowth: 0
 	};
-	child.geneticQuirks = {
-		albinism: 0,
-		androgyny: 0,
-		dwarfism: 0,
-		fertility: 0,
-		gigantism: 0,
-		gigantomastia: 0,
-		heterochromia: 0,
-		hyperFertility: 0,
-		mGain: 0,
-		mLoss: 0,
-		macromastia: 0,
-		pFace: 0,
-		rearLipedema: 0,
-		superfetation: 0,
-		uFace: 0,
-		wGain: 0,
-		wLoss: 0,
-		wellHung: 0
-	};
 	child.genetics = {};
 	child.hLength = jsRandom(30, 70);
 	child.hStyle = "long";
diff --git a/src/js/generateChild.js b/src/js/generateChild.js
index 7f1727c7f76..b0e7e8cbd62 100644
--- a/src/js/generateChild.js
+++ b/src/js/generateChild.js
@@ -46,6 +46,10 @@ globalThis.generateChild = function (mother, ovum, incubator=false) {
 		child.eyebrowHColor = child.hColor;
 		child.birthWeek = 0;
 		child.actualAge = 0;
+		if (genes.clone !== undefined) {
+			child.clone = genes.clone;
+			child.cloneID = genes.cloneID;
+		}
 		if (genes.faceShape !== undefined) {
 			child.faceShape = genes.faceShape;
 		}
-- 
GitLab