diff --git a/src/facilities/incubator/incubatorUtils.js b/src/facilities/incubator/incubatorUtils.js index 850b0d40a9c7a91e532aabc1462bf0d1d5f6f567..ad935672e005c9ef8cc9298db78906c8aa6ed97c 100644 --- a/src/facilities/incubator/incubatorUtils.js +++ b/src/facilities/incubator/incubatorUtils.js @@ -1,6 +1,6 @@ /** * Sends a child to the Incubator if it has room - * @param {App.Entity.SlaveState|App.Entity.InfantState} child + * @param {App.Entity.SlaveState} child */ App.Facilities.Incubator.newChild = function(child) { let fullAdapt; diff --git a/src/facilities/nursery/utils/nurseryUtils.js b/src/facilities/nursery/utils/nurseryUtils.js index 0fccf40c002bb5e67fbb9a0fa515f3628d3a098b..7593b045f9738407d82040d308874069236c2a6f 100644 --- a/src/facilities/nursery/utils/nurseryUtils.js +++ b/src/facilities/nursery/utils/nurseryUtils.js @@ -611,7 +611,7 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { /** * Adds an infant to a the cribs - * @param {App.Entity.InfantState} child + * @param {App.Facilities.Nursery.InfantState} child */ App.Facilities.Nursery.newChild = function newChild(child) { child.ID = generateSlaveID(); diff --git a/src/npc/generate/generateGenetics.js b/src/npc/generate/generateGenetics.js index 76ba74e08891032503142c55f43461ab610d3db4..2d08e8ada9e42fe362c112eb67a5c16a9b8dce31 100644 --- a/src/npc/generate/generateGenetics.js +++ b/src/npc/generate/generateGenetics.js @@ -1194,14 +1194,14 @@ globalThis.generateGenetics = (function() { * @param {App.Entity.SlaveState} mother The slave object carrying the child source * @param {object} ovum The source for the child, comes from the mother's womb array * @param {boolean} [incubator=false] True if the child is destined for the incubator; false if it's destined for the nursery - * @returns {App.Entity.SlaveState|App.Entity.InfantState} + * @returns {App.Entity.SlaveState|App.Facilities.Nursery.InfantState} */ globalThis.generateChild = function(mother, ovum, incubator=false) { let genes = ovum.genetics; // TODO: maybe just argument this? We'll see. let child; if (!incubator) { // does extra work for the incubator if defined, otherwise builds a simple object - child = {}; + child = new App.Facilities.Nursery.InfantState(); child.genes = genes.gender; setSlaveName(child, genes); setSurname(child, genes); diff --git a/src/npc/generate/generateNewSlaveJS.js b/src/npc/generate/generateNewSlaveJS.js index 7c4197e7b9f64fdb40267da599659a3465750b49..bee39efea2630eabff984376fda456b4a86353e9 100644 --- a/src/npc/generate/generateNewSlaveJS.js +++ b/src/npc/generate/generateNewSlaveJS.js @@ -1625,6 +1625,7 @@ globalThis.GenerateNewSlave = (function() { } } + /** @type {Array<FC.BreastShape>} */ const BoobShapeGen = []; if (slave.boobs > 250 && slave.boobs < 800) { BoobShapeGen.push("perky"); diff --git a/src/npc/generate/heroCreator.js b/src/npc/generate/heroCreator.js index ab37ce4457a7b46e27bc31be1b577e7a45684adf..c8bc7a0000dbb50bebefccd7ed9b6ca50372479a 100644 --- a/src/npc/generate/heroCreator.js +++ b/src/npc/generate/heroCreator.js @@ -95,7 +95,7 @@ App.Utils.getHeroSlave = function(heroSlave) { } generatePronouns(heroSlave); if (heroSlave.geneMods === undefined) { - heroSlave.geneMods = {}; + heroSlave.geneMods = {NCS: 0, rapidCellGrowth: 0, immortality: 0}; } if (heroSlave.geneMods.NCS === undefined) { heroSlave.geneMods.NCS = 0; @@ -103,6 +103,9 @@ App.Utils.getHeroSlave = function(heroSlave) { if (heroSlave.geneMods.rapidCellGrowth === undefined) { heroSlave.geneMods.rapidCellGrowth = 0; } + if (heroSlave.geneMods.immortality === undefined) { + heroSlave.geneMods.immortality = 0; + } // WombInit(heroSlave); const newSlave = BaseSlave(); diff --git a/src/npc/infants/infantSummary.js b/src/npc/infants/infantSummary.js index f3085f30c8e788caefd1e006fc3fb2616f00487d..780bbe47d6fad954550ba41da8eccfa5f21e4b48 100644 --- a/src/npc/infants/infantSummary.js +++ b/src/npc/infants/infantSummary.js @@ -1,11 +1,10 @@ /** * Displays a summary of the infant - * @param {App.Entity.InfantState} child + * @param {App.Facilities.Nursery.InfantState} child * @returns {string} */ App.Facilities.Nursery.InfantSummary = function(child) { const weeksOwned = V.week - child.weekAcquired; - const pronouns = getPronouns(child); const abbreviate = V.UI.slaveSummary.abbreviation; let r = ``; @@ -1579,7 +1578,7 @@ App.Facilities.Nursery.InfantSummary = function(child) { } else if (child.mother === -1) { r += `Your ${daughter}`; if (child.relationship < -1) { - res += ` & ${PCrelationshipTerm(child)}`; + r += ` & ${PCrelationshipTerm(child)}`; handled = 1; } r += " "; @@ -1603,7 +1602,7 @@ App.Facilities.Nursery.InfantSummary = function(child) { } else if (child.father === -1 && child.mother !== -1) { r += `Your ${daughter}`; if (child.relationship < -1) { - res += ` & ${PCrelationshipTerm(child)}`; + r += ` & ${PCrelationshipTerm(child)}`; handled = 1; } r += " "; diff --git a/src/npc/infants/longInfantDescription.js b/src/npc/infants/longInfantDescription.js index 924a69efebedc3e5fa168c2d4eb627bc5628be99..9e3f39f648597252dc9de4eca105f73d3fd4a9e2 100644 --- a/src/npc/infants/longInfantDescription.js +++ b/src/npc/infants/longInfantDescription.js @@ -1,6 +1,6 @@ /** * Displays a detailed description of the infant - * @param {App.Entity.InfantState} child + * @param {App.Facilities.Nursery.InfantState} child * @returns {string} */ App.Facilities.Nursery.LongInfantDescription = function(child, {market = 0, eventDescription = 0} = {}) {