From 64efb12bf9eca728dc67c544ffa07623eb0b62a2 Mon Sep 17 00:00:00 2001 From: FC Helper Person <thr0w.4w4y8021@gmail.com> Date: Sun, 24 Feb 2019 18:52:37 -0800 Subject: [PATCH] Revert "Add aunts, nieces and cousins" This reverts commit 856994cc94476ed0169e124bf5e3409dd8ecf2b1 --- src/js/slaveSummaryWidgets.js | 161 ++-------------------------------- 1 file changed, 7 insertions(+), 154 deletions(-) diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index fdcfd0f07a8..294764fd40e 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -3858,51 +3858,6 @@ window.SlaveSummaryUncached = (function(){ } else if (slave.daughters > 1) { r += `multiple daughters `; } - if (areSisters(V.PC, slave)) { - r += `Your sister `; - } - let aunts = V.slaves.filter(function(s) { return (s.ID !== slave.ID) && isAunt(slave, s) && (s.genes === "XX"); }); - if (aunts.length === 1) { - let _ssj = V.slaves.findIndex(function(s) { - return isAunt(slave, s); - }); - if (_ssj !== -1) { - if (slave.genes === "XX") { - r += `${SlaveFullName(V.slaves[_ssj])}'s niece`; - } else if (slave.genes === "XY") { - r += `${SlaveFullName(V.slaves[_ssj])}'s nephew`; - } - if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTermShort(slave); - r += `& ${friendShipShort}`; - handled = 1; - } - } - r += " "; - } else if (aunts.length > 1) { - r += `multiple aunts `; - } - let nieces = V.slaves.filter(function(s) { return (s.ID !== slave.ID) && isAunt(s, slave) && (s.genes === "XX"); }); - if (nieces.length === 1) { - let _ssj = V.slaves.findIndex(function(s) { - return isAunt(s, slave); - }); - if (_ssj !== -1) { - if (slave.genes === "XX") { - r += `${SlaveFullName(V.slaves[_ssj])}'s aunt`; - } else if (slave.genes === "XY") { - r += `${SlaveFullName(V.slaves[_ssj])}'s uncle`; - } - if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTermShort(slave); - r += `& ${friendShipShort}`; - handled = 1; - } - } - r += " "; - } else if (nieces.length > 1) { - r += `multiple nieces `; - } if (slave.sisters === 1) { let _ssj = V.slaves.findIndex(function(s) { return areSisters(s, slave) > 0; @@ -3919,26 +3874,6 @@ window.SlaveSummaryUncached = (function(){ } else if (slave.sisters > 1) { r += `multiple sisters `; } - var cousins = V.slaves.filter(function(s) { return (s.ID !== slave.ID) && areCousins(s, slave); }); - if (cousins.length === 1) { - let _ssj = V.slaves.findIndex(function(s) { - return areCousins(s, slave); - }); - if (_ssj !== -1) { - r += `${SlaveFullName(V.slaves[_ssj])}'s cousin`; - if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTermShort(slave); - r += `& ${friendShipShort}`; - handled = 1; - } - } - r += " "; - } else if (cousins.length > 1) { - r += `multiple cousins `; - } - if (areCousins(V.PC, slave)) { - r += `Your cousin;`; - } if (slave.relationship > 0 && handled !== 1) { let _ssj = V.slaves.findIndex(function(s) { return s.ID === slave.relationshipTarget; @@ -4048,12 +3983,6 @@ window.SlaveSummaryUncached = (function(){ } else if (slave.mother in V.missingTable && V.showMissingSlavesSD && V.showMissingSlaves) { r += `${V.missingTable[slave.mother].fullName}'s <span class="lightgreen">daughter.</span> `; } - if (areSisters(V.PC, slave)) { - r += `Your <span class="lightgreen">sister.</span> `; - } - if (isAunt(V.PC, slave) && slave.genes === "XX") { - r += `Your <span class="lightgreen">aunt.</span> `; - } if (slave.father > 0 && slave.father !== slave.mother) { let _ssj = V.slaves.findIndex(function(s) { return s.ID === slave.father; @@ -4108,61 +4037,11 @@ window.SlaveSummaryUncached = (function(){ } } else if (slave.daughters > 1) { if (slave.daughters > 10) { - r += `Has <span class="lightgreen">tons of daughters.</span> `; + r += `<span class="lightgreen">Has tons of daughters.</span> `; } else if (slave.daughters > 5) { - r += `Has <span class="lightgreen">many daughters.</span> `; - } else { - r += `Has <span class="lightgreen">several daughters.</span> `; - } - } - let aunts = V.slaves.filter(function(s) { return (s.ID !== slave.ID) && isAunt(slave, s) && (slave.genes === "XX"); }); - if (aunts.length === 1) { - let _ssj = V.slaves.findIndex(function(s) { - return isAunt(slave, s); - }); - if (_ssj !== -1) { - if (slave.genes === "XX") { - r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">niece`; - } - if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave); - r += ` and ${friendShipShort}`; - handled = 1; - } - r += `.</span> `; - } - } else if (aunts.length > 1) { - if (aunts.length > 10) { - r += `Has <span class="lightgreen">tons of aunts.</span> `; - } else if (aunts.length > 5) { - r += `Has <span class="lightgreen">many aunts.</span> `; - } else { - r += `Has <span class="lightgreen">several aunts.</span> `; - } - } - let nieces = V.slaves.filter(function(s) { return (s.ID !== slave.ID) && isAunt(s, slave) && (s.genes === "XX"); }); - if (nieces.length === 1) { - let _ssj = V.slaves.findIndex(function(s) { - return isAunt(s, slave); - }); - if (_ssj !== -1) { - if (slave.genes === "XX") { - r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">aunt`; - } - if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave); - r += ` and ${friendShipShort}`; - handled = 1; - } - r += `.</span> `; - } - } else if (nieces.length > 1) { - if (nieces.length > 10) { - r += `Has <span class="lightgreen">tons of nieces.</span> `; - } else if (nieces.length > 5) { - r += `Has <span class="lightgreen">many nieces.</span> `; + r += `<span class="lightgreen">Has many daughters.</span> `; } else { - r += `Has <span class="lightgreen">several nieces.</span> `; + r += `<span class="lightgreen">Has several daughters.</span> `; } } if (slave.sisters === 1) { @@ -4180,39 +4059,13 @@ window.SlaveSummaryUncached = (function(){ } } else if (slave.sisters > 1) { if (slave.sisters > 10) { - r += `One of <span class="lightgreen">many sisters.</span> `; + r += `<span class="lightgreen">One of many sisters.</span> `; } else if (slave.sisters > 5) { - r += `Has <span class="lightgreen">many sisters.</span> `; - } else { - r += `Has <span class="lightgreen">several sisters.</span> `; - } - } - let cousins = V.slaves.filter(function(s) { return (s.ID != slave.ID) && areCousins(s, slave); }); - if (cousins.length === 1) { - let _ssj = V.slaves.findIndex(function(s) { - return areCousins(s, slave); - }); - if (_ssj !== -1) { - r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">cousin`; - if (slave.relationshipTarget === V.slaves[_ssj].ID) { - var friendShipShort = relationshipTerm(slave); - r += ` and ${friendShipShort}`; - handled = 1; - } - r += `.</span> `; - } - } else if (cousins.length > 1) { - if (cousins.length > 10) { - r += `One of <span class="lightgreen">many cousins.</span> `; - } else if (cousins.length > 5) { - r += `Has <span class="lightgreen">many cousins.</span> `; + r += `<span class="lightgreen">Has many sisters.</span> `; } else { - r += `Has <span class="lightgreen">several cousins.</span> `; + r += `<span class="lightgreen">Has several sisters.</span> `; } } - if (areCousins(V.PC, slave)) { - r += `Your <span class="lightgreen">cousin.</span> `; - } if (slave.relationship > 0 && handled !== 1) { let _ssj = V.slaves.findIndex(function(s) { return s.ID === slave.relationshipTarget; @@ -4223,7 +4076,7 @@ window.SlaveSummaryUncached = (function(){ r += `<span class="lightgreen">${friendship}.</span> `; } } else if (slave.relationship === -3 && slave.mother !== -1 && slave.father !== -1) { - r += `Your <span class="lightgreen">wife.</span> `; + r += `<span class="lightgreen">Your wife.</span> `; } else if (slave.relationship === -2) { r += `<span class="lightgreen">Emotionally bonded to you.</span> `; } else if (slave.relationship === -1) { -- GitLab