diff --git a/src/facilities/nursery/childSummary.tw b/src/facilities/nursery/childSummary.tw index 5cf9a021f7d3f9efd061e10cbf093c29755d2136..122147fef73678fa84a4caf0f8c1df647fed5270 100644 --- a/src/facilities/nursery/childSummary.tw +++ b/src/facilities/nursery/childSummary.tw @@ -11,11 +11,15 @@ "Rules Slave Select": c => (($Flag == 0 && !ruleSlaveSelected(c, $currentRule)) || ($Flag != 0 && ruleSlaveSelected(c, $currentRule))), "Rules Slave Exclude": c => (($Flag == 0 && !ruleSlaveExcluded(c, $currentRule)) || ($Flag != 0 && ruleSlaveExcluded(c, $currentRule))) }>>*/ -<<set _Pass = passage(), _CL = $cribs.length, $assignTo = _Pass, _indexed = 0, - _passagePreFilter = (c => c.assignment != "be your agent" && c.assignment != "live with your agent" && (!setup.passagePreFilters.hasOwnProperty(_Pass) || setup.passagePreFilters[_Pass](c))), + +<<set _Pass = passage(), _CL = $cribs.length, $assignTo = _Pass, _indexed = 0>> +/* + _passagePreFilter = (c => c.assignment != "be your agent" && c.assignment != "live with your agent" && (!setup.passagePreFilters.hasOwnProperty(_Pass) || setup.passagePreFilters[_Pass](c)), _filteredSlaveIdxs = $cribs.map(function(slave, idx) { return _passagePreFilter(slave) ? idx : null; }).filter(function(idx) { return idx != null; }), _indexSlavesIdxs = $cribs.map(function(slave, idx) { return _passagePreFilter(slave) ? idx : null; }).filter(function(idx) { return idx != null; })>> <<for !_.isUndefined(_csi = _filteredSlaveIdxs.shift())>> +*/ +<<for _csi = 0; _csi < _CL; _csi++>> <<set _Child = $cribs[_csi]>> <<set _childName = SlaveFullName(_Child);>> @@ -111,7 +115,6 @@ <<elseif "guard you" == _Child.assignment>>''@@.lightcoral;BG@@'' <</if>> <<if Array.isArray($personalAttention) && $personalAttention.findIndex(function(s) { return s.ID == _Child.ID; }) != -1>>''@@.lightcoral;PA@@''<</if>> - */ [[_childName|Child Interact][$activeSlave = $cribs[_csi]]] /* lists their names */ /* TODO: will the PC be able to give children PA? */ @@ -164,8 +167,9 @@ <<set $cribs[_csi] = _Child>> -will +will stay in $nurseryName for another _Child.weeksLeft weeks. +/* <<if (_Child.assignment == "rest") && (_Child.health >= -20)>> ''__@@.lawngreen;rest.@@__'' <<elseif (_Child.assignment == "stay confined") && ((_Child.devotion > 20) || ((_Child.trust < -20) && (_Child.devotion >= -20)) || ((_Child.trust < -50) && (_Child.devotion >= -50)))>> @@ -173,6 +177,7 @@ will <<else>> <<if _Child.choosesOwnAssignment == 1>>choose her own job<<else>>_Child.assignment<<if _Child.sentence > 0>> (_Child.sentence weeks)<</if>><</if>>. <</if>> +*/ /* <<if ($displayAssignments == 1) && (_Pass == "Nursery") && (_Child.ID != $HeadGirl.ID) && (_Child.ID != $Recruiter.ID) && (_Child.ID != $Bodyguard.ID)>> <<if _Child.assignment != "rest">> diff --git a/src/facilities/nursery/nursery.tw b/src/facilities/nursery/nursery.tw index 6048756ef10f30e4c0a247621496cc79f6fd69d1..cdc28b1322bbdae6987fd841fcdadd83f9cc771c 100644 --- a/src/facilities/nursery/nursery.tw +++ b/src/facilities/nursery/nursery.tw @@ -473,15 +473,15 @@ Target age for release: <<textbox "$targetAgeNursery" $targetAgeNursery "Nursery <br><br>''Children in $nurseryName'' <br> -<<for _c = 0; _c <$cribs.length; _c++>> -<<capture $cribs[_c]>> -<<link "$cribs[_c].slaveName" "Long Child Description">> -<<include "Child Summary">> -<<set $activeChild = $cribs[_c]>> -<</link>> -<br> -<</capture>> -<</for>> + <<for _c = 0; _c <$cribs.length; _c++>> + <<capture $cribs[_c]>> + <<link "$cribs[_c].slaveName" "Child Interact">> + <<set $activeChild = $cribs[_c], $activeChild.weeksLeft = ($targetAgeNursery * 52) - $activeChild.actualAge>> + <</link>> + <<include "Child Summary">> + <br> + <</capture>> + <</for>> <</if>> /* <<if $useSlaveSummaryTabs == 1>>