From 1db2ced9c4f7b7ae40b1749d72d1726a8806c568 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Sat, 4 Apr 2020 19:09:06 -0700 Subject: [PATCH] Replace <<listOfSlavesWithSameParent>> with <<listOfSlavesWithParent>> since they do almost exactly the same thing. --- src/facilities/nursery/nurseryWidgets.js | 2 +- src/utility/extendedFamilyWidgets.tw | 25 ++++-------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/src/facilities/nursery/nurseryWidgets.js b/src/facilities/nursery/nurseryWidgets.js index b6659fbed2f..ee6ffe658f3 100644 --- a/src/facilities/nursery/nurseryWidgets.js +++ b/src/facilities/nursery/nurseryWidgets.js @@ -2032,7 +2032,7 @@ App.Facilities.Nursery.LongInfantDescription = function(child) { r += `. `; } - r += App.Desc.family(child); + r += App.Desc.family(child) + ' '; if (father && fatherPC) { if (child.eyeColor === PC.eye.origColor) { diff --git a/src/utility/extendedFamilyWidgets.tw b/src/utility/extendedFamilyWidgets.tw index af2bc8b383e..0aef0ec0819 100644 --- a/src/utility/extendedFamilyWidgets.tw +++ b/src/utility/extendedFamilyWidgets.tw @@ -238,23 +238,6 @@ <</if>> <</widget>> -<<widget "listOfSlavesWithSameParent">> -<<if $activeSlave[$args[0]] != 0>> - <<set _printSeperator = false>> - <<if $activeSlave[$args[0]] == $PC[$args[0]]>> - You - <<set _printSeperator = true>> - <</if>> - <<for _j = 0; _j < $slaves.length; _j++>> - <<if $slaves[_j][$args[0]] == $activeSlave[$args[0]]>> - <<if _printSeperator>> | <</if>> - <<set _printSeperator = true>> - <<print $slaves[_j].slaveName>> - <</if>> - <</for>> -<</if>> -<</widget>> - <<widget "redisplayFamily">> <<replace '#dontBeDumb'>><br> //You will break things by making impossible relations such as being your own father. If you do this, clearing all PC relations will fix it. Probably.//<</replace>> <<replace '#fatheredNames'>><<listOfSlavesWithParent "father" $activeSlave.ID>><</replace>> @@ -262,8 +245,8 @@ <<replace '#familySummary'>><<= App.Desc.family($activeSlave)>><</replace>> <<replace '#motherName'>><<parentName "mother">><</replace>> <<replace '#fatherName'>><<parentName "father">><</replace>> -<<replace '#sameMotherNames'>><<listOfSlavesWithSameParent 'mother'>><</replace>> -<<replace '#sameFatherNames'>><<listOfSlavesWithSameParent 'father'>><</replace>> +<<replace '#sameMotherNames'>><<listOfSlavesWithParent "mother" $activeSlave.mother>><</replace>> +<<replace '#sameFatherNames'>><<listOfSlavesWithParent "father" $activeSlave.father>><</replace>> /* <<run updateFamilyTree($activeSlave, $slaves, $PC)>> */ <<set _tSlaveList = [$activeSlave]>> <<set _tSlaveList.push.apply(_tSlaveList, $slaves)>> @@ -337,7 +320,7 @@ <</if>> <</for>> -<br>''Same mother as:'' <span id="sameMotherNames"><<listOfSlavesWithSameParent 'mother'>></span> +<br>''Same mother as:'' <span id="sameMotherNames"><<listOfSlavesWithParent 'mother' $activeSlave.mother>></span> <<link "Reset">> <<set $activeSlave.mother = 0>> <<redisplayFamily>> @@ -381,7 +364,7 @@ <</if>> <</for>> -<br>''Same father as:'' <span id="sameFatherNames"><<listOfSlavesWithSameParent 'father'>></span> +<br>''Same father as:'' <span id="sameFatherNames"><<listOfSlavesWithParent 'father' activeSlave.father>></span> <<link "Reset">> <<set $activeSlave.father = 0>> <<replace '#fatherName'>><</replace>> -- GitLab