From 874310415d2ffa07579752853a4d879939f4576a Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Tue, 15 Dec 2020 11:32:16 -0500 Subject: [PATCH] clarify a name --- src/npc/startingGirls/editFamily.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/npc/startingGirls/editFamily.js b/src/npc/startingGirls/editFamily.js index 4c3bdea9ed3..cbb97f6d37e 100644 --- a/src/npc/startingGirls/editFamily.js +++ b/src/npc/startingGirls/editFamily.js @@ -1,8 +1,10 @@ App.Intro.editFamily = function(slave) { const el = new DocumentFragment(); const _allowPCFamily = (V.freshPC === 1 || V.saveImported === 0); - const canBeMom = (s) => ((s.mother !== slave.mother) || (slave.mother === 0)); - const canBeDad = (s) => ((s.father !== slave.father) || (slave.father === 0)); + + // Checks to make sure a slave is not the active slave's parent. + const isNotMom = (s) => ((s.mother !== slave.mother) || (slave.mother === 0)); + const isNotDad = (s) => ((s.father !== slave.father) || (slave.father === 0)); const editFamily = makeElWithID("edit-family"); @@ -50,7 +52,7 @@ App.Intro.editFamily = function(slave) { ) ); - if (V.PC.vagina > 0 && canBeMom(V.PC) && ((V.PC.actualAge - slave.actualAge) >= V.fertilityAge) && _allowPCFamily) { + if (V.PC.vagina > 0 && isNotMom(V.PC) && ((V.PC.actualAge - slave.actualAge) >= V.fertilityAge) && _allowPCFamily) { linkArray.push( App.UI.DOM.link( "You", @@ -63,7 +65,7 @@ App.Intro.editFamily = function(slave) { } for (const potentialRel of V.slaves) { - if (potentialRel.vagina > 0 && canBeMom(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXX) && potentialRel.newGamePlus === 0) { + if (potentialRel.vagina > 0 && isNotMom(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXX) && potentialRel.newGamePlus === 0) { linkArray.push( App.UI.DOM.link( potentialRel.slaveName, @@ -101,7 +103,7 @@ App.Intro.editFamily = function(slave) { ) ); - if (V.PC.dick > 0 && canBeDad(V.PC) && ((V.PC.actualAge - slave.actualAge) >= V.potencyAge) && _allowPCFamily) { + if (V.PC.dick > 0 && isNotDad(V.PC) && ((V.PC.actualAge - slave.actualAge) >= V.potencyAge) && _allowPCFamily) { linkArray.push( App.UI.DOM.link( "You", @@ -114,7 +116,7 @@ App.Intro.editFamily = function(slave) { } for (const potentialRel of V.slaves) { - if (potentialRel.dick > 0 && canBeDad(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXY) && potentialRel.newGamePlus === 0) { + if (potentialRel.dick > 0 && isNotDad(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXY) && potentialRel.newGamePlus === 0) { linkArray.push( App.UI.DOM.link( potentialRel.slaveName, @@ -281,7 +283,7 @@ App.Intro.editFamily = function(slave) { ); if (slave.vagina >= 0) { - if (canBeMom(V.PC) && (slave.actualAge - V.PC.actualAge) >= V.fertilityAge && _allowPCFamily) { + if (isNotMom(V.PC) && (slave.actualAge - V.PC.actualAge) >= V.fertilityAge && _allowPCFamily) { linkArray.push( App.UI.DOM.link( "You", @@ -294,7 +296,7 @@ App.Intro.editFamily = function(slave) { } for (const potentialRel of V.slaves) { - if (canBeMom(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXX) && potentialRel.newGamePlus === 0) { + if (isNotMom(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXX) && potentialRel.newGamePlus === 0) { linkArray.push( App.UI.DOM.link( potentialRel.slaveName, @@ -355,7 +357,7 @@ App.Intro.editFamily = function(slave) { ); if (slave.dick > 0) { - if (canBeDad(V.PC) && (slave.actualAge - V.PC.actualAge) >= V.potencyAge && _allowPCFamily) { + if (isNotDad(V.PC) && (slave.actualAge - V.PC.actualAge) >= V.potencyAge && _allowPCFamily) { linkArray.push( App.UI.DOM.link( "You", @@ -368,7 +370,7 @@ App.Intro.editFamily = function(slave) { } for (const potentialRel of V.slaves) { - if (canBeDad(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXX) && potentialRel.newGamePlus === 0) { + if (isNotDad(potentialRel) && ((potentialRel.actualAge - slave.actualAge) >= potentialRel.pubertyAgeXX) && potentialRel.newGamePlus === 0) { linkArray.push( App.UI.DOM.link( potentialRel.slaveName, -- GitLab