From 986d94ba57a2abcbda53f28f51fb8c6bed2e6faa Mon Sep 17 00:00:00 2001
From: DCoded <dcoded@live.com>
Date: Sun, 17 Mar 2019 23:15:16 -0400
Subject: [PATCH] Partial revert of generateGenetics(), fixes

---
 src/init/storyInit.tw                       |  5 --
 src/js/generateGenetics.js                  | 60 ++++++++++-----------
 src/uncategorized/BackwardsCompatibility.tw | 14 -----
 3 files changed, 28 insertions(+), 51 deletions(-)

diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index afe0b3a075e..de1b0600445 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -654,11 +654,6 @@ You should have received a copy of the GNU General Public License along with thi
 <<set $farmyardLab = 0>>
 <<set $farmyardLabUpgrades = {animalOvaries: 0, animalTesticles: 0, animalMpreg: 0}>>
 <<set $animalsBought = {canines: 0, hooved: 0, felines: 0, labradorRetrievers: 0, germanShepherds: 0, goldenRetrievers: 0, frenchBulldogs: 0, bulldogs: 0, beagles: 0, poodles: 0, rottweilers: 0, yorkshireTerriers: 0, siberianHuskies: 0, horses: 0, bulls: 0, pigs: 0, siameses: 0, persians: 0, maineCoons: 0, ragdolls: 0, bengals: 0, abbysinians: 0, birmans: 0, orientalShorthairs: 0, sphynxes: 0, russianBlues: 0, wolves: 0, foxes: 0, jackals: 0, dingos: 0, zebras: 0, cougars: 0, jaguars: 0, pumas: 0, lynx: 0, leopards: 0, lions: 0, tigers: 0}>>
-/* animal objects used for generating genetics */
-<<set $dog = {}>>
-<<set $horse = {}>>
-<<set $pig = {}>>
-<<set $cow = {}>>
 <<set $canines = []>>
 <<set $hooved = []>>
 <<set $felines = []>>
diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js
index 56b92c4c364..1712104cddb 100644
--- a/src/js/generateGenetics.js
+++ b/src/js/generateGenetics.js
@@ -1,7 +1,6 @@
 /* eslint-disable no-undef */
 // Generates a child's genetics based off mother and father and returns it as an object to be attached to an ovum
 
-// TODO: this will need to be expanded to handle non-human fetuses
 window.generateGenetics = (function() {
 	"use strict";
 	let genes;
@@ -53,43 +52,37 @@ window.generateGenetics = (function() {
 		} else if (actor2 === -1) {
 			father = V.PC;
 			activeFather = V.PC;
-		} else if (actor2 === -8) {
-			if (actor1.eggType !== "human") {
-				father = actor2.eggType;	// TODO: may cause errors, hopefully not though
-			}
 		} else {
 			father = 0;
 			activeFather = 0;
 		}
 		
-		if (actor2.eggType === "human") {
-			genes.gender = setGender(father, mother);
-			genes.name = setName(x);
-			genes.mother = setMotherID(actor1.ID);
-			genes.motherName = setMotherName(activeMother);
-			genes.father = setFatherID(actor2);
-			genes.fatherName = setFatherName(father, activeFather, actor2);
-			genes.nationality = setNationality(father, mother);
-			genes.geneticQuirks = setGeneticQuirks(father, mother, genes.gender);
-			genes.skin = setSkin(father, mother);
-			genes.race = setRace(father, mother, actor2);
-			genes.intelligence = setIntelligence(father, mother, activeMother, actor2);
-			genes.face = setFace(father, mother, activeMother, actor2, genes.geneticQuirks);
-			genes.faceShape = setFaceShape(father, mother);
-			genes.eyeColor = setEyeColor(father, mother, actor2);
-			if (genes.geneticQuirks.heterochromia === 2) {
-				genes.geneticQuirks.heterochromia = setHeterochromaticEyeColor(father, mother, actor2);
-			}
-			genes.hColor = setHColor(father, mother, actor2);
-			genes.underArmHStyle = setUnderArmHStyle(father, mother);
-			genes.pubicHStyle = setPubicHStyle(father, mother);
-			genes.markings = setMarkings(father, mother);
-			genes.sexualFlaw = setSexualFlaw(father, mother);
-			genes.behavioralFlaw = setBehavioralFlaw(father, mother);
-			genes.fetish = setFetish(father, mother);
-
-			return genes;
+		genes.gender = setGender(father, mother);
+		genes.name = setName(x);
+		genes.mother = setMotherID(actor1.ID);
+		genes.motherName = setMotherName(activeMother);
+		genes.father = setFatherID(actor2);
+		genes.fatherName = setFatherName(father, activeFather, actor2);
+		genes.nationality = setNationality(father, mother);
+		genes.geneticQuirks = setGeneticQuirks(father, mother, genes.gender);
+		genes.skin = setSkin(father, mother);
+		genes.race = setRace(father, mother, actor2);
+		genes.intelligence = setIntelligence(father, mother, activeMother, actor2);
+		genes.face = setFace(father, mother, activeMother, actor2, genes.geneticQuirks);
+		genes.faceShape = setFaceShape(father, mother);
+		genes.eyeColor = setEyeColor(father, mother, actor2);
+		if (genes.geneticQuirks.heterochromia === 2) {
+			genes.geneticQuirks.heterochromia = setHeterochromaticEyeColor(father, mother, actor2);
 		}
+		genes.hColor = setHColor(father, mother, actor2);
+		genes.underArmHStyle = setUnderArmHStyle(father, mother);
+		genes.pubicHStyle = setPubicHStyle(father, mother);
+		genes.markings = setMarkings(father, mother);
+		genes.sexualFlaw = setSexualFlaw(father, mother);
+		genes.behavioralFlaw = setBehavioralFlaw(father, mother);
+		genes.fetish = setFetish(father, mother);
+
+		return genes;
 
 		// gender
 		function setGender(father, mother) {
@@ -171,6 +164,9 @@ window.generateGenetics = (function() {
 					case -7:
 						fatherName = "Lab designed";
 						break;
+					case -8:
+						fatherName = "One of your animals";
+						break;
 					case -9:
 						fatherName = "A Futanari Sister";
 						break;
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index f86cd4d5aab..7389d62645c 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -813,20 +813,6 @@
 <</if>>
 <<set _animalsBought = ["canines", "hooved", "felines", "labradorRetrievers", "germanShepherds", "goldenRetrievers", "frenchBulldogs", "bulldogs", "beagles", "poodles", "rottweilers", "yorkshireTerriers", "siberianHuskies", "horses", "bulls", "pigs", "siameses", "persians", "maineCoons", "ragdolls", "bengals", "abbysinians", "birmans", "orientalShorthairs", "sphynxes", "russianBlues", "wolves", "foxes", "jackals", "dingos", "zebras", "cougars", "jaguars", "pumas", "lynx", "leopards", "lions", "tigers"]>>
 <<run _animalsBought.forEach(function(species) { $animalsBought[species] = $animalsBought[species] || 0 ; })>>
-/* animal objects for generating genetics */
-/* TODO: this section may need more code to account for the addition of future variables */
-<<if ndef $dog>>
-	<<set $dog = {}>>
-<</if>>
-<<if ndef $horse>>
-	<<set $horse = {}>>
-<</if>>
-<<if ndef $pig>>
-	<<set $pig = {}>>
-<</if>>
-<<if ndef $cow>>
-	<<set $cow = {}>>
-<</if>>
 <<if ndef $canines>>
 	<<set $canines = []>>
 <</if>>
-- 
GitLab