diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index beb03d91403c14293ee5f694463b1bac9ebba28f..e087e17aca766a155fc6aac5053c8f15fe44b8c8 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -586,7 +586,6 @@ App.Data.resetOnNGPlus = { // Incubator Subsection incubator: 0, - incubatorSlaves: 0, incubatorBulkRelease: 0, incubatorOrgans: [], incubatorOldID: 0, diff --git a/src/facilities/incubator/incubatorInteract.js b/src/facilities/incubator/incubatorInteract.js index b6970fcbf61ebf90c6e95de03da723ef9f41923a..2d9d7604eebd70e15061b2385aad8990c234784f 100644 --- a/src/facilities/incubator/incubatorInteract.js +++ b/src/facilities/incubator/incubatorInteract.js @@ -5,7 +5,6 @@ App.UI.incubator = function() { V.encyclopedia = "The Incubation Facility"; V.readySlaves = 0; V.readySlave = 0; - V.incubatorSlaves = V.tanks.length; V.reservedChildren = FetusGlobalReserveCount("incubator"); V.reservedChildrenNursery = FetusGlobalReserveCount("nursery"); @@ -49,12 +48,13 @@ App.UI.incubator = function() { function intro() { const el = document.createElement("p"); let r = []; - const freeTanks = V.incubator - V.incubatorSlaves; + const incubatorSlaves = V.tanks.length; + const freeTanks = V.incubator - incubatorSlaves; r.push(`${_incubatorNameCaps} is a clean, cold hall designed to be lined with tanks and their connected monitoring systems.`); - if (V.incubatorSlaves > 2) { + if (incubatorSlaves > 2) { r.push(`It's well used. The hum of active tanks fills the air.`); - } else if (V.incubatorSlaves > 0) { + } else if (incubatorSlaves > 0) { r.push(`It's barely used; most of the tanks lie dormant.`); } else { r.push(`It's empty and quiet. `); @@ -81,10 +81,10 @@ App.UI.incubator = function() { r = []; r.push(`It can support ${V.incubator}`); - if (V.incubatorSlaves === 1) { - r.push(`child. There is currently ${V.incubatorSlaves} tank`); + if (incubatorSlaves === 1) { + r.push(`child. There is currently ${incubatorSlaves} tank`); } else { - r.push(`children. There are currently ${V.incubatorSlaves} tanks`); + r.push(`children. There are currently ${incubatorSlaves} tanks`); } r.push(`in use in ${V.incubatorName}.`); App.Events.addNode(el, r, "div"); @@ -112,7 +112,8 @@ App.UI.incubator = function() { let r = []; let eligibility = 0; let linkArray; - const freeTanks = V.incubator - V.incubatorSlaves; + const incubatorSlaves = V.tanks.length; + const freeTanks = V.incubator - incubatorSlaves; r.push(`Reserve an eligible mother-to-be's child to be placed in a tank upon birth. Of ${V.incubator} tanks, ${freeTanks}`); if (freeTanks === 1) { r.push(`is`); @@ -200,7 +201,7 @@ App.UI.incubator = function() { const r = []; if ((slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) || slave.assignment === "be your agent" || slave.assignment === "live with your agent") { } else { - const freeTanks = V.incubator - V.incubatorSlaves; + const freeTanks = V.incubator - incubatorSlaves; const _slaveId = "slave-" + slave.ID; const _WL = slave.womb.length; const _reservedIncubator = WombReserveCount(slave, "incubator"); @@ -519,7 +520,8 @@ App.UI.incubator = function() { const el = new DocumentFragment(); let r = []; let linkArray = []; - const freeTanks = V.incubator - V.incubatorSlaves; + const incubatorSlaves = V.tanks.length; + const freeTanks = V.incubator - incubatorSlaves; const _WL = V.PC.womb.length; const _reservedIncubator = WombReserveCount(V.PC, "incubator"); const _reservedNursery = WombReserveCount(V.PC, "nursery"); @@ -708,11 +710,11 @@ App.UI.incubator = function() { const el = new DocumentFragment(); let row; let linkArray; - - if (V.incubatorSlaves > 0) { + const incubatorSlaves = V.tanks.length; + if (incubatorSlaves > 0) { App.UI.DOM.appendNewElement("h2", el, `Children in ${V.incubatorName}`); - for (let i = 0; i < V.incubatorSlaves; i++) { + for (let i = 0; i < incubatorSlaves; i++) { const p = document.createElement("p"); p.classList.add("incubator-tank"); let r = []; @@ -1091,7 +1093,7 @@ App.UI.incubator = function() { empty.append("This tank is currently reserved"); el.append(empty); } - const freeTanks = V.incubator - V.incubatorSlaves; + const freeTanks = V.incubator - incubatorSlaves; const empty = freeTanks - V.reservedChildren; if (empty) { for (let i = 0; i < empty; i++) { @@ -1689,7 +1691,7 @@ App.UI.incubator = function() { return App.UI.DOM.passageLink(`Release ready tank`, "Incubator Retrieval Workaround"); } } else { - for (let _inc = 0; _inc < V.incubatorSlaves; _inc++) { + for (let _inc = 0; _inc < incubatorSlaves; _inc++) { if (V.tanks[_inc].growTime <= 0) { V.incubatorOldID = V.tanks[_inc].ID; V.readySlave = V.tanks[_inc]; diff --git a/src/facilities/incubator/incubatorRetrievalWorkaround.tw b/src/facilities/incubator/incubatorRetrievalWorkaround.tw index 97babc585d392b4682bc988268ff72ac837876e7..cb888d4f58ab71df898d6f576e4ad3c6c794465a 100644 --- a/src/facilities/incubator/incubatorRetrievalWorkaround.tw +++ b/src/facilities/incubator/incubatorRetrievalWorkaround.tw @@ -11,7 +11,6 @@ <br><br> <<set $activeSlave = $readySlave>> - <<set $incubatorSlaves-->> <<includeDOM App.Desc.longSlave(V.activeSlave)>> <<if $readySlave.tankBaby != 3>> <<if $incubatorOrgans.length > 0>> @@ -48,7 +47,6 @@ <<for _irw = 0; _irw < $newSlavePool.length; _irw++>> <br><br> - <<set $incubatorSlaves-->> <<set _newSlave = $newSlavePool[_irw].object>> Name: <<= SlaveFullName(_newSlave)>> diff --git a/src/facilities/incubator/incubatorUtils.js b/src/facilities/incubator/incubatorUtils.js index 2765e9e43e2f09f77072fb68dd89c0ed88ff8c82..850b0d40a9c7a91e532aabc1462bf0d1d5f6f567 100644 --- a/src/facilities/incubator/incubatorUtils.js +++ b/src/facilities/incubator/incubatorUtils.js @@ -17,5 +17,4 @@ App.Facilities.Incubator.newChild = function(child) { } child.incubatorPregAdaptationInWeek = (fullAdapt - child.pregAdaptation) / child.growTime; V.tanks.push(child); - V.incubatorSlaves++; }; diff --git a/src/pregmod/analyzePlayerPregnancy.tw b/src/pregmod/analyzePlayerPregnancy.tw index e0bde45dbb69d4e565bb85133414a1fd381a0c03..fc97a1ffaecb155367b853a2ac8617a399a47252 100644 --- a/src/pregmod/analyzePlayerPregnancy.tw +++ b/src/pregmod/analyzePlayerPregnancy.tw @@ -7,7 +7,7 @@ <</if>> <<set $nextButton = "Continue", $nextLink = $storedLink>> -<<set _WL = $PC.womb.length, _incubatorReservations = WombReserveCount($PC, "incubator"), _nurseryReservations = WombReserveCount($PC, "nursery"), _freeTanks = $incubator - $incubatorSlaves, _freeCribs = $nursery - $cribs.length>> +<<set _WL = $PC.womb.length, _incubatorReservations = WombReserveCount($PC, "incubator"), _nurseryReservations = WombReserveCount($PC, "nursery"), _freeTanks = $incubator - $tanks.length, _freeCribs = $nursery - $cribs.length>> <<if _WL == 0>> <<goto "Manage Personal Affairs">> diff --git a/src/pregmod/analyzePregnancy.tw b/src/pregmod/analyzePregnancy.tw index d0c704364e161cb4bdc4e2a76e0feb063b63ed30..10162e134dc49ff9d4508ccb3f72ff9d6d157b47 100644 --- a/src/pregmod/analyzePregnancy.tw +++ b/src/pregmod/analyzePregnancy.tw @@ -8,7 +8,7 @@ <<set $nextButton = "Continue", $nextLink = $storedLink>> <<run App.Utils.setLocalPronouns(getSlave($AS))>> -<<set _WL = getSlave($AS).womb.length, _incubatorReservations = WombReserveCount(getSlave($AS), "incubator"), _nurseryReservations = WombReserveCount(getSlave($AS), "nursery"), _freeTanks = $incubator - $incubatorSlaves, _freeCribs = $nursery - $cribs.length>> +<<set _WL = getSlave($AS).womb.length, _incubatorReservations = WombReserveCount(getSlave($AS), "incubator"), _nurseryReservations = WombReserveCount(getSlave($AS), "nursery"), _freeTanks = $incubator - $tanks.length, _freeCribs = $nursery - $cribs.length>> <p class="scene-intro"> <<= getSlave($AS).slaveName>> is <<if getSlave($AS).devotion < 20>>restrained<<else>>comfortably reclined<</if>> with $his stomach prepped for examination. $He shudders slightly at the cold touch of the sensor against $his skin. diff --git a/src/pregmod/artificialInsemination.tw b/src/pregmod/artificialInsemination.tw index 60a5deba4c6ebaf830cffa0a5445ebd37b806816..4efe97259c34afb55af62eac7c728508e2b897c8 100644 --- a/src/pregmod/artificialInsemination.tw +++ b/src/pregmod/artificialInsemination.tw @@ -23,7 +23,7 @@ __Select an eligible slave to serve as the semen donatrix:__ <br>//You have no slaves with potent sperm.// <</if>> -<<if $incubatorSlaves > 0 && $incubatorReproductionSetting == 2>> +<<if $tanks.length > 0 && $incubatorReproductionSetting == 2>> <br><br> __Incubator settings are resulting in large-scale fluid secretion. Select an eligible incubatee to milk for semen:__ diff --git a/src/pregmod/incubatorReport.tw b/src/pregmod/incubatorReport.tw index 089f6254597c6d90a144e6a2738f8936b1ed8c07..f112712572ade7416c8f2478173e26cd7583dcfb 100644 --- a/src/pregmod/incubatorReport.tw +++ b/src/pregmod/incubatorReport.tw @@ -1,6 +1,6 @@ :: Incubator Report [nobr] -<<set $incubatorSlaves = 0, $readySlaves = 0>> +<<set $readySlaves = 0>> <<if $incubatorImprintSetting == 0>><<set $incubatorImprintSetting = "trust">><</if>> <<for _inc = 0; _inc < $tanks.length; _inc++>> @@ -12,7 +12,6 @@ <<set $tanks[_inc].actualAge++, $tanks[_inc].ovaryAge++>> <</if>> <</if>> - <<set $incubatorSlaves += 1>> <<if $tanks[_inc].growTime > 0>> <<set $tanks[_inc].growTime -= $incubatorUpgradeSpeed>> <br>@@.pink;<<print $tanks[_inc].slaveName>>'s@@ growth is currently being accelerated. $He <<if Math.round($tanks[_inc].growTime/$incubatorUpgradeSpeed) <= 0>>is @@.lime;ready for release.@@ $He will be ejected from $his tank upon your approach<<else>>will be ready for release in about <<print Math.round($tanks[_inc].growTime/$incubatorUpgradeSpeed)>> weeks<</if>>. @@ -822,7 +821,7 @@ <br><br> <</for>> /* -<<if $incubatorSlaves == 0>> +<<if $tanks.length == 0>> <<= capFirstChar($incubatorName)>> is currently unused. <</if>> */ diff --git a/src/pregmod/surrogacyWorkaround.tw b/src/pregmod/surrogacyWorkaround.tw index 03e61e00b4e800f91a70004b27af42226f549d0f..3220c7446895bab9cccc7510d26f13c9ae1cd00f 100644 --- a/src/pregmod/surrogacyWorkaround.tw +++ b/src/pregmod/surrogacyWorkaround.tw @@ -42,7 +42,7 @@ __Semen donatrix: _impreg __ <br>//You have no slaves with potent sperm.// <</if>> -<<if $incubatorSlaves > 0 && $incubatorReproductionSetting == 2>> +<<if $tanks.length > 0 && $incubatorReproductionSetting == 2>> <br><br> __Incubator settings are resulting in large-scale fluid secretion. Select an eligible incubatee to milk for semen:__