Skip to content
Snippets Groups Projects
Commit 65f74567 authored by brickode's avatar brickode
Browse files

Fixes (hopefully)

parent 3b32c55e
No related branches found
No related tags found
2 merge requests!4381Nursery,!4269WIP: Nursery
......@@ -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">>
......
......@@ -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>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment