From c19946ef9b358e9865fa4a42faa516482f94c1d1 Mon Sep 17 00:00:00 2001 From: franklygeorge <54015-franklygeorge@users.noreply.gitgud.io> Date: Tue, 4 Feb 2025 07:42:46 -0500 Subject: [PATCH] Fix #5592 --- src/js/pregJS.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/js/pregJS.js b/src/js/pregJS.js index 2b5a5ff77cb..6632fa4362e 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -517,11 +517,13 @@ globalThis.tryKnockMeUp = function(mother, chance, hole, father) { return r; }; -globalThis.getIncubatorReserved = function( /* slaves */ ) { +/** Returns the amount of fetuses currently destined (reserved) for the incubator @returns {number} */ +globalThis.getIncubatorReserved = function() { return FetusGlobalReserveCount("incubator"); }; -globalThis.getNurseryReserved = function( /* slaves */ ) { +/** Returns the amount of fetuses currently destined (reserved) for the nursery @returns {number} */ +globalThis.getNurseryReserved = function() { return FetusGlobalReserveCount("nursery"); }; @@ -536,11 +538,11 @@ globalThis.findFather = function(fatherID) { if (fatherID === -1) { father = V.PC; } - father = getSlave(fatherID); + father = getSlave(fatherID, true); if (father === undefined) { // fast methods didn't find them so do a search through all HumanState objects - father = getHumanStates().find((s) => s.ID === fatherID); + father = getHumanStates(true).find((s) => s.ID === fatherID); } return father; -- GitLab