From c478b1311ac1b9de330daf5fc464c80d3b2e70f3 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 14 May 2020 00:02:26 -0400 Subject: [PATCH] fixes --- src/js/wombJS.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/js/wombJS.js b/src/js/wombJS.js index b8a6b6f1e93..21c8aa1dedd 100644 --- a/src/js/wombJS.js +++ b/src/js/wombJS.js @@ -49,24 +49,14 @@ globalThis.WombInit = function(actor) { // actor.pregData = setup.pregData.human; // any changes in setup pregData template will be applied immediately to all. But can't be made separate changes. } + if (typeof actor.eggType !== 'string') { + actor.eggType = "human"; + } + // backward compatibility setup. Fully accurate for normal pregnancy only. - debugger; if (actor.womb.length > 0 && actor.womb[0].genetics === undefined && actor.eggType === "human") { i = 0; actor.womb.forEach(function(ft) { - - if (typeof ft.reserve !== 'string') { - ft.reserve = ""; - } - if (typeof ft.motherID !== 'number') { // setting missing biological mother ID for fetus. - ft.motherID = slave.ID; - } - if (ft.ID === undefined) { - ft.ID = generateNewID(); - } - if (typeof ft.realAge !== 'number') { // setting missing chronological age - ft.realAge = ft.age; - } ft.genetics = generateGenetics(actor, actor.pregSource, i); i++; }); @@ -713,7 +703,6 @@ globalThis.WombFatherRace = function(actor, raceName) { // replaces untraceable fatherIDs with missingParentID. Required for concurrent pregnancy to differentiate between siblings. globalThis.MissingParentIDCorrection = function(actor) { - debugger; WombInit(actor); actor.womb .filter(ft => (ft.genetics.father === 0 || (ft.genetics.father < -1 && ft.genetics.father >= -20 && ft.genetics.father !== -3))) -- GitLab