From ad6983b7f3ced7436d206955f41ecaac34530da7 Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Thu, 18 Jun 2020 23:57:09 -0400 Subject: [PATCH] Minor childrenReport cleanup --- src/facilities/nursery/nursery.tw | 18 ------------- .../nursery/widgets/reports/childrenReport.js | 26 ++----------------- 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/src/facilities/nursery/nursery.tw b/src/facilities/nursery/nursery.tw index 19ee11dab7c..86e754f2f8c 100644 --- a/src/facilities/nursery/nursery.tw +++ b/src/facilities/nursery/nursery.tw @@ -394,24 +394,6 @@ <br> <<includeDOM App.Facilities.Nursery.childList()>> - - /* - FIXME: not sure if this works - <<set $newSlavePool = []>> - <<for _nur = 0; _nur < $cribs.length; _nur++>> - <<if $cribs[_nur].growTime <= 0>> - <<set $nurseryOldID = $cribs[_nur].ID>> /* single slave case *//* - <<set _tempObject = {object: $cribs[_nur], ID: $cribs[_nur].ID}>> - <<set $newSlavePool.push(clone(_tempObject))>> - <<run $cribs.splice(_nur, 1)>> - <<set _nur-->> - <</if>> - <</for>> - <<if $newSlavePool.length == 1>> - <<set $readySlave = $newSlavePool[0].object>> - <<set $newSlavePool = 0>> - <</if>> - */ </div> </div> diff --git a/src/facilities/nursery/widgets/reports/childrenReport.js b/src/facilities/nursery/widgets/reports/childrenReport.js index 83a407e7524..5dc0bf6c3f5 100644 --- a/src/facilities/nursery/widgets/reports/childrenReport.js +++ b/src/facilities/nursery/widgets/reports/childrenReport.js @@ -13,31 +13,9 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { let r = ``; - for (let i = 0; i < CL; i++) { + for (const child of V.cribs) { const - child = V.cribs[i]; - // { - // he, him, his, He, His - // } = getPronouns(child); - - let - he, - his, - him, - He, - His; - - // FIXME: get pronoun system to work with child objects - if (child.genes === "XX") { - he = "she", - him = "her", - his = "her"; - } else { - he = "he", - him = "him", - his = "his"; - } - He = capFirstChar(he), His = capFirstChar(his); + { he, his, He, His } = getPronouns(child); if (child.growTime > 0) { r += `<br><span class="pink">${child.slaveName}</span> is growing steadily. ${He} will be ready for release in about ${years(child.growTime)}. `; -- GitLab