diff --git a/src/npc/startingGirls/editFamily.js b/src/npc/startingGirls/editFamily.js new file mode 100644 index 0000000000000000000000000000000000000000..ed948e91a9420aa9232cf45660f79f1d07ce061f --- /dev/null +++ b/src/npc/startingGirls/editFamily.js @@ -0,0 +1,368 @@ +App.Intro.editFamily = function(slave) { + const el = new DocumentFragment(); + + return el; + + function mainDisplay() { + const el = new DocumentFragment(); + const _allowPCFamily = (V.freshPC === 1 || V.saveImported === 0); + + function makeElWithID(id, elType = "div") { + const el = document.createElement(elType); + el.id = id; + return el; + } + el.append() + + const editFamily = makeElWithID("edit-family"); + + const familyTable = makeElWithID("family-table"); + editFamily.append(familyTable); + familyTable.append(makeElWithID("dont-be-dumb")); + + function mother() { + const div = new DocumentFragment(); + const linkArray = []; + + const nameEl = makeElWithID("motherName") + nameEl.append(parentName("mother")); + div.append(nameEl); + + div.append("Mother: "); + + linkArray.push( + App.UI.DOM.link( + "Reset", + () => { + slave.mother = 0; + refresh(); + } + ) + ) + + if (V.PC.vagina > 0 && ((V.PC.actualAge - slave.actualAge) >= V.fertilityAge) && ((V.PC.mother !== slave.mother) || (slave.mother === 0)) && _allowPCFamily) { + linkArray.push( + App.UI.DOM.link( + "You", + () => { + slave.mother = V.PC.ID; + refresh(); + } + ) + ) + } + + for (_efw = 0; _efw < V.slaves.length; _efw++) { + if (V.slaves[_efw].vagina > 0 && ((V.slaves[_efw].actualAge - slave.actualAge) >= V.slaves[_efw].pubertyAgeXX) && ((V.slaves[_efw].mother !== slave.mother) || (slave.mother === 0)) && V.slaves[_efw].newGamePlus === 0) { + _id = V.slaves[_efw].ID; + _slaveName = V.slaves[_efw].slaveName; + linkArray.push( + App.UI.DOM.link( + _slaveName, + () => { + slave.mother = _id + refresh(); + } + ) + ) + } + } + + return div; + } + + + + + + <br>''Father:'' <span id="fatherName"> + <<parentName "father">></span> + <<link "Reset">> + slave.father = 0; + <<redisplayFamily>> + <</link>> + if (V.PC.dick > 0) && ((V.PC.actualAge - slave.actualAge) >= V.potencyAge) && ((V.PC.father !== slave.father) || (slave.father === 0)) && _allowPCFamily { + | <<link "You">> + slave.father = V.PC.ID; + <<redisplayFamily>> + <</link>> + } + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].dick > 0) && (((V.slaves[_efw].actualAge - slave.actualAge) >= V.slaves[_efw].pubertyAgeXY)) && ((V.slaves[_efw].father !== slave.father) || (slave.father === 0)) && V.slaves[_efw].newGamePlus === 0 { + | + _id = V.slaves[_efw].ID; + _slaveName = V.slaves[_efw].slaveName; + <<print " + <<link _slaveName>> + slave.father = " + _id + "; + <<redisplayFamily>> + <</link>> + ">> + } + <</for>> + + <br>''Same mother as:'' <span id="sameMotherNames"> + V.App.StartingGirls.listOfSlavesWithParent('mother', slave.mother)</span> + <<link "Reset">> + slave.mother = 0; + <<redisplayFamily>> + <</link>> + if (slave.mother !== V.PC.ID) && (V.PC.mother !== slave.ID) && _allowPCFamily { + | + <<link "You">> + if (V.PC.mother !== 0) { + slave.mother = V.PC.mother; + } else if (slave.mother !== 0) { + V.PC.mother = slave.mother; + } else { + slave.mother = -20 - 2*slave.ID; + V.PC.mother = slave.mother; + } + <<redisplayFamily>> + <</link>> + } + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].newGamePlus === 0) { + if (V.saveImported === 1) {| + } + _slaveName = V.slaves[_efw].slaveName; + _slave = V.slaves[_efw]; + if (slave.mother !== _slave.ID) && (_slave.mother !== slave.ID) { + | + <<print " + <<link _slaveName>> + _slave = V.slaves[" + _efw + "]; + if (_slave.mother !== 0) { + slave.mother = _slave.mother; + } else if (slave.mother !== 0) { + _slave.mother = slave.mother; + } else { + slave.mother = -20 - 2*slave.ID; + _slave.mother = slave.mother; + } + <<redisplayFamily>> + <</link>> + ">> + } + } + <</for>> + + <br>''Same father as:'' <span id="sameFatherNames"> + V.App.StartingGirls.listOfSlavesWithParent('father', slave.father)</span> + <<link "Reset">> + slave.father = 0; + <<replace '#fatherName'>> + <</replace>> + <<replace '#sameFatherNames'>> + <</replace>> + <<redisplayFamily>> + <</link>> + if (slave.father !== V.PC.ID) && (V.PC.father !== slave.ID) && _allowPCFamily { + | + <<link "You">> + if (V.PC.father !== 0) { + slave.father = V.PC.father; + } else if (slave.father !== 0) { + V.PC.father = slave.father; + } else { + slave.father = (-20 - 2*slave.ID -1); + V.PC.father = slave.father; + } + <<redisplayFamily>> + <</link>> + } + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].newGamePlus === 0) { + if (V.saveImported === 1) {| + } + _slaveName = V.slaves[_efw].slaveName; + _slave = V.slaves[_efw]; + if (slave.father !== _slave.ID) && (_slave.father !== slave.ID) { + | + <<print " + <<link _slaveName>> + _slave = V.slaves[" + _efw + "]; + if (_slave.father !== 0) { + slave.father = _slave.father; + } else if (slave.father !== 0) { + _slave.father = slave.father; + } else { + slave.father = (-20 - 2*slave.ID -1); + _slave.father = slave.father; + } + <<redisplayFamily>> + <</link>> + ">> + } + } + <</for>> + + <br>''Mother of the children:'' <span id="motheredNames"> + V.App.StartingGirls.listOfSlavesWithParent("mother", slave.ID)</span> + <<link "Reset">> + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].mother === slave.ID && V.slaves[_efw].newGamePlus === 0) { + V.slaves[_efw].mother = 0; + } + <</for>> + if (V.PC.mother === slave.ID && _allowPCFamily) { + V.PC.mother = 0; + } + <<redisplayFamily>> + <</link>> + if (slave.vagina >= 0) { + if ((slave.actualAge - V.PC.actualAge) >= V.fertilityAge) && ((V.PC.mother !== slave.mother) || (slave.mother === 0)) && _allowPCFamily { + | + <<link "You">> + V.PC.mother = slave.ID; + if (slave.vagina === 0) { + slave.vagina = 1; + } + <<redisplayFamily>> + <</link>> + } + + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].newGamePlus === 0) { + _slaveName = V.slaves[_efw].slaveName; + _slave = V.slaves[_efw]; + if ((slave.actualAge - _slave.actualAge) >= V.fertilityAge) && ((_slave.mother !== slave.mother) || (slave.mother === 0)) { + | + <<print " + <<link _slaveName>> + _slave = V.slaves[" + _efw + "]; + _slave.mother = slave.ID; + if (slave.vagina === 0) { + slave.vagina = 1; + } + <<redisplayFamily>> + <</link>> + ">> + } + } + <</for>> + } + + <br>''Father of the children:'' <span id="fatheredNames"> + V.App.StartingGirls.listOfSlavesWithParent("father", slave.ID)</span> + <<link "Reset">> + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].father === slave.ID && V.slaves[_efw].newGamePlus === 0) { + V.slaves[_efw].father = 0; + } + <</for>> + if (V.PC.father === slave.ID && _allowPCFamily) { + V.PC.father = 0; + } + <<redisplayFamily>> + <</link>> + if (slave.dick > 0) { + if ((slave.actualAge - V.PC.actualAge) >= V.potencyAge) && ((V.PC.father !== slave.father) || (slave.father === 0)) && _allowPCFamily { + | + <<link "You">> + V.PC.father = slave.ID; + <<redisplayFamily>> + <</link>> + } + + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].newGamePlus === 0) { + _slaveName = V.slaves[_efw].slaveName; + _slave = V.slaves[_efw]; + if ((slave.actualAge - _slave.actualAge) >= V.potencyAge) && ((_slave.father !== slave.father) || (slave.father === 0)) { + | + <<print " + <<link _slaveName>> + _slave = V.slaves[" + _efw + "]; + _slave.father = slave.ID; + <<redisplayFamily>> + <</link>> + ">> + } + } + <</for>> + } + + <br> + if (_allowPCFamily) { + <<link "Reset ALL PC Relatives">> + _sameMother = 0, _sameFather = 0; + <<for _efw = 0; _efw < V.slaves.length; _efw++>> + if (V.slaves[_efw].newGamePlus === 0) { + if (V.slaves[_efw].mother === V.PC.ID) { + V.slaves[_efw].mother = 0; + } + if (V.slaves[_efw].father === V.PC.ID) { + V.slaves[_efw].father = 0; + } + if (V.slaves[_efw].mother === V.PC.mother) { + _sameMother++; + } + if (V.slaves[_efw].father === V.PC.father) { + _sameFather++; + } + } + <</for>> + if (_sameMother === 0 && slave.mother === V.PC.mother) { + slave.mother = 0; + } + if (_sameFather === 0 && slave.father === V.PC.father) { + slave.father = 0; + } + <<for _efw = 0; (_efw < V.slaves.length && (_sameMother === 1 || _sameFather === 1)); _efw++>> + if (V.slaves[_efw].newGamePlus === 0) { + if (V.slaves[_efw].mother === V.PC.mother && _sameMother === 1) { + V.slaves[_efw].mother = 0, _sameMother = 0; + } + if (V.slaves[_efw].father === V.PC.father && _sameFather === 1) { + V.slaves[_efw].father = 0, _sameFather = 0; + } + } + <</for>> + if (slave.mother === V.PC.ID) { + slave.mother = 0; + } + if (slave.father === V.PC.ID) { + slave.father = 0; + } + V.PC.father = 0; + V.PC.mother = 0; + <<redisplayFamily>> + <</link>> + } + + <br> + <span id="familySummary"> + V.App.Desc.family(slave)</span> + <br> + </div> + <div id="family-tree"></div> + </div> + + } + + /** + * + * @param {string} rel "mother", etc. Property of slave object. + */ + function parentName(rel) { + if (slave[rel] === V.PC.ID) { + return `You`; + } else { + const relObj = getSlave(slave[rel]); + return relObj ? relObj.slaveName : "Unknown"; + } + } + + function refresh() { + jQuery('#dont-be-dumb').empty().append(App.UI.DOM.makeElement("div", "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.", "note")); + jQuery('#fatheredNames').empty().append(App.StartingGirls.listOfSlavesWithParent("father", slave.ID)); + jQuery('#motheredNames').empty().append(App.StartingGirls.listOfSlavesWithParent("mother", slave.ID)); + jQuery('#familySummary').empty().append(App.Desc.family(slave)); + jQuery('#motherName').empty().append(parentName("mother")); + jQuery('#fatherName').empty().append(parentName("father")); + jQuery('#sameMotherNames').empty().append(App.StartingGirls.listOfSlavesWithParent("mother", slave.mother)); + jQuery('#sameFatherNames').empty().append(App.StartingGirls.listOfSlavesWithParent("father", slave.father)); + App.StartingGirls.uncommittedFamilyTree(slave); + } +}; diff --git a/src/utility/extendedFamilyWidgets.tw b/src/utility/extendedFamilyWidgets.tw index af8d2cc357d5925de8467e7208d1fb4041fe7f36..bdb8b8ec54012a1645622eaa902b9c4026b54b0a 100644 --- a/src/utility/extendedFamilyWidgets.tw +++ b/src/utility/extendedFamilyWidgets.tw @@ -1,307 +1,308 @@ :: extended family widgets [nobr widget] <<widget "parentName">> -<<if $activeSlave[$args[0]] == $PC.ID>> - You -<<else>> - <<set _j = $slaveIndices[$activeSlave[$args[0]]]>> - <<if def _j>> - <<print $slaves[_j].slaveName>> + <<if $activeSlave[$args[0]] == $PC.ID>> + You <<else>> - Unknown + <<set _j = $slaveIndices[$activeSlave[$args[0]]]>> + <<if def _j>> + <<print $slaves[_j].slaveName>> + <<else>> + Unknown + <</if>> <</if>> -<</if>> <</widget>> <<widget "redisplayFamily">> -<<replace '#dont-be-dumb'>><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'>><<= App.StartingGirls.listOfSlavesWithParent("father", $activeSlave.ID)>><</replace>> -<<replace '#motheredNames'>><<= App.StartingGirls.listOfSlavesWithParent("mother", $activeSlave.ID)>><</replace>> -<<replace '#familySummary'>><<= App.Desc.family($activeSlave)>><</replace>> -<<replace '#motherName'>><<parentName "mother">><</replace>> -<<replace '#fatherName'>><<parentName "father">><</replace>> -<<replace '#sameMotherNames'>><<= App.StartingGirls.listOfSlavesWithParent("mother", $activeSlave.mother)>><</replace>> -<<replace '#sameFatherNames'>><<= App.StartingGirls.listOfSlavesWithParent("father", $activeSlave.father)>><</replace>> -<<run App.StartingGirls.uncommittedFamilyTree($activeSlave)>> + <<replace '#dont-be-dumb'>><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'>><<= App.StartingGirls.listOfSlavesWithParent("father", $activeSlave.ID)>><</replace>> + <<replace '#motheredNames'>><<= App.StartingGirls.listOfSlavesWithParent("mother", $activeSlave.ID)>><</replace>> + <<replace '#familySummary'>><<= App.Desc.family($activeSlave)>><</replace>> + <<replace '#motherName'>><<parentName "mother">><</replace>> + <<replace '#fatherName'>><<parentName "father">><</replace>> + <<replace '#sameMotherNames'>><<= App.StartingGirls.listOfSlavesWithParent("mother", $activeSlave.mother)>><</replace>> + <<replace '#sameFatherNames'>><<= App.StartingGirls.listOfSlavesWithParent("father", $activeSlave.father)>><</replace>> + <<run App.StartingGirls.uncommittedFamilyTree($activeSlave)>> <</widget>> <<widget "editFamily">> -<<set _allowPCFamily = ($freshPC == 1 || $saveImported == 0)>> -<div id="edit-family"><div id="family-table"> + <<set _allowPCFamily = ($freshPC == 1 || $saveImported == 0)>> + <div id="edit-family"> + <div id="family-table"> -<span id="dont-be-dumb"></span> + <span id="dont-be-dumb"></span> -<br>''Mother:'' <span id="motherName"><<parentName "mother">></span> -<<link "Reset">> - <<set $activeSlave.mother = 0>> - <<redisplayFamily>> -<</link>> -<<if $PC.vagina > 0 && (($PC.actualAge - $activeSlave.actualAge) >= $fertilityAge) && (($PC.mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && _allowPCFamily>> - | <<link "You">><<set $activeSlave.mother = $PC.ID>><<redisplayFamily>><</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].vagina > 0 && (($slaves[_efw].actualAge - $activeSlave.actualAge) >= $slaves[_efw].pubertyAgeXX) && (($slaves[_efw].mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && $slaves[_efw].newGamePlus == 0>> - | - <<set _id = $slaves[_efw].ID>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<print " - <<link _slaveName>> - <<set $activeSlave.mother = " + _id + ">> + <br>''Mother:'' <span id="motherName"><<parentName "mother">></span> + <<link "Reset">> + <<set $activeSlave.mother = 0>> <<redisplayFamily>> <</link>> - ">> - <</if>> -<</for>> + <<if $PC.vagina > 0 && (($PC.actualAge - $activeSlave.actualAge) >= $fertilityAge) && (($PC.mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && _allowPCFamily>> + | <<link "You">><<set $activeSlave.mother = $PC.ID>><<redisplayFamily>><</link>> + <</if>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].vagina > 0 && (($slaves[_efw].actualAge - $activeSlave.actualAge) >= $slaves[_efw].pubertyAgeXX) && (($slaves[_efw].mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && $slaves[_efw].newGamePlus == 0>> + | + <<set _id = $slaves[_efw].ID>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<print " + <<link _slaveName>> + <<set $activeSlave.mother = " + _id + ">> + <<redisplayFamily>> + <</link>> + ">> + <</if>> + <</for>> -<br>''Father:'' <span id="fatherName"><<parentName "father">></span> -<<link "Reset">> - <<set $activeSlave.father = 0>> - <<redisplayFamily>> -<</link>> -<<if ($PC.dick > 0) && (($PC.actualAge - $activeSlave.actualAge) >= $potencyAge) && (($PC.father != $activeSlave.father) || ($activeSlave.father == 0)) && _allowPCFamily>> - | <<link "You">><<set $activeSlave.father = $PC.ID>><<redisplayFamily>><</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if ($slaves[_efw].dick > 0) && ((($slaves[_efw].actualAge - $activeSlave.actualAge) >= $slaves[_efw].pubertyAgeXY)) && (($slaves[_efw].father != $activeSlave.father) || ($activeSlave.father == 0)) && $slaves[_efw].newGamePlus == 0>> - | - <<set _id = $slaves[_efw].ID>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<print " - <<link _slaveName>> - <<set $activeSlave.father = " + _id + ">> - <<redisplayFamily>> - <</link>> - ">> - <</if>> -<</for>> + <br>''Father:'' <span id="fatherName"><<parentName "father">></span> + <<link "Reset">> + <<set $activeSlave.father = 0>> + <<redisplayFamily>> + <</link>> + <<if ($PC.dick > 0) && (($PC.actualAge - $activeSlave.actualAge) >= $potencyAge) && (($PC.father != $activeSlave.father) || ($activeSlave.father == 0)) && _allowPCFamily>> + | <<link "You">><<set $activeSlave.father = $PC.ID>><<redisplayFamily>><</link>> + <</if>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if ($slaves[_efw].dick > 0) && ((($slaves[_efw].actualAge - $activeSlave.actualAge) >= $slaves[_efw].pubertyAgeXY)) && (($slaves[_efw].father != $activeSlave.father) || ($activeSlave.father == 0)) && $slaves[_efw].newGamePlus == 0>> + | + <<set _id = $slaves[_efw].ID>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<print " + <<link _slaveName>> + <<set $activeSlave.father = " + _id + ">> + <<redisplayFamily>> + <</link>> + ">> + <</if>> + <</for>> -<br>''Same mother as:'' <span id="sameMotherNames"><<= App.StartingGirls.listOfSlavesWithParent('mother', $activeSlave.mother)>></span> -<<link "Reset">> - <<set $activeSlave.mother = 0>> - <<redisplayFamily>> -<</link>> -<<if ($activeSlave.mother != $PC.ID) && ($PC.mother != $activeSlave.ID) && _allowPCFamily>> - | - <<link "You">> - <<if $PC.mother != 0>> - <<set $activeSlave.mother = $PC.mother>> - <<elseif $activeSlave.mother != 0>> - <<set $PC.mother = $activeSlave.mother>> - <<else>> - <<set $activeSlave.mother = -20 - 2*$activeSlave.ID>> - <<set $PC.mother = $activeSlave.mother>> - <</if>> - <<redisplayFamily>> - <</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<if $saveImported == 1>>|<</if>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<set _slave = $slaves[_efw]>> - <<if ($activeSlave.mother != _slave.ID) && (_slave.mother != $activeSlave.ID)>> - | - <<print " - <<link _slaveName>> - <<set _slave = $slaves[" + _efw + "]>> - <<if _slave.mother != 0>> - <<set $activeSlave.mother = _slave.mother>> + <br>''Same mother as:'' <span id="sameMotherNames"><<= App.StartingGirls.listOfSlavesWithParent('mother', $activeSlave.mother)>></span> + <<link "Reset">> + <<set $activeSlave.mother = 0>> + <<redisplayFamily>> + <</link>> + <<if ($activeSlave.mother != $PC.ID) && ($PC.mother != $activeSlave.ID) && _allowPCFamily>> + | + <<link "You">> + <<if $PC.mother != 0>> + <<set $activeSlave.mother = $PC.mother>> <<elseif $activeSlave.mother != 0>> - <<set _slave.mother = $activeSlave.mother>> + <<set $PC.mother = $activeSlave.mother>> <<else>> <<set $activeSlave.mother = -20 - 2*$activeSlave.ID>> - <<set _slave.mother = $activeSlave.mother>> + <<set $PC.mother = $activeSlave.mother>> <</if>> <<redisplayFamily>> <</link>> - ">> - <</if>> - <</if>> -<</for>> + <</if>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<if $saveImported == 1>>|<</if>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<set _slave = $slaves[_efw]>> + <<if ($activeSlave.mother != _slave.ID) && (_slave.mother != $activeSlave.ID)>> + | + <<print " + <<link _slaveName>> + <<set _slave = $slaves[" + _efw + "]>> + <<if _slave.mother != 0>> + <<set $activeSlave.mother = _slave.mother>> + <<elseif $activeSlave.mother != 0>> + <<set _slave.mother = $activeSlave.mother>> + <<else>> + <<set $activeSlave.mother = -20 - 2*$activeSlave.ID>> + <<set _slave.mother = $activeSlave.mother>> + <</if>> + <<redisplayFamily>> + <</link>> + ">> + <</if>> + <</if>> + <</for>> -<br>''Same father as:'' <span id="sameFatherNames"><<= App.StartingGirls.listOfSlavesWithParent('father', $activeSlave.father)>></span> -<<link "Reset">> - <<set $activeSlave.father = 0>> - <<replace '#fatherName'>><</replace>> - <<replace '#sameFatherNames'>><</replace>> - <<redisplayFamily>> -<</link>> -<<if ($activeSlave.father != $PC.ID) && ($PC.father != $activeSlave.ID) && _allowPCFamily>> - | - <<link "You">> - <<if $PC.father != 0>> - <<set $activeSlave.father = $PC.father>> - <<elseif $activeSlave.father != 0>> - <<set $PC.father = $activeSlave.father>> - <<else>> - <<set $activeSlave.father = (-20 - 2*$activeSlave.ID -1)>> - <<set $PC.father = $activeSlave.father>> - <</if>> - <<redisplayFamily>> - <</link>> -<</if>> -<<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<if $saveImported == 1>>|<</if>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<set _slave = $slaves[_efw]>> - <<if ($activeSlave.father != _slave.ID) && (_slave.father != $activeSlave.ID)>> - | - <<print " - <<link _slaveName>> - <<set _slave = $slaves[" + _efw + "]>> - <<if _slave.father != 0>> - <<set $activeSlave.father = _slave.father>> + <br>''Same father as:'' <span id="sameFatherNames"><<= App.StartingGirls.listOfSlavesWithParent('father', $activeSlave.father)>></span> + <<link "Reset">> + <<set $activeSlave.father = 0>> + <<replace '#fatherName'>><</replace>> + <<replace '#sameFatherNames'>><</replace>> + <<redisplayFamily>> + <</link>> + <<if ($activeSlave.father != $PC.ID) && ($PC.father != $activeSlave.ID) && _allowPCFamily>> + | + <<link "You">> + <<if $PC.father != 0>> + <<set $activeSlave.father = $PC.father>> <<elseif $activeSlave.father != 0>> - <<set _slave.father = $activeSlave.father>> + <<set $PC.father = $activeSlave.father>> <<else>> <<set $activeSlave.father = (-20 - 2*$activeSlave.ID -1)>> - <<set _slave.father = $activeSlave.father>> + <<set $PC.father = $activeSlave.father>> <</if>> <<redisplayFamily>> <</link>> - ">> - <</if>> - <</if>> -<</for>> - -<br>''Mother of the children:'' <span id="motheredNames"><<= App.StartingGirls.listOfSlavesWithParent("mother", $activeSlave.ID)>></span> -<<link "Reset">> - <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].mother == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> - <<set $slaves[_efw].mother = 0>> - <</if>> - <</for>> - <<if $PC.mother == $activeSlave.ID && _allowPCFamily>> - <<set $PC.mother = 0>> - <</if>> - <<redisplayFamily>> -<</link>> -<<if $activeSlave.vagina >= 0>> - <<if (($activeSlave.actualAge - $PC.actualAge) >= $fertilityAge) && (($PC.mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && _allowPCFamily>> - | - <<link "You">> - <<set $PC.mother = $activeSlave.ID>> - <<if $activeSlave.vagina == 0>> - <<set $activeSlave.vagina = 1>> <</if>> - <<redisplayFamily>> - <</link>> - <</if>> - - <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<set _slave = $slaves[_efw]>> - <<if (($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge) && ((_slave.mother != $activeSlave.mother) || ($activeSlave.mother == 0))>> - | - <<print " - <<link _slaveName>> - <<set _slave = $slaves[" + _efw + "]>> - <<set _slave.mother = $activeSlave.ID>> - <<if $activeSlave.vagina == 0>> - <<set $activeSlave.vagina = 1>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<if $saveImported == 1>>|<</if>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<set _slave = $slaves[_efw]>> + <<if ($activeSlave.father != _slave.ID) && (_slave.father != $activeSlave.ID)>> + | + <<print " + <<link _slaveName>> + <<set _slave = $slaves[" + _efw + "]>> + <<if _slave.father != 0>> + <<set $activeSlave.father = _slave.father>> + <<elseif $activeSlave.father != 0>> + <<set _slave.father = $activeSlave.father>> + <<else>> + <<set $activeSlave.father = (-20 - 2*$activeSlave.ID -1)>> + <<set _slave.father = $activeSlave.father>> + <</if>> + <<redisplayFamily>> + <</link>> + ">> <</if>> - <<redisplayFamily>> - <</link>> - ">> - <</if>> - <</if>> - <</for>> -<</if>> + <</if>> + <</for>> -<br>''Father of the children:'' <span id="fatheredNames"><<= App.StartingGirls.listOfSlavesWithParent("father", $activeSlave.ID)>></span> -<<link "Reset">> - <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].father == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> - <<set $slaves[_efw].father = 0>> - <</if>> - <</for>> - <<if $PC.father == $activeSlave.ID && _allowPCFamily>> - <<set $PC.father = 0>> - <</if>> - <<redisplayFamily>> -<</link>> -<<if $activeSlave.dick > 0>> - <<if (($activeSlave.actualAge - $PC.actualAge) >= $potencyAge) && (($PC.father != $activeSlave.father) || ($activeSlave.father == 0)) && _allowPCFamily>> - | - <<link "You">> - <<set $PC.father = $activeSlave.ID>> - <<redisplayFamily>> - <</link>> - <</if>> + <br>''Mother of the children:'' <span id="motheredNames"><<= App.StartingGirls.listOfSlavesWithParent("mother", $activeSlave.ID)>></span> + <<link "Reset">> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].mother == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> + <<set $slaves[_efw].mother = 0>> + <</if>> + <</for>> + <<if $PC.mother == $activeSlave.ID && _allowPCFamily>> + <<set $PC.mother = 0>> + <</if>> + <<redisplayFamily>> + <</link>> + <<if $activeSlave.vagina >= 0>> + <<if (($activeSlave.actualAge - $PC.actualAge) >= $fertilityAge) && (($PC.mother != $activeSlave.mother) || ($activeSlave.mother == 0)) && _allowPCFamily>> + | + <<link "You">> + <<set $PC.mother = $activeSlave.ID>> + <<if $activeSlave.vagina == 0>> + <<set $activeSlave.vagina = 1>> + <</if>> + <<redisplayFamily>> + <</link>> + <</if>> - <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<set _slaveName = $slaves[_efw].slaveName>> - <<set _slave = $slaves[_efw]>> - <<if (($activeSlave.actualAge - _slave.actualAge) >= $potencyAge) && ((_slave.father != $activeSlave.father) || ($activeSlave.father == 0))>> - | - <<print " - <<link _slaveName>> - <<set _slave = $slaves[" + _efw + "]>> - <<set _slave.father = $activeSlave.ID>> - <<redisplayFamily>> - <</link>> - ">> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<set _slave = $slaves[_efw]>> + <<if (($activeSlave.actualAge - _slave.actualAge) >= $fertilityAge) && ((_slave.mother != $activeSlave.mother) || ($activeSlave.mother == 0))>> + | + <<print " + <<link _slaveName>> + <<set _slave = $slaves[" + _efw + "]>> + <<set _slave.mother = $activeSlave.ID>> + <<if $activeSlave.vagina == 0>> + <<set $activeSlave.vagina = 1>> + <</if>> + <<redisplayFamily>> + <</link>> + ">> + <</if>> + <</if>> + <</for>> <</if>> - <</if>> - <</for>> -<</if>> -<br> -<<if _allowPCFamily>> - <<link "Reset ALL PC Relatives">> - <<set _sameMother = 0, _sameFather = 0>> - <<for _efw = 0; _efw < $slaves.length; _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<if $slaves[_efw].mother == $PC.ID>> - <<set $slaves[_efw].mother = 0>> - <</if>> - <<if $slaves[_efw].father == $PC.ID>> - <<set $slaves[_efw].father = 0>> - <</if>> - <<if $slaves[_efw].mother == $PC.mother>> - <<set _sameMother++>> + <br>''Father of the children:'' <span id="fatheredNames"><<= App.StartingGirls.listOfSlavesWithParent("father", $activeSlave.ID)>></span> + <<link "Reset">> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].father == $activeSlave.ID && $slaves[_efw].newGamePlus == 0>> + <<set $slaves[_efw].father = 0>> + <</if>> + <</for>> + <<if $PC.father == $activeSlave.ID && _allowPCFamily>> + <<set $PC.father = 0>> <</if>> - <<if $slaves[_efw].father == $PC.father>> - <<set _sameFather++>> + <<redisplayFamily>> + <</link>> + <<if $activeSlave.dick > 0>> + <<if (($activeSlave.actualAge - $PC.actualAge) >= $potencyAge) && (($PC.father != $activeSlave.father) || ($activeSlave.father == 0)) && _allowPCFamily>> + | + <<link "You">> + <<set $PC.father = $activeSlave.ID>> + <<redisplayFamily>> + <</link>> <</if>> + + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<set _slaveName = $slaves[_efw].slaveName>> + <<set _slave = $slaves[_efw]>> + <<if (($activeSlave.actualAge - _slave.actualAge) >= $potencyAge) && ((_slave.father != $activeSlave.father) || ($activeSlave.father == 0))>> + | + <<print " + <<link _slaveName>> + <<set _slave = $slaves[" + _efw + "]>> + <<set _slave.father = $activeSlave.ID>> + <<redisplayFamily>> + <</link>> + ">> + <</if>> + <</if>> + <</for>> <</if>> - <</for>> - <<if _sameMother == 0 && $activeSlave.mother == $PC.mother>> - <<set $activeSlave.mother = 0>> - <</if>> - <<if _sameFather == 0 && $activeSlave.father == $PC.father>> - <<set $activeSlave.father = 0>> - <</if>> - <<for _efw = 0; (_efw < $slaves.length && (_sameMother == 1 || _sameFather == 1)); _efw++>> - <<if $slaves[_efw].newGamePlus == 0>> - <<if $slaves[_efw].mother == $PC.mother && _sameMother == 1>> - <<set $slaves[_efw].mother = 0, _sameMother = 0>> - <</if>> - <<if $slaves[_efw].father == $PC.father && _sameFather == 1>> - <<set $slaves[_efw].father = 0, _sameFather = 0>> - <</if>> + + <br> + <<if _allowPCFamily>> + <<link "Reset ALL PC Relatives">> + <<set _sameMother = 0, _sameFather = 0>> + <<for _efw = 0; _efw < $slaves.length; _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<if $slaves[_efw].mother == $PC.ID>> + <<set $slaves[_efw].mother = 0>> + <</if>> + <<if $slaves[_efw].father == $PC.ID>> + <<set $slaves[_efw].father = 0>> + <</if>> + <<if $slaves[_efw].mother == $PC.mother>> + <<set _sameMother++>> + <</if>> + <<if $slaves[_efw].father == $PC.father>> + <<set _sameFather++>> + <</if>> + <</if>> + <</for>> + <<if _sameMother == 0 && $activeSlave.mother == $PC.mother>> + <<set $activeSlave.mother = 0>> + <</if>> + <<if _sameFather == 0 && $activeSlave.father == $PC.father>> + <<set $activeSlave.father = 0>> + <</if>> + <<for _efw = 0; (_efw < $slaves.length && (_sameMother == 1 || _sameFather == 1)); _efw++>> + <<if $slaves[_efw].newGamePlus == 0>> + <<if $slaves[_efw].mother == $PC.mother && _sameMother == 1>> + <<set $slaves[_efw].mother = 0, _sameMother = 0>> + <</if>> + <<if $slaves[_efw].father == $PC.father && _sameFather == 1>> + <<set $slaves[_efw].father = 0, _sameFather = 0>> + <</if>> + <</if>> + <</for>> + <<if $activeSlave.mother == $PC.ID>> + <<set $activeSlave.mother = 0>> + <</if>> + <<if $activeSlave.father == $PC.ID>> + <<set $activeSlave.father = 0>> + <</if>> + <<set $PC.father = 0>> + <<set $PC.mother = 0>> + <<redisplayFamily>> + <</link>> <</if>> - <</for>> - <<if $activeSlave.mother == $PC.ID>> - <<set $activeSlave.mother = 0>> - <</if>> - <<if $activeSlave.father == $PC.ID>> - <<set $activeSlave.father = 0>> - <</if>> - <<set $PC.father = 0>> - <<set $PC.mother = 0>> - <<redisplayFamily>> - <</link>> -<</if>> -<br> - <span id="familySummary"><<= App.Desc.family($activeSlave)>></span> -<br> -</div> -<div id="family-tree"></div> -</div> + <br> + <span id="familySummary"><<= App.Desc.family($activeSlave)>></span> + <br> + </div> + <div id="family-tree"></div> + </div> <</widget>>