From 2ed24d018aadb9e8188260f54537e0babb9a001f Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Sun, 2 Feb 2020 08:54:52 -0800 Subject: [PATCH] Set text correctly for links to incest scenes where exactly one daughter or sister is available. --- src/js/extendedFamilyModeJS.js | 8 +++++++- src/uncategorized/slaveInteract.tw | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/js/extendedFamilyModeJS.js b/src/js/extendedFamilyModeJS.js index 44f1bb4c4c1..a0926745c0b 100644 --- a/src/js/extendedFamilyModeJS.js +++ b/src/js/extendedFamilyModeJS.js @@ -375,7 +375,7 @@ window.randomAvailableParent = function(slave) { */ window.availableRelatives = function(slave) { let avail = { - mother: false, motherName: null, father: false, fatherName: null, sisters: 0, daughters: 0 + mother: false, motherName: null, father: false, fatherName: null, sisters: 0, daughters: 0, oneSisterRel: null, oneDaughterRel: null }; V.slaves.forEach((other) => { @@ -394,9 +394,15 @@ window.availableRelatives = function(slave) { } if (slave.ID === other.mother || slave.ID === other.father) { avail.daughters++; + if (avail.daughters === 1) { + avail.oneDaughterRel = relativeTerm(slave, other); + } } if (areSisters(slave, other) > 0) { avail.sisters++; + if (avail.sisters === 1) { + avail.oneSisterRel = relativeTerm(slave, other); + } } } }); diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index decf1cadd74..7b94e9f1e50 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -259,13 +259,13 @@ <<if $activeSlave.daughters > 0>> <<if _availRelatives.daughters == 0>> <<if $activeSlave.daughters == 1>> - //$His _daughter2 is unavailable// + //$His _availRelatives.oneDaughterRel is unavailable// <<else>> //$His daughters are unavailable// <</if>> <<else>> <<if $activeSlave.daughters == 1>> - | <<link "Fuck $him with $his _daughter2">><<replace "#miniscene">><<set $partner = "daughter">><<include "FRelation">><br> <</replace>><</link>> + | <<link "Fuck $him with $his _availRelatives.oneDaughterRel">><<replace "#miniscene">><<set $partner = "daughter">><<include "FRelation">><br> <</replace>><</link>> <<else>> | <<link "Fuck $him with one of $his daughters">><<replace "#miniscene">><<set $partner = "daughter">><<include "FRelation">><br> <</replace>><</link>> <</if>> @@ -279,13 +279,13 @@ <<if $activeSlave.sisters > 0>> <<if _availRelatives.sisters == 0>> <<if $activeSlave.sisters == 1>> - //$His _sister2 is unavailable// + //$His _availRelatives.oneSisterRel is unavailable// <<else>> //$His sisters are unavailable// <</if>> <<else>> <<if $activeSlave.sisters == 1>> - | <<link "Fuck $him with $his _sister2">><<replace "#miniscene">><<set $partner = "sister">><<include "FRelation">><br> <</replace>><</link>> + | <<link "Fuck $him with $his _availRelatives.oneSisterRel">><<replace "#miniscene">><<set $partner = "sister">><<include "FRelation">><br> <</replace>><</link>> <<else>> | <<link "Fuck $him with one of $his sisters">><<replace "#miniscene">><<set $partner = "sister">><<include "FRelation">><br> <</replace>><</link>> <</if>> -- GitLab