From a7bd0e10d79c0cc0561910fdd75e8957f60b759f Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Fri, 31 Jul 2020 22:46:57 -0700 Subject: [PATCH] Children are now generated with their final slave IDs, so there's no need for $nurseryOldID anymore --- src/facilities/nursery/childInteract.tw | 1 - src/facilities/nursery/nurseryRetrievalWorkaround.tw | 2 +- src/facilities/nursery/widgets/utils/nurseryUtils.js | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/facilities/nursery/childInteract.tw b/src/facilities/nursery/childInteract.tw index 76f18de06ba..fc2f6b751c4 100644 --- a/src/facilities/nursery/childInteract.tw +++ b/src/facilities/nursery/childInteract.tw @@ -1546,7 +1546,6 @@ Target destination: <b><span id="targetLocation">$activeChild.targetLocation</sp <<if $cheatMode>> <br>''Cheatmode:'' <<link "Retrieve immediately" "Nursery Retrieval Workaround">> - <<set $nurseryOldID = $cribs[$i].ID>> <<set $readySlave = $cribs.pluck([$i], [$i])>> <</link>> <</if>> diff --git a/src/facilities/nursery/nurseryRetrievalWorkaround.tw b/src/facilities/nursery/nurseryRetrievalWorkaround.tw index 46b0c7e404c..0a15f53b40e 100644 --- a/src/facilities/nursery/nurseryRetrievalWorkaround.tw +++ b/src/facilities/nursery/nurseryRetrievalWorkaround.tw @@ -13,7 +13,7 @@ $readySlave.slaveName has been discharged from $nurseryName and is ready to beco /* TODO: <<if $nurseryOrgans.length > 0>> <<for _i = 0; _i < $nurseryOrgans.length; _i++>> - <<if $nurseryOrgans[_i].ID == $nurseryOldID>> + <<if $nurseryOrgans[_i].ID == $activeSlave.ID>> <<set _newOrgan = {type: $nurseryOrgans[_i].type, weeksToCompletion: $nurseryOrgans[_i].weeksToCompletion, ID: $activeSlave.ID}>> <<if _newOrgan.weeksToCompletion <= 0>> <<set $completedOrgans.push($nurseryOrgans[_i])>> diff --git a/src/facilities/nursery/widgets/utils/nurseryUtils.js b/src/facilities/nursery/widgets/utils/nurseryUtils.js index ec19f956530..a20b79001d1 100644 --- a/src/facilities/nursery/widgets/utils/nurseryUtils.js +++ b/src/facilities/nursery/widgets/utils/nurseryUtils.js @@ -35,8 +35,6 @@ App.Facilities.Nursery.childList = function childList() { } if (child.actualAge >= 18) { - V.nurseryOldID = child.ID; - if (child.targetLocation === "freedom") { V.freedSlaves.push(child); } -- GitLab