diff --git a/src/js/pregJS.js b/src/js/pregJS.js index 2b5a5ff77cb2e7b60101ec98f6135d32c9d61e96..6632fa4362e50561252553022e86b9f88ea32f18 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;