diff --git a/src/facilities/incubator/incubatorInteract.js b/src/facilities/incubator/incubatorInteract.js index e2b1eb76400dd444db60808394c4bce757cc454d..b6970fcbf61ebf90c6e95de03da723ef9f41923a 100644 --- a/src/facilities/incubator/incubatorInteract.js +++ b/src/facilities/incubator/incubatorInteract.js @@ -12,8 +12,7 @@ App.UI.incubator = function() { let tankOrgans = {}; const el = new DocumentFragment(); const _SL = V.slaves.length; - let _eligibility = 0; - let _childrenReserved; + let childrenReserved; const _incubatorNameCaps = capFirstChar(V.incubatorName); App.UI.tabBar.handlePreSelectedTab(V.tabChoice.Incubator); @@ -111,6 +110,7 @@ App.UI.incubator = function() { function mothers() { const el = new DocumentFragment(); let r = []; + let eligibility = 0; let linkArray; const freeTanks = V.incubator - V.incubatorSlaves; r.push(`Reserve an eligible mother-to-be's child to be placed in a tank upon birth. Of ${V.incubator} tanks, ${freeTanks}`); @@ -251,7 +251,7 @@ App.UI.incubator = function() { r.push(`baby.`); } if (_reservedIncubator > 0) { - _childrenReserved = 1; + childrenReserved = 1; if (_WL === 1) { r.push(`${His} child will be placed in ${V.incubatorName}.`); } else if (_reservedIncubator < _WL) { @@ -434,7 +434,7 @@ App.UI.incubator = function() { App.UI.DOM.appendNewElement("span", noRoom, `no room for ${his} offspring.`, "red"); linkArray.push(noRoom); } - _eligibility = 1; + eligibility = 1; App.Events.addNode(momEl, r, "div"); choices.append(App.UI.DOM.generateLinksStrip(linkArray)); @@ -445,11 +445,11 @@ App.UI.incubator = function() { } el.append(qlIncubator); $('div#qlIncubator').ready(sortByPreviousSort); - if (_eligibility === 0) { + if (eligibility === 0) { App.UI.DOM.appendNewElement("div", el, `You have no pregnant slaves bearing eligible children.`, "note"); } - if (V.reservedChildren !== 0 || _childrenReserved === 1) { + if (V.reservedChildren !== 0 || childrenReserved === 1) { /* the oops I made it go negative somehow button */ App.UI.DOM.appendNewElement( "div", @@ -532,7 +532,7 @@ App.UI.incubator = function() { const choices = document.createElement("div"); choices.classList.add("choices"); if (_reservedIncubator > 0) { - _childrenReserved = 1; + childrenReserved = 1; if (_WL === 1) { r.push(`Your child will be placed in ${V.incubatorName}.`); } else if (_reservedIncubator < _WL) {