diff --git a/src/js/slaveSummaryWidgets.tw b/src/js/slaveSummaryWidgets.tw index b68a4801796025b850ac4326c45bd3bc4ad44cc1..dfcdfd633f1e0d9c090f9c8c531e5dd5e5324af9 100644 --- a/src/js/slaveSummaryWidgets.tw +++ b/src/js/slaveSummaryWidgets.tw @@ -1,4 +1,4 @@ -//:: Slave Summary Widgets JS [script] +:: Slave Summary Widgets JS [script] window.clearSummaryCache = function clearSummaryCache(slave) { if (!slave) @@ -9,11 +9,22 @@ window.clearSummaryCache = function clearSummaryCache(slave) { setup.summaryCache[slave] = undefined; }; +window.SlaveSummary = function SlaveSummary(slave) { + const V = State.variables; + if(V.useSummaryCache) { + if (setup.summaryCache[slave.ID] === undefined) + setup.summaryCache[slave.ID] = SlaveSummaryUncached(slave); + //this.output.appendChild(setup.summaryCache[State.temporary.Slave.ID].cloneNode(true)) + return setup.summaryCache[slave.ID]; + } else return SlaveSummaryUncached(slave); +}; + window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { + "use strict"; const V = State.variables; let r = ""; - if (V.abbreviateDevotion == 1) { - if (slave.fetish == "mindbroken") { + if (V.abbreviateDevotion === 1) { + if (slave.fetish === "mindbroken") { r += `<span class="red">MB</span>`; } else if (slave.devotion < -95) { r += `<span class="darkviolet">Hate${V.summaryStats ? `[${slave.devotion}]` : ''}</span>`; @@ -30,7 +41,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `<span class="magenta">Wor${V.summaryStats ? `[${slave.devotion$}]` : ''}</span>`; } - if (slave.fetish == "mindbroken") { + if (slave.fetish === "mindbroken") { true; } else if (slave.trust < -95) { r += `<span class="darkgoldenrod">ETerr${V.summaryStats ? `[${slave.trust}]` : ''}</span>`; @@ -59,8 +70,8 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="seagreen">VTrust ${V.summaryStats ? `[${slave.trust}]` : ''}</span>`; } } - } else if (V.abbreviateDevotion == 2) { - if (slave.fetish == "mindbroken") { + } else if (V.abbreviateDevotion === 2) { + if (slave.fetish === "mindbroken") { r += `<span class="red">Mindbroken.</span>`; } else if (slave.devotion < -95) { r += `<span class="darkviolet">Very hateful${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`; @@ -77,7 +88,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `<span class="magenta">Worshipful${V.summaryStats ? `[${slave.devotion}]` : ''}.</span>`; } - if (slave.fetish == "mindbroken") { + if (slave.fetish === "mindbroken") { true; } else if (slave.trust < -95) { r += `<span class="darkgoldenrod">Extremely terrified${V.summaryStats ? `[${slave.trust}]` : ''}.</span>`; @@ -108,8 +119,8 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } - if (slave.fuckdoll == 0) { - if (V.abbreviateRules == 1) { + if (slave.fuckdoll === 0) { + if (V.abbreviateRules === 1) { switch (slave.livingRules) { case "luxurious": r += `<strong>LS:Lux</strong>`; @@ -190,7 +201,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<strong>MaR:R</strong>`; break; } - } else if (V.abbreviateRules == 2) { + } else if (V.abbreviateRules === 2) { r += `Living standard: ${slave.livingRules}.`; if (canTalk(slave)) { r += `Speech rules: ${slave.speechRules}.`; @@ -202,11 +213,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } - if (slave.tired != 0) { + if (slave.tired !== 0) { r += `Tired.`; } - if (V.abbreviateDiet == 1) { + if (V.abbreviateDiet === 1) { if (slave.weight < -95) { r += `<strong><span class="red">W---${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`; } else if (slave.weight < -30) { @@ -222,37 +233,37 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.weight <= 30) { r += `<strong>W+${V.summaryStats? `[${slave.weight}]` : ''}</strong>`; } else if (slave.weight <= 95) { - if (slave.hips > 1 || V.arcologies[0].FSHedonisticDecadence != "unset") { + if (slave.hips > 1 || V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `<strong>W++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`; } else { r += `<strong><span class="red">W++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`; } } else if (slave.weight <= 130) { - if (slave.hips >= 2 || V.arcologies[0].FSHedonisticDecadence != "unset") { + if (slave.hips >= 2 || V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `<strong>W+++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`; } else { r += `<strong><span class="red">W+++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`; } } else if (slave.weight <= 160) { - if (V.arcologies[0].FSHedonisticDecadence != "unset") { + if (V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `<strong>W++++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`; } else { r += `<strong><span class="red">W++++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`; } } else if (slave.weight <= 190) { - if (V.arcologies[0].FSHedonisticDecadence != "unset") { + if (V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `<strong>W+++++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`; } else { r += `<strong><span class="red">W+++++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`; } } else { - if (V.arcologies[0].FSHedonisticDecadence != "unset") { + if (V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `<strong>W++++++${V.summaryStats? `[${slave.weight}]` : ''}</strong>`; } else { r += `<strong><span class="red">W++++++${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`; } } - } else if (V.abbreviateDiet == 2) { + } else if (V.abbreviateDiet === 2) { if (slave.weight < -95) { r += `<span class="red">Emaciated${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`; } else if (slave.weight < -30) { @@ -268,31 +279,31 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.weight <= 30) { r += `Plush${V.summaryStats? `[${slave.weight}]`: ''}.`; } else if (slave.weight <= 95) { - if (slave.hips > 1 || V.arcologies[0].FSHedonisticDecadence != "unset") { + if (slave.hips > 1 || V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `Nicely chubby${V.summaryStats? `[${slave.weight}]`: ''}.`; } else { r += `<span class="red">Overweight${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`; } } else if (slave.weight <= 130) { - if (slave.hips >= 2 || V.arcologies[0].FSHedonisticDecadence != "unset") { + if (slave.hips >= 2 || V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `Pleasantly soft and shapely${V.summaryStats? `[${slave.weight}]`: ''}.`; } else { r += `<span class="red">Fat${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`; } } else if (slave.weight <= 160) { - if (V.arcologies[0].FSHedonisticDecadence != "unset") { + if (V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `Amazingly voluptuous${V.summaryStats? `[${slave.weight}]`: ''}.`; } else { r += `<span class="red">Obese${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`; } } else if (slave.weight <= 190) { - if (V.arcologies[0].FSHedonisticDecadence != "unset") { + if (V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `SSBBW${V.summaryStats? `[${slave.weight}]`: ''}.`; } else { r += `<span class="red">Super Obese${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`; } } else { - if (V.arcologies[0].FSHedonisticDecadence != "unset") { + if (V.arcologies[0].FSHedonisticDecadence !== "unset") { r += `Perfectly massive${V.summaryStats? `[${slave.weight}]`: ''}.`; } else { r += `<span class="red">Dangerously Obese${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`; @@ -300,7 +311,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } - if (V.abbreviateDiet == 1) { + if (V.abbreviateDiet === 1) { r += `<span class="teal">`; switch (slave.diet) { case "restricted": @@ -336,19 +347,19 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += `</span>`; r += `<span class="cyan">`; - if (slave.dietCum == 2) { + if (slave.dietCum === 2) { r += `<strong>Cum++</strong>`; - } else if (((slave.dietCum == 1) && (slave.dietMilk == 0))) { + } else if (((slave.dietCum === 1) && (slave.dietMilk === 0))) { r += `<strong>Cum+</strong>`; - } else if (((slave.dietCum == 1) && (slave.dietMilk == 1))) { + } else if (((slave.dietCum === 1) && (slave.dietMilk === 1))) { r += `<strong>Cum+ Milk+</strong>`; - } else if (((slave.dietCum == 0) && (slave.dietMilk == 1))) { + } else if (((slave.dietCum === 0) && (slave.dietMilk === 1))) { r += `<strong>Milk+</strong>`; - } else if ((slave.dietMilk == 2)) { + } else if ((slave.dietMilk === 2)) { r += `<strong>Milk++</strong>`; } r += `</span>`; - } else if (V.abbreviateDiet == 2) { + } else if (V.abbreviateDiet === 2) { r += `<span class="teal">`; switch (slave.diet) { case "restricted": @@ -383,20 +394,20 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } r += `</span>`; - if (slave.dietCum == 2) { + if (slave.dietCum === 2) { r += `Diet Base: <span class="cyan">Cum Based.</span>`; - } else if (((slave.dietCum == 1) && (slave.dietMilk == 0))) { + } else if (((slave.dietCum === 1) && (slave.dietMilk === 0))) { r += `Diet Base: <span class="cyan">Cum Added.</span>`; - } else if (((slave.dietCum == 1) && (slave.dietMilk == 1))) { + } else if (((slave.dietCum === 1) && (slave.dietMilk === 1))) { r += `Diet Base: <span class="cyan">Milk & Cum Added.</span>`; - } else if (((slave.dietCum == 0) && (slave.dietMilk == 1))) { + } else if (((slave.dietCum === 0) && (slave.dietMilk === 1))) { r += `Diet Base: <span class="cyan">Milk Added.</span>`; - } else if ((slave.dietMilk == 2)) { + } else if ((slave.dietMilk === 2)) { r += `Diet Base: <span class="cyan">Milk Based.</span>`; } } - if (V.abbreviateHealth == 1) { + if (V.abbreviateHealth === 1) { if (slave.health < -20) { r += `<strong><span class="red">H${V.summaryStats? `[${slave.health}]` : ''}</span></strong>`; } else if (slave.health <= 20) { @@ -404,7 +415,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.health > 20) { r += `<strong><span class="green">H${V.summaryStats? `[${slave.health}]` : ''}</span></strong>`; } - } else if (V.abbreviateHealth == 2) { + } else if (V.abbreviateHealth === 2) { if (slave.health < -90) { r += `<span class="red">On the edge of death${V.summaryStats? `[${slave.health}]` : ''}.</span>`; } else if (slave.health < -50) { @@ -422,7 +433,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } - if (V.abbreviateDrugs == 1) { + if (V.abbreviateDrugs === 1) { r += `<span class="tan">`; switch (slave.drugs) { case "breast injections": @@ -527,24 +538,24 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += `</span>`; r += `<span class="lightgreen">`; - if (slave.curatives == 2) { + if (slave.curatives === 2) { r += `<strong>Cura</strong>`; - } else if (slave.curatives == 1) { + } else if (slave.curatives === 1) { r += `<strong>Prev</strong>`; } r += `</span>`; - if (slave.aphrodisiacs != 0) { + if (slave.aphrodisiacs !== 0) { r += `<span class="lightblue">`; - if (slave.aphrodisiacs == 1) { + if (slave.aphrodisiacs === 1) { r += `<strong>Aph</strong>`; - } else if (slave.aphrodisiacs == 2) { + } else if (slave.aphrodisiacs === 2) { r += `<strong>Aph++</strong>`; } else { r += `<strong>Anaph</strong>`; } r += `</span>`; } - if (slave.addict != 0) { + if (slave.addict !== 0) { r += `<span class="cyan">Add</span>`; } r += `<span class="lightsalmon">`; @@ -561,54 +572,54 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="mediumseagreen">`; if ((slave.bellyImplant > -1)) { r += `<strong>Belly Imp</strong>`; - } else if (((slave.preg <= -2) || (slave.ovaries == 0)) && (slave.vagina != -1)) { + } else if (((slave.preg <= -2) || (slave.ovaries === 0)) && (slave.vagina !== -1)) { r += `<strong>Barr</strong>`; - } else if (slave.pubertyXX == 0 && (slave.ovaries == 1 || slave.mpreg == 1)) { + } else if (slave.pubertyXX === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) { r += `<strong>Prepub</strong>`; - } else if (slave.ovaryAge >= 47 && (slave.ovaries == 1 || slave.mpreg == 1)) { + } else if (slave.ovaryAge >= 47 && (slave.ovaries === 1 || slave.mpreg === 1)) { r += `<strong>Meno</strong>`; } else if (slave.pregWeek < 0) { r += `<strong>Postpartum</strong>`; - } else if (slave.preg == -1) { + } else if (slave.preg === -1) { r += `<strong>CC</strong>`; - } else if (slave.preg == 0 && (slave.ovaries == 1 || slave.mpreg == 1)) { + } else if (slave.preg === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) { r += `<strong>Fert+</strong>`; - } else if (((slave.preg < 4) && (slave.preg > 0) && slave.pregKnown == 0) || slave.pregWeek == 1) { + } else if (((slave.preg < 4) && (slave.preg > 0) && slave.pregKnown === 0) || slave.pregWeek === 1) { r += `<strong>Preg?</strong>`; } else if ((slave.preg >= 36) && (slave.broodmother > 0)) { r += `<strong>Perm preg</strong>`; - } else if (slave.pregKnown == 1) { + } else if (slave.pregKnown === 1) { r += `<strong>${slave.pregWeek} wks preg</strong>`; } r += `</span>`; - if (slave.induce == 1) { + if (slave.induce === 1) { r += `<span class="orange"><strong>Early Labor</strong></span>`; } - if (slave.pubertyXY == 0 && slave.balls > 0) { + if (slave.pubertyXY === 0 && slave.balls > 0) { r += `<strong>Prepub balls</strong>`; } - if (slave.balls > 0 && slave.vasectomy == 1) { + if (slave.balls > 0 && slave.vasectomy === 1) { r += `<strong>Vasect</strong>`; } r += `<span class="springgreen">`; - if (slave.inflation == 3) { + if (slave.inflation === 3) { r += `<strong>8 ltr ${slave.inflationType}</strong>`; - } else if (slave.inflation == 2) { + } else if (slave.inflation === 2) { r += `<strong>4 ltr ${slave.inflationType}</strong>`; - } else if (slave.inflation == 1) { + } else if (slave.inflation === 1) { r += `<strong>2 ltr ${slave.inflationType}</strong>`; } else if (slave.bellyFluid > 0) { r += `<strong>${slave.bellyFluid}ccs ${slave.inflationType}</strong>`; } r += `</span>`; - } else if (V.abbreviateDrugs == 2) { - if ((slave.drugs != "no drugs") && (slave.drugs != "none")) { - r += `<span class="tan">${On slave.drugs}.</span>`; + } else if (V.abbreviateDrugs === 2) { + if ((slave.drugs !== "no drugs") && (slave.drugs !== "none")) { + r += `<span class="tan">On ${slave.drugs}.</span>`; } r += `<span class="lightgreen">`; - if (slave.curatives == 2) { + if (slave.curatives === 2) { r += `On curatives.`; - } else if (slave.curatives == 1) { + } else if (slave.curatives === 1) { r += `On preventatives.`; } r += `</span>`; @@ -619,7 +630,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `On anaphrodisiacs.`; } r += `</span>`; - if (slave.addict != 0) { + if (slave.addict !== 0) { r += `<span class="cyan">Addict.</span>`; } r += `<span class="lightsalmon">`; @@ -636,23 +647,23 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="mediumseagreen">`; if ((slave.bellyImplant > -1)) { r += `Belly Implant.`; - } else if (((slave.preg <= -2) || (slave.ovaries == 0)) && (slave.vagina != -1)) { + } else if (((slave.preg <= -2) || (slave.ovaries === 0)) && (slave.vagina !== -1)) { r += `Barren.`; - } else if (slave.pubertyXX == 0 && (slave.ovaries == 1 || slave.mpreg == 1)) { + } else if (slave.pubertyXX === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) { r += `Not ovulating yet.`; - } else if (slave.ovaryAge >= 47 && (slave.ovaries == 1 || slave.mpreg == 1)) { + } else if (slave.ovaryAge >= 47 && (slave.ovaries === 1 || slave.mpreg === 1)) { r += `Menopausal.`; } else if (slave.pregWeek < 0) { r += `Postpartum.`; - } else if (slave.preg == -1) { + } else if (slave.preg === -1) { r += `On contraceptives.`; - } else if (slave.preg == 0 && (slave.ovaries == 1 || slave.mpreg == 1)) { + } else if (slave.preg === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) { r += `Fertile.`; - } else if (((slave.preg < 4) && (slave.preg > 0) && slave.pregKnown == 0) || slave.pregWeek == 1) { + } else if (((slave.preg < 4) && (slave.preg > 0) && slave.pregKnown === 0) || slave.pregWeek === 1) { r += `May be pregnant.`; } else if ((slave.preg >= 36) && (slave.broodmother > 0)) { r += `Permanently pregnant.`; - } else if (slave.pregKnown == 1) { + } else if (slave.pregKnown === 1) { if (slave.pregType < 2 || slave.broodmother > 0) { r += `${slave.pregWeek} weeks pregnant.`; } else { @@ -663,19 +674,19 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `a brood of offspring.`; } else if (slave.pregType >= 10) { r += `slave.pregType babies.`; - } else if (slave.pregType == 9) { + } else if (slave.pregType === 9) { r += `nonuplets.`; - } else if (slave.pregType == 8) { + } else if (slave.pregType === 8) { r += `octuplets.`; - } else if (slave.pregType == 7) { + } else if (slave.pregType === 7) { r += `septuplets.`; - } else if (slave.pregType == 6) { + } else if (slave.pregType === 6) { r += `sextuplets.`; - } else if (slave.pregType == 5) { + } else if (slave.pregType === 5) { r += `quintuplets.`; - } else if (slave.pregType == 4) { + } else if (slave.pregType === 4) { r += `quadruplets.`; - } else if (slave.pregType == 3) { + } else if (slave.pregType === 3) { r += `triplets.`; } else { r += `twins.`; @@ -683,21 +694,21 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } r += `</span>`; - if (slave.induce == 1) { + if (slave.induce === 1) { r += `<span class="orange">Showing signs of early labor.</span>`; } - if (slave.pubertyXY == 0 && slave.balls > 0) { + if (slave.pubertyXY === 0 && slave.balls > 0) { r += `Has not had first ejaculation.`; } - if (slave.balls > 0 && slave.vasectomy == 1) { + if (slave.balls > 0 && slave.vasectomy === 1) { r += `Vasectomy.`; } r += `<span class="springgreen">`; - if (slave.inflation == 3) { + if (slave.inflation === 3) { r += `Filled with 8 liters of ${slave.inflationType}.`; - } else if (slave.inflation == 2) { + } else if (slave.inflation === 2) { r += `Filled with 4 liters of ${slave.inflationType}.`; - } else if (slave.inflation == 1) { + } else if (slave.inflation === 1) { r += `Filled with 2 liters of ${slave.inflationType}.`; } else if (slave.bellyFluid > 0) { r += `Stuffed with ${slave.bellyFluid}ccs of ${slave.inflationType}.`; @@ -705,9 +716,9 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; } - if (V.abbreviateNationality + V.abbreviateGenitalia + V.abbreviatePhysicals + V.abbreviateSkills + V.abbreviateMental != 0) { + if (V.abbreviateNationality + V.abbreviateGenitalia + V.abbreviatePhysicals + V.abbreviateSkills + V.abbreviateMental !== 0) { r += `<br>`; - if (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) { + if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) { r += ` `; } } @@ -716,11 +727,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { V.seed = V.desc.substring(0, 1); V.seed = V.seed.toUpperCase(); V.desc = V.seed + V.desc.substring(1); - r += `<strong><span class="coral">${V.desc}${V.abbreviatePhysicals == 2? '.' : ''}</span></strong>`; + r += `<strong><span class="coral">${V.desc}${V.abbreviatePhysicals === 2? '.' : ''}</span></strong>`; - if (V.seeRace == 1) { + if (V.seeRace === 1) { r += `<span class="tan">`; - if (V.abbreviateRace == 1) { + if (V.abbreviateRace === 1) { switch (slave.race) { case "white": r += `C`; @@ -762,7 +773,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `${slave.race.charAt(0).toUpperCase() + slave.race.charAt(1) + slave.race.charAt(2)}`; break; } - } else if (V.abbreviateRace == 2) { + } else if (V.abbreviateRace === 2) { switch (slave.race) { case "white": r += `Caucasian.`; @@ -808,7 +819,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; } - if (V.abbreviateNationality == 1) { + if (V.abbreviateNationality === 1) { r += `<span class="tan">`; switch (slave.nationality) { case "Afghan": @@ -1442,7 +1453,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `Zam`; break; case "Zimbabwean": - if (slave.race == "white") { + if (slave.race === "white") { r += `Rho`; } else { r += `Zwe`; @@ -1477,11 +1488,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } r += `</span>`; - } else if (V.abbreviateNationality == 2) { + } else if (V.abbreviateNationality === 2) { r += `<span class="tan">`; switch (slave.nationality) { case "Zimbabwean": - if (slave.race == "white") { + if (slave.race === "white") { r += `Rhodesian.`; } else { r += `${slave.nationality}.`; @@ -1494,13 +1505,13 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `Stateless.`; break; default: - r += slave.nationality. + r += `${slave.nationality}.`; break; } r += `</span>`; } - if (V.abbreviatePhysicals == 1) { + if (V.abbreviatePhysicals === 1) { r += `<span class="pink">`; switch (slave.skin) { case "light brown": @@ -1533,14 +1544,14 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `${slave.skin.charAt(0).toUpperCase() + slave.skin.charAt(1) + slave.skin.charAt(2)}`; break; } - } else { - r += `${slave.skin.charAt(0).toUpperCase() + slave.skin.slice(1)} skin.`; r += `</span>`; + } else { + r += `<span class="pink">${slave.skin.charAt(0).toUpperCase() + slave.skin.slice(1)} skin.</span>`; } - if (V.abbreviateGenitalia == 1) { + if (V.abbreviateGenitalia === 1) { if (slave.dick > 0) { r += `<span class="pink">`; - if (slave.balls == 0) { + if (slave.balls === 0) { r += `Geld`; } if ((slave.dick > 8) && (slave.balls > 8)) { @@ -1570,12 +1581,12 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += `</span>`; } - if (slave.vagina == 0) { + if (slave.vagina === 0) { r += `<span class="lime">VV</span>`; - } else if ((slave.pregKnown == 1) && canWalk(slave) && (slave.clothes == "no clothing" || slave.clothes == "body oil") && (slave.shoes == "none")) { + } else if ((slave.pregKnown === 1) && canWalk(slave) && (slave.clothes === "no clothing" || slave.clothes === "body oil") && (slave.shoes === "none")) { r += `<span class="pink">NBP</span>`; } - if (slave.anus == 0) { + if (slave.anus === 0) { r += ` <span class="lime">AV</span>`; } r += `<span class="pink">`; @@ -1593,10 +1604,10 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `A+`; } r += `</span>`; - } else if (V.abbreviateGenitalia == 2) { + } else if (V.abbreviateGenitalia === 2) { if (slave.dick > 0) { r += `<span class="pink">`; - if (slave.balls == 0) { + if (slave.balls === 0) { r += `Gelded.`; } if ((slave.dick > 8) && (slave.balls > 8)) { @@ -1626,12 +1637,12 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += `</span>`; } - if (slave.vagina == 0) { + if (slave.vagina === 0) { r += `<span class="lime">Virgin.</span>`; - } else if ((slave.pregKnown == 1) && canWalk(slave) && (slave.clothes == "no clothing" || slave.clothes == "body oil") && (slave.shoes == "none")) { + } else if ((slave.pregKnown === 1) && canWalk(slave) && (slave.clothes === "no clothing" || slave.clothes === "body oil") && (slave.shoes === "none")) { r += `<span class="pink">Naked, barefoot, and pregnant.</span>`; } - if (slave.anus == 0) { + if (slave.anus === 0) { r += `<span class="lime">Anal virgin.</span>`; } r += `<span class="pink">`; @@ -1651,9 +1662,9 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; } - if (V.abbreviatePhysicals == 1) { + if (V.abbreviatePhysicals === 1) { r += `<span class="pink">`; - if (V.showAgeDetail == 1) { + if (V.showAgeDetail === 1) { r += slave.actualAge; } else if (slave.actualAge >= 40) { r += `40s`; @@ -1668,10 +1679,10 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.actualAge >= 18) { r += slave.actualAge; } - if (slave.actualAge != slave.physicalAge) { + if (slave.actualAge !== slave.physicalAge) { r += `${slave.physicalAge}y-bdy`; } - if (slave.visualAge != slave.physicalAge) { + if (slave.visualAge !== slave.physicalAge) { r += `Lks${slave.visualAge}`; } if (slave.face < -95) { @@ -1689,13 +1700,13 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `<span class="pink">Face+++${V.summaryStats? `[${slave.face}]` : ''}</span>`; } - if (slave.eyes == -2) { + if (slave.eyes === -2) { r += `<span class="red">Blind</span>`; - } else if (((slave.eyes == -1) && (slave.eyewear != "corrective glasses") && (slave.eyewear != "corrective contacts"))) { + } else if (((slave.eyes === -1) && (slave.eyewear !== "corrective glasses") && (slave.eyewear !== "corrective contacts"))) { r += `<span class="yellow">Sight-</span>`; } - if (slave.markings != "none") { + if (slave.markings !== "none") { r += `Markings`; } @@ -1712,15 +1723,15 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `<span class="red">Lips-</span>${V.summaryStats? `[${slave.lips}]` : ''}`; } - if (slave.teeth == "crooked") { + if (slave.teeth === "crooked") { r += `<span class="yellow">Cr Teeth</span>`; - } else if (slave.teeth == "cosmetic braces") { + } else if (slave.teeth === "cosmetic braces") { r += `Cos Braces`; - } else if (slave.teeth == "straightening braces") { + } else if (slave.teeth === "straightening braces") { r += `Braces`; - } else if (slave.teeth == "removable") { + } else if (slave.teeth === "removable") { r += `Rem Teeth`; - } else if (slave.teeth == "pointy") { + } else if (slave.teeth === "pointy") { r += `Fangs`; } if (slave.muscles > 95) { @@ -1732,13 +1743,13 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.muscles > -6) { r += `Soft${V.summaryStats? `[${slave.muscles}]`: ''}`; } else if (slave.muscles > -31) { - if (V.arcologies[0].FSPhysicalIdealist == "unset") { + if (V.arcologies[0].FSPhysicalIdealist === "unset") { r += `<span class="red">Weak</span>${V.summaryStats? `[${slave.muscles}]`: ''}`; } else { r += `Soft${V.summaryStats? `[${slave.muscles}]`: ''}`; } } else if (slave.muscles > -96) { - if (V.arcologies[0].FSPhysicalIdealist == "unset") { + if (V.arcologies[0].FSPhysicalIdealist === "unset") { r += `<span class="red">Weak+</span>${V.summaryStats? `[${slave.muscles}]`: ''}`; } else { r += `Soft+${V.summaryStats? `[${slave.muscles}]`: ''}`; @@ -1746,16 +1757,16 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `<span class="red">Weak++</span>${V.summaryStats? `[${slave.muscles}]`: ''}`; } - if (slave.amp != 0) { - if (slave.amp == -1) { + if (slave.amp !== 0) { + if (slave.amp === -1) { r += `P-Limbs`; - } else if (slave.amp == -2) { + } else if (slave.amp === -2) { r += `Sex P-Limbs`; - } else if (slave.amp == -3) { + } else if (slave.amp === -3) { r += `Beauty P-Limbs`; - } else if (slave.amp == -4) { + } else if (slave.amp === -4) { r += `Combat P-Limbs`; - } else if (slave.amp == -5) { + } else if (slave.amp === -5) { r += `Cyber P-Limbs`; } else { r += `Amp`; @@ -1764,20 +1775,20 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { if (!canWalk(slave)) { r += `Immob`; } - if (slave.heels == 1) { + if (slave.heels === 1) { r += `Heel`; } r += `</span>`; - if (slave.voice == 0) { + if (slave.voice === 0) { r += `<span class="pink">Mute</span>`; } else { - if (slave.accent == 3) { + if (slave.accent === 3) { r += `<span class="red">Acc--</span>`; - } else if (slave.accent == 2) { + } else if (slave.accent === 2) { r += `Acc-`; - } else if (slave.accent == 4) { + } else if (slave.accent === 4) { r += `Acc--`; - } else if (slave.accent == 1) { + } else if (slave.accent === 1) { r += `<span class="pink">Acc</span>`; } } @@ -1812,11 +1823,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; r += `<span class="red">`; if (slave.hips < -1) { - if (slave.butt > 2 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if (slave.butt > 2 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disp+`; } } else if (slave.hips < 0) { - if (slave.butt > 4 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if (slave.butt > 4 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disp+`; } } else if (slave.hips > 2) { @@ -1824,23 +1835,23 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `Disp-`; } } else if (slave.hips > 1) { - if (slave.butt <= 3 && (V.arcologies[0].FSSlimnessEnthusiast == "unset" || (slave.boobs >= 500))) { + if (slave.butt <= 3 && (V.arcologies[0].FSSlimnessEnthusiast === "unset" || (slave.boobs >= 500))) { r += `Disp-`; } } else if (slave.hips > 0) { if (slave.butt > 8) { - if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disp+`; } - } else if (slave.butt <= 2 && (V.arcologies[0].FSSlimnessEnthusiast == "unset" || (slave.boobs >= 500))) { + } else if (slave.butt <= 2 && (V.arcologies[0].FSSlimnessEnthusiast === "unset" || (slave.boobs >= 500))) { r += `Disp-`; } } else { if (slave.butt > 6) { - if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disp+`; } - } else if (slave.butt <= 1 && (V.arcologies[0].FSSlimnessEnthusiast == "unset" || (slave.boobs >= 500))) { + } else if (slave.butt <= 1 && (V.arcologies[0].FSSlimnessEnthusiast === "unset" || (slave.boobs >= 500))) { r += `Disp-`; } } @@ -1861,18 +1872,18 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="pink">Wst+++${V.summaryStats? `[${slave.waist}]`: ''}</span>`; } r += `<span class="pink">`; - if ((slave.boobsImplant == 0) && (slave.buttImplant == 0) && (slave.waist >= -95) && (slave.lipsImplant == 0) && (slave.faceImplant <= 5) && (slave.bellyImplant == -1)) { + if ((slave.boobsImplant === 0) && (slave.buttImplant === 0) && (slave.waist >= -95) && (slave.lipsImplant === 0) && (slave.faceImplant <= 5) && (slave.bellyImplant === -1)) { r += `Natr`; } else { r += `Impl`; } - if (slave.lactation == 1) { + if (slave.lactation === 1) { r += `Lact`; - } else if (slave.lactation == 2) { + } else if (slave.lactation === 2) { r += `Lact++`; } modScore(slave); - if (slave.corsetPiercing == 0 && V.piercingScore < 3 && V.tatScore < 2) { + if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) { true; } else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { r += `Mods++`; @@ -1881,13 +1892,13 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `Mods`; } - if (slave.brand != 0) { + if (slave.brand !== 0) { r += `Br`; } r += `</span>`; - } else if (V.abbreviatePhysicals == 2) { + } else if (V.abbreviatePhysicals === 2) { r += `<span class="pink">`; - if (V.showAgeDetail == 1) { + if (V.showAgeDetail === 1) { r += `Age ${slave.actualAge}.`; } else if (slave.actualAge >= 40) { r += `Forties.`; @@ -1910,11 +1921,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { ** No NCS, then do the standard, However because of the wrinkes of Incubators, as long as visual age is greater ** than or equal to physical age, we do the old physical body/Looks for fresh out of the can NCS slaves. */ - if (((slave.inducedNCS == 0) || (slave.visualAge >= slave.physicalAge))) { - if (slave.actualAge != slave.physicalAge) { + if (((slave.inducedNCS === 0) || (slave.visualAge >= slave.physicalAge))) { + if (slave.actualAge !== slave.physicalAge) { r += `${slave.physicalAge} year old body.`; } - if (slave.visualAge != slave.physicalAge) { + if (slave.visualAge !== slave.physicalAge) { r += `Looks ${slave.visualAge}.`; } } else { @@ -1929,7 +1940,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { */ r += `Appears to have a ${slave.visualAge} year old body.`; } - if (slave.inducedNCS == 1) { + if (slave.inducedNCS === 1) { r += `(<span class="orange">NCS</span>)`; } if (slave.face < -95) { @@ -1950,7 +1961,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `${slave.faceShape} face.`; if (slave.eyes <= -2) { r += `<span class="red">Blind.</span>`; - } else if (((slave.eyes <= -1) && (slave.eyewear != "corrective glasses") && (slave.eyewear != "corrective contacts"))) { + } else if (((slave.eyes <= -1) && (slave.eyewear !== "corrective glasses") && (slave.eyewear !== "corrective contacts"))) { r += `<span class="yellow">Nearsighted.</span>`; } if (slave.lips > 95) { @@ -1966,15 +1977,15 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `<span class="red">Thin lips${V.summaryStats? `[${slave.lips}]`: ''}.</span>`; } - if (slave.teeth == "crooked") { + if (slave.teeth === "crooked") { r += `<span class="yellow">Crooked teeth.</span>`; - } else if (slave.teeth == "cosmetic braces") { + } else if (slave.teeth === "cosmetic braces") { r += `Cosmetic braces.`; - } else if (slave.teeth == "straightening braces") { + } else if (slave.teeth === "straightening braces") { r += `Braces.`; - } else if (slave.teeth == "removable") { + } else if (slave.teeth === "removable") { r += `Removable teeth.`; - } else if (slave.teeth == "pointy") { + } else if (slave.teeth === "pointy") { r += `Sharp fangs.`; } if (slave.muscles > 95) { @@ -1986,13 +1997,13 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.muscles > -6) { r += `Soft${V.summaryStats? `[${slave.muscles}]`: ''}.`; } else if (slave.muscles > -31) { - if (V.arcologies[0].FSPhysicalIdealist == "unset") { + if (V.arcologies[0].FSPhysicalIdealist === "unset") { r += `<span class="red">Weak${V.summaryStats? `[${slave.muscles}]`: ''}.</span>`; } else { r += `Weak${V.summaryStats? `[${slave.muscles}]`: ''}.`; } } else if (slave.muscles > -96) { - if (V.arcologies[0].FSPhysicalIdealist == "unset") { + if (V.arcologies[0].FSPhysicalIdealist === "unset") { r += `<span class="red">Very weak${V.summaryStats? `[${slave.muscles}]`: ''}.</span>`; } else { r += `Very weak${V.summaryStats? `[${slave.muscles}]`: ''}.`; @@ -2000,16 +2011,16 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `<span class="red">Frail${V.summaryStats? `[${slave.muscles}]`: ''}.</span>`; } - if (slave.amp != 0) { - if (slave.amp == -1) { + if (slave.amp !== 0) { + if (slave.amp === -1) { r += `Prosthetic limbs.`; - } else if (slave.amp == -2) { + } else if (slave.amp === -2) { r += `Sexy prosthetic limbs.`; - } else if (slave.amp == -3) { + } else if (slave.amp === -3) { r += `Beautiful prosthetic limbs.`; - } else if (slave.amp == -4) { + } else if (slave.amp === -4) { r += `Deadly prosthetic limbs.`; - } else if (slave.amp == -5) { + } else if (slave.amp === -5) { r += `Cyber prosthetic limbs.`; } else { r += `Amputee.`; @@ -2018,20 +2029,20 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { if (!canWalk(slave)) { r += `Immobile.`; } - if (slave.heels == 1) { + if (slave.heels === 1) { r += `Heeled.`; } r += `</span>`; - if (slave.voice == 0) { + if (slave.voice === 0) { r += `<span class="pink">Mute.</span>`; } else { - if (slave.accent == 3) { + if (slave.accent === 3) { r += `<span class="red">Bad accent.</span>`; - } else if (slave.accent == 4) { + } else if (slave.accent === 4) { r += `<span class="red">No language skills.</span>`; - } else if (slave.accent == 2) { + } else if (slave.accent === 2) { r += `Accent.`; - } else if (slave.accent == 1) { + } else if (slave.accent === 1) { r += `<span class="pink">Cute accent.</span>`; } } @@ -2066,11 +2077,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; r += `<span class="red">`; if (slave.hips < -1) { - if (slave.butt > 2 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if (slave.butt > 2 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disproportionately big butt.`; } } else if (slave.hips < 0) { - if (slave.butt > 4 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if (slave.butt > 4 && (V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disproportionately big butt.`; } } else if (slave.hips > 2) { @@ -2078,23 +2089,23 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `Disproportionately small butt.`; } } else if (slave.hips > 1) { - if (slave.butt <= 3 && ((V.arcologies[0].FSSlimnessEnthusiast == "unset") || (slave.boobs >= 500))) { + if (slave.butt <= 3 && ((V.arcologies[0].FSSlimnessEnthusiast === "unset") || (slave.boobs >= 500))) { r += `Disproportionately small butt.`; } } else if (slave.hips > 0) { if (slave.butt > 8) { - if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disproportionately big butt.`; } - } else if (slave.butt <= 2 && ((V.arcologies[0].FSSlimnessEnthusiast == "unset") || (slave.boobs >= 500))) { + } else if (slave.butt <= 2 && ((V.arcologies[0].FSSlimnessEnthusiast === "unset") || (slave.boobs >= 500))) { r += `Disproportionately small butt.`; } } else { if (slave.butt > 6) { - if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist == "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence == "unset")) { + if ((V.arcologies[0].FSTransformationFetishist < 20 || V.arcologies[0].FSTransformationFetishist === "unset") && (V.arcologies[0].FSHedonisticDecadence < 20 || V.arcologies[0].FSHedonisticDecadence === "unset")) { r += `Disproportionately big butt.`; } - } else if (slave.butt <= 1 && ((V.arcologies[0].FSSlimnessEnthusiast == "unset") || (slave.boobs >= 500))) { + } else if (slave.butt <= 1 && ((V.arcologies[0].FSSlimnessEnthusiast === "unset") || (slave.boobs >= 500))) { r += `Disproportionately small butt.`; } } @@ -2115,20 +2126,20 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="pink">Absurdly narrow waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`; } r += `<span class="pink">`; - if ((slave.boobsImplant != 0) || (slave.buttImplant != 0) || (slave.lipsImplant != 0) || (slave.bellyImplant != -1)) { + if ((slave.boobsImplant !== 0) || (slave.buttImplant !== 0) || (slave.lipsImplant !== 0) || (slave.bellyImplant !== -1)) { r += `Implants.`; } else if ((slave.faceImplant >= 30) || (slave.waist < -95)) { r += `Surgery enhanced.`; } else { r += `All natural.`; } - if (slave.lactation == 1) { + if (slave.lactation === 1) { r += `Lactating naturally.`; - } else if (slave.lactation == 2) { + } else if (slave.lactation === 2) { r += `Heavy lactation.`; } modScore(slave); - if (slave.corsetPiercing == 0 && V.piercingScore < 3 && V.tatScore < 2) { + if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) { true; } else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) { r += `Extensive body mods.`; @@ -2137,21 +2148,21 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else { r += `Light body mods.`; } - if (slave.brand != 0) { + if (slave.brand !== 0) { r += `Branded.`; } r += `</span>`; } r += `<br>`; - if (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) { + if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) { r += ` `; } - if (V.abbreviateSkills == 1) { - if (slave.fetish == "mindbroken") { + if (V.abbreviateSkills === 1) { + if (slave.fetish === "mindbroken") { true; - } else if (slave.intelligenceImplant == 1) { + } else if (slave.intelligenceImplant === 1) { switch (slave.intelligence) { case 3: r += `<span class="deepskyblue">I+++(e)</span>`; @@ -2201,7 +2212,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } - _SSkills = slave.analSkill + slave.oralSkill; + let _SSkills = slave.analSkill + slave.oralSkill; r += `<span class="aquamarine">`; if (((_SSkills + slave.whoreSkill + slave.entertainSkill) >= 400) && ((slave.vagina < 0) || (slave.vaginalSkill >= 100))) { r += `MSS`; @@ -2259,17 +2270,17 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="green">`; if (slave.prestige > 2) { r += `Prest++`; - } else if (slave.prestige == 2) { + } else if (slave.prestige === 2) { r += `Prest+`; - } else if (slave.prestige == 1) { + } else if (slave.prestige === 1) { r += `Prest`; } r += `</span>`; } - } else if (V.abbreviateSkills == 2) { - if (slave.fetish == "mindbroken") { + } else if (V.abbreviateSkills === 2) { + if (slave.fetish === "mindbroken") { true; - } else if (slave.intelligenceImplant == 1) { + } else if (slave.intelligenceImplant === 1) { switch (slave.intelligence) { case 3: r += `<span class="deepskyblue">Brilliant, educated.</span>`; @@ -2318,7 +2329,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } } - _SSkills = (slave.analSkill + slave.oralSkill); + let _SSkills = (slave.analSkill + slave.oralSkill); r += `<span class="aquamarine">`; if (((_SSkills + slave.whoreSkill + slave.entertainSkill) >= 400) && ((slave.vagina < 0) || (slave.vaginalSkill >= 100))) { r += `Masterful Sex Slave.`; @@ -2362,18 +2373,18 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="green">`; if (slave.prestige > 2) { r += `Extremely prestigious.`; - } else if (slave.prestige == 2) { + } else if (slave.prestige === 2) { r += `Very prestigious.`; - } else if (slave.prestige == 1) { + } else if (slave.prestige === 1) { r += `Prestigious.`; } r += `</span>`; } } - if (V.abbreviateMental == 1) { - if (slave.fetish != "mindbroken") { - if (slave.fetishKnown == 1) { + if (V.abbreviateMental === 1) { + if (slave.fetish !== "mindbroken") { + if (slave.fetishKnown === 1) { r += `<span class="lightcoral">`; switch (slave.fetish) { case "submissive": @@ -2466,7 +2477,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += `</span>`; } - if (slave.attrKnown == 1) { + if (slave.attrKnown === 1) { if (slave.attrXY <= 5) { r += `<span class="red">XY---${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`; } else if (slave.attrXY <= 15) { @@ -2520,33 +2531,33 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } } - if (slave.clitPiercing == 3) { - if (slave.fetishKnown == 1) { - if (slave.clitSetting == "off") { + if (slave.clitPiercing === 3) { + if (slave.fetishKnown === 1) { + if (slave.clitSetting === "off") { r += `SP-`; - } else if (((slave.fetish != "submissive") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "submissive")) { + } else if (((slave.fetish !== "submissive") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "submissive")) { r += `SP:sub`; - } else if (((slave.fetish != "cumslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "oral")) { + } else if (((slave.fetish !== "cumslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "oral")) { r += `SP:oral`; - } else if (((slave.fetish != "humiliation") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "humiliation")) { + } else if (((slave.fetish !== "humiliation") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "humiliation")) { r += `SP:humil`; - } else if (((slave.fetish != "buttslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "anal")) { + } else if (((slave.fetish !== "buttslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "anal")) { r += `SP:anal`; - } else if (((slave.fetish != "boobs") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "boobs")) { + } else if (((slave.fetish !== "boobs") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "boobs")) { r += `SP:boobs`; - } else if (((slave.fetish != "sadist") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "sadist")) { + } else if (((slave.fetish !== "sadist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "sadist")) { r += `SP:sade`; - } else if (((slave.fetish != "masochist") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "masochist")) { + } else if (((slave.fetish !== "masochist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "masochist")) { r += `SP:pain`; - } else if (((slave.fetish != "dom") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "dom")) { + } else if (((slave.fetish !== "dom") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "dom")) { r += `SP:dom`; - } else if (((slave.fetish != "pregnancy") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "pregnancy")) { + } else if (((slave.fetish !== "pregnancy") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "pregnancy")) { r += `SP:preg`; - } else if (((slave.fetish != "none") && (slave.clitSetting == "vanilla"))) { + } else if (((slave.fetish !== "none") && (slave.clitSetting === "vanilla"))) { r += `SP:vanilla`; - } else if ((slave.energy <= 95) && (slave.clitSetting == "all")) { + } else if ((slave.energy <= 95) && (slave.clitSetting === "all")) { r += `SP:all`; - } else if ((slave.energy > 5) && (slave.clitSetting == "none")) { + } else if ((slave.energy > 5) && (slave.clitSetting === "none")) { r += `SP:none`; } else if (!["women", "men", "anti-women", "anti-men"].includes(slave.clitSetting)) { r += `SP:monitoring`; @@ -2597,26 +2608,26 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } } - if (slave.attrKnown == 1) { - if (slave.clitSetting == "women") { + if (slave.attrKnown === 1) { + if (slave.clitSetting === "women") { if (slave.attrXX < 95) { r += `SP:women`; } else { r += `SP:monitoring`; } - } else if (slave.clitSetting == "men") { + } else if (slave.clitSetting === "men") { if (slave.attrXY < 95) { r += `SP:men`; } else { r += `SP:monitoring`; } - } else if (slave.clitSetting == "anti-women") { + } else if (slave.clitSetting === "anti-women") { if (slave.attrXX > 0) { r += `SP:anti-women`; } else { r += `SP:monitoring`; } - } else if (slave.clitSetting == "anti-men") { + } else if (slave.clitSetting === "anti-men") { if (slave.attrXY > 0) { r += `SP:anti-men`; } else { @@ -2624,13 +2635,13 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } } else { - if (slave.clitSetting == "women") { + if (slave.clitSetting === "women") { r += `SP:women`; - } else if (slave.clitSetting == "men") { + } else if (slave.clitSetting === "men") { r += `SP:men`; - } else if (slave.clitSetting == "anti-women") { + } else if (slave.clitSetting === "anti-women") { r += `SP:anti-women`; - } else if (slave.clitSetting == "anti-men") { + } else if (slave.clitSetting === "anti-men") { r += `SP:anti-men`; } } @@ -2794,9 +2805,9 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } r += `</span>`; - } else if (V.abbreviateMental == 2) { - if (slave.fetish != "mindbroken") { - if (slave.fetishKnown == 1) { + } else if (V.abbreviateMental === 2) { + if (slave.fetish !== "mindbroken") { + if (slave.fetishKnown === 1) { r += `<span class="lightcoral">`; switch (slave.fetish) { case "submissive": @@ -2887,7 +2898,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; } } - if (slave.attrKnown == 1) { + if (slave.attrKnown === 1) { if (slave.attrXY <= 5) { r += `<span class="red">Disgusted by men${V.summaryStats? `[${slave.attrXY}]` : ''},</span>`; } else if (slave.attrXY <= 15) { @@ -2940,33 +2951,33 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="red">No sex drive${V.summaryStats? `[${slave.energy}]` : ''}.</span>`; } } - if (slave.clitPiercing == 3) { - if (slave.fetishKnown == 1) { - if (slave.clitSetting == "off") { + if (slave.clitPiercing === 3) { + if (slave.fetishKnown === 1) { + if (slave.clitSetting === "off") { r += `SP off.`; - } else if (((slave.fetish != "submissive") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "submissive")) { + } else if (((slave.fetish !== "submissive") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "submissive")) { r += `SP: submissive.`; - } else if (((slave.fetish != "cumslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "oral")) { + } else if (((slave.fetish !== "cumslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "oral")) { r += `SP: oral.`; - } else if (((slave.fetish != "humiliation") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "humiliation")) { + } else if (((slave.fetish !== "humiliation") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "humiliation")) { r += `SP: humiliation.`; - } else if (((slave.fetish != "buttslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "anal")) { + } else if (((slave.fetish !== "buttslut") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "anal")) { r += `SP: anal.`; - } else if (((slave.fetish != "boobs") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "boobs")) { + } else if (((slave.fetish !== "boobs") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "boobs")) { r += `SP: breasts.`; - } else if (((slave.fetish != "sadist") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "sadist")) { + } else if (((slave.fetish !== "sadist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "sadist")) { r += `SP: sadism.`; - } else if (((slave.fetish != "masochist") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "masochist")) { + } else if (((slave.fetish !== "masochist") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "masochist")) { r += `SP: masochism.`; - } else if (((slave.fetish != "dom") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "dom")) { + } else if (((slave.fetish !== "dom") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "dom")) { r += `SP: dominance.`; - } else if (((slave.fetish != "pregnancy") || (slave.fetishStrength <= 95)) && (slave.clitSetting == "pregnancy")) { + } else if (((slave.fetish !== "pregnancy") || (slave.fetishStrength <= 95)) && (slave.clitSetting === "pregnancy")) { r += `SP: pregnancy.`; - } else if ((slave.fetish != "none") && (slave.clitSetting == "vanilla")) { + } else if ((slave.fetish !== "none") && (slave.clitSetting === "vanilla")) { r += `SP: vanilla.`; - } else if ((slave.energy <= 95) && (slave.clitSetting == "all")) { + } else if ((slave.energy <= 95) && (slave.clitSetting === "all")) { r += `SP: all.`; - } else if ((slave.energy > 5) && (slave.clitSetting == "none")) { + } else if ((slave.energy > 5) && (slave.clitSetting === "none")) { r += `SP: none.`; } else if (!["women", "men", "anti-women", "anti-men"].includes(slave.clitSetting)) { r += `SP: monitoring.`; @@ -3014,16 +3025,16 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } } - if (slave.attrKnown == 1) { - if ((slave.attrXX < 100) && (slave.clitSetting == "women")) { + if (slave.attrKnown === 1) { + if ((slave.attrXX < 100) && (slave.clitSetting === "women")) { r += `SP: women.`; - } else if ((slave.attrXY < 100) && (slave.clitSetting == "men")) { + } else if ((slave.attrXY < 100) && (slave.clitSetting === "men")) { r += `SP: men.`; } } else { - if (slave.clitSetting == "women") { + if (slave.clitSetting === "women") { r += `SP: women.`; - } else if (slave.clitSetting == "men") { + } else if (slave.clitSetting === "men") { r += `SP: men.`; } } @@ -3189,34 +3200,35 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; } - if (slave.customLabel != "") { + if (slave.customLabel !== "") { r += `<strong><span class="yellow">${slave.customLabel}</span></strong>`; } - if ((slave.relationship != 0) || (slave.relation != 0) || (V.abbreviateClothes == 2) || (V.abbreviateRulesets == 2)) { + if ((slave.relationship !== 0) || (slave.relation !== 0) || (V.abbreviateClothes === 2) || (V.abbreviateRulesets === 2)) { r += `<br>`; - if (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) { + if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) { r += ` `; } } - if (V.abbreviateMental == 1) { + if (V.abbreviateMental === 1) { r += `<span class="lightgreen">`; - if (V.familyTesting == 1) { + let _relationshipHandled = 0; + if (V.familyTesting === 1) { if (slave.mother > 0) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.mother; + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.mother; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s daughter`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` & friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` & BFF`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` & FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` & lover`; } else { r += ` & wife`; @@ -3224,30 +3236,30 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { _relationshipHandled = 1; } } - } else if (slave.mother == -1) { + } else if (slave.mother === -1) { r += `Your daughter`; - if (slave.relationship == -3) { + if (slave.relationship === -3) { r += `& wife`; _relationshipHandled = 1; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `& lover`; _relationshipHandled = 1; } } - if (slave.father > 0 && slave.father != slave.mother) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.father; + if (slave.father > 0 && slave.father !== slave.mother) { + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.father; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s daughter`; - if (slave.relationshipTarget == V.slaves[_ssj].ID && _relationshipHandled != 1) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID && _relationshipHandled !== 1) { + if (slave.relationship === 1) { r += ` & friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` & BFF`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` & FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` & lover`; } else { r += ` & wife`; @@ -3255,30 +3267,30 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { _relationshipHandled = 1; } } - } else if (slave.father == -1 && slave.mother != -1) { + } else if (slave.father === -1 && slave.mother !== -1) { r += `Your daughter`; - if (slave.relationship == -3) { + if (slave.relationship === -3) { r += `& wife`; _relationshipHandled = 1; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `& lover`; _relationshipHandled = 1; } } - if (slave.daughters == 1) { - _ssj = V.slaves.findIndex(function(s) { - return s.mother == slave.ID; + if (slave.daughters === 1) { + let _ssj = V.slaves.findIndex(function(s) { + return s.mother === slave.ID; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s mother`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` & friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` & BFF`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` & FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` & lover`; } else { r += ` & wife`; @@ -3287,18 +3299,18 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } _ssj = V.slaves.findIndex(function(s) { - return s.father == slave.ID; + return s.father === slave.ID; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s father`; - if (slave.relationshipTarget == V.slaves[_ssj].ID && _relationshipHandled != 1) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID && _relationshipHandled !== 1) { + if (slave.relationship === 1) { r += ` & friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` & BFF`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` & FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` & lover`; } else { r += ` & wife`; @@ -3309,20 +3321,20 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.daughters > 1) { r += `multiple daughters`; } - if (slave.sisters == 1) { - _ssj = V.slaves.findIndex(function(s) { + if (slave.sisters === 1) { + let _ssj = V.slaves.findIndex(function(s) { return areSisters(s, slave) > 0; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s sister`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` & friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` & BFF`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` & FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` & lover`; } else { r += ` & wife`; @@ -3333,11 +3345,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } else if (slave.sisters > 1) { r += `multiple sisters`; } - if (slave.relationship > 0 && _relationshipHandled != 1) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.relationshipTarget; + if (slave.relationship > 0 && _relationshipHandled !== 1) { + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.relationshipTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; switch (slave.relationship) { case 1: @@ -3357,30 +3369,30 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } } - } else if (slave.relationship == -3) { + } else if (slave.relationship === -3) { r += `Your wife`; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `E Bonded`; - } else if (slave.relationship == -1) { + } else if (slave.relationship === -1) { r += `E Slut`; } } else { - if (slave.relation != 0) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.relationTarget; + if (slave.relation !== 0) { + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.relationTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s ${slave.relation}`; } } if (slave.relationship > 0) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.relationshipTarget; + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.relationshipTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { switch (slave.relationship) { case 1: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `&`; @@ -3388,7 +3400,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `friend`; break; case 2: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `&`; @@ -3396,7 +3408,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `BFF`; break; case 3: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `&`; @@ -3404,7 +3416,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `FWB`; break; case 4: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `&`; @@ -3412,7 +3424,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `lover`; break; case 5: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `&`; @@ -3421,22 +3433,22 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } } - } else if (slave.relationship == -3) { + } else if (slave.relationship === -3) { r += `Your wife`; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `E Bonded`; - } else if (slave.relationship == -1) { + } else if (slave.relationship === -1) { r += `E Slut`; } } r += `</span>`; _relationshipHandled = 0; - if (slave.rivalry != 0) { + if (slave.rivalry !== 0) { r += ` `; - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.rivalryTarget; + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.rivalryTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `<span class="lightsalmon">`; if (slave.rivalry <= 1) { r += `Disl ${SlaveFullName(V.slaves[_ssj])}`; @@ -3448,22 +3460,23 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `</span>`; } } - } else if (V.abbreviateMental == 2) { - if (V.familyTesting == 1) { + } else if (V.abbreviateMental === 2) { + let _relationshipHandled = 0; + if (V.familyTesting === 1) { if (slave.mother > 0) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.mother; + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.mother; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">daughter`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` and friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` and best friend`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` and FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` and lover`; } else { r += ` and wife`; @@ -3472,33 +3485,32 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += `.</span>`; } - } else if (slave.mother == -1) { + } else if (slave.mother === -1) { r += `Your`; - if (slave.relationship == -3) { + if (slave.relationship === -3) { r += `<span class="lightgreen">daughter and wife.</span>`; _relationshipHandled = 1; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `<span class="lightgreen">daughter and lover.</span>`; _relationshipHandled = 1; } else { r += `<span class="lightgreen">daughter.</span>`; } } - // HERE - if (slave.father > 0 && slave.father != slave.mother) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.father; + if (slave.father > 0 && slave.father !== slave.mother) { + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.father; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">daughter`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` and friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` and best friend`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` and FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` and lover`; } else { r += ` and wife`; @@ -3507,32 +3519,32 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += `.</span>`; } - } else if (slave.father == -1 && slave.father != slave.mother) { + } else if (slave.father === -1 && slave.father !== slave.mother) { r += `Your`; - if (slave.relationship == -3) { + if (slave.relationship === -3) { r += `<span class="lightgreen">daughter and wife.</span>`; _relationshipHandled = 1; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `<span class="lightgreen">daughter and lover.</span>`; _relationshipHandled = 1; } else { r += `<span class="lightgreen">daughter.</span>`; } } - if (slave.daughters == 1) { - _ssj = V.slaves.findIndex(function(s) { - return s.mother == slave.ID; + if (slave.daughters === 1) { + let _ssj = V.slaves.findIndex(function(s) { + return s.mother === slave.ID; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">mother`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` and friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` and best friend`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` and FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` and lover`; } else { r += ` and wife`; @@ -3542,18 +3554,18 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `.</span>`; } _ssj = V.slaves.findIndex(function(s) { - return s.father == slave.ID; + return s.father === slave.ID; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">father`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` and friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` and best friend`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` and FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` and lover`; } else { r += ` and wife`; @@ -3571,20 +3583,20 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="lightgreen">Has several daughters.</span>`; } } - if (slave.sisters == 1) { - _ssj = V.slaves.findIndex(function(s) { + if (slave.sisters === 1) { + let _ssj = V.slaves.findIndex(function(s) { return areSisters(s, slave) > 0; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s <span class="lightgreen">sister`; - if (slave.relationshipTarget == V.slaves[_ssj].ID) { - if (slave.relationship == 1) { + if (slave.relationshipTarget === V.slaves[_ssj].ID) { + if (slave.relationship === 1) { r += ` and friend`; - } else if (slave.relationship == 2) { + } else if (slave.relationship === 2) { r += ` and best friend`; - } else if (slave.relationship == 3) { + } else if (slave.relationship === 3) { r += ` and FWB`; - } else if (slave.relationship == 4) { + } else if (slave.relationship === 4) { r += ` and lover`; } else { r += ` and wife`; @@ -3602,11 +3614,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="lightgreen">Has several sisters.</span>`; } } - if (slave.relationship > 0 && _relationshipHandled != 1) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.relationshipTarget; + if (slave.relationship > 0 && _relationshipHandled !== 1) { + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.relationshipTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; switch (slave.relationship) { case 1: @@ -3626,21 +3638,21 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } } - } else if (slave.relationship == -3) { + } else if (slave.relationship === -3) { r += `<span class="lightgreen">Your wife.</span>`; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `<span class="lightgreen">Emotionally bonded to you.</span>`; - } else if (slave.relationship == -1) { + } else if (slave.relationship === -1) { r += `<span class="lightgreen">Emotional slut.</span>`; } } else { - if (slave.relation != 0) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.relationTarget; + if (slave.relation !== 0) { + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.relationTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `<span class="lightgreen">${slave.relation}</span>.`; } else { r += `<span class="lightgreen">${slave.relation}</span>`; @@ -3651,13 +3663,13 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } if (slave.relationship > 0) { - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.relationshipTarget; + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.relationshipTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { switch (slave.relationship) { case 1: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `and`; @@ -3665,7 +3677,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="lightgreen">friend.</span>`; break; case 2: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `and`; @@ -3673,7 +3685,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="lightgreen">best friend.</span>`; break; case 3: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `and`; @@ -3681,7 +3693,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="lightgreen">FWB.</span>`; break; case 4: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `and`; @@ -3689,7 +3701,7 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `<span class="lightgreen">lover.</span>`; break; case 5: - if (slave.relationshipTarget != slave.relationTarget) { + if (slave.relationshipTarget !== slave.relationTarget) { r += `${SlaveFullName(V.slaves[_ssj])}'s`; } else { r += `and`; @@ -3698,21 +3710,21 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { break; } } - } else if (slave.relationship == -3) { + } else if (slave.relationship === -3) { r += `<span class="lightgreen">Your wife.</span>`; - } else if (slave.relationship == -2) { + } else if (slave.relationship === -2) { r += `<span class="lightgreen">Emotionally bonded to you.</span>`; - } else if (slave.relationship == -1) { + } else if (slave.relationship === -1) { r += `<span class="lightgreen">Emotional slut.</span>`; } } _relationshipHandled = 0; - if (slave.rivalry != 0) { + if (slave.rivalry !== 0) { r += ` `; - _ssj = V.slaves.findIndex(function(s) { - return s.ID == slave.rivalryTarget; + let _ssj = V.slaves.findIndex(function(s) { + return s.ID === slave.rivalryTarget; }); - if (_ssj != -1) { + if (_ssj !== -1) { if (slave.rivalry <= 1) { r += `<span class="lightsalmon">Dislikes</span> ${SlaveFullName(V.slaves[_ssj])}.`; } else if (slave.rivalry <= 2) { @@ -3724,10 +3736,10 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } } - if (slave.fuckdoll == 0) { - if (V.abbreviateClothes == 2) { + if (slave.fuckdoll === 0) { + if (V.abbreviateClothes === 2) { r += ` `; - if (slave.choosesOwnClothes == 1) { + if (slave.choosesOwnClothes === 1) { r += `Dressing herself.`; } switch (slave.clothes) { @@ -3994,25 +4006,25 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `Extreme corsetage.`; break; } - if (slave.amp != 1) { - if (slave.legAccessory == "short stockings") { + if (slave.amp !== 1) { + if (slave.legAccessory === "short stockings") { r += `Short stockings.`; - } else if (slave.legAccessory == "long stockings") { + } else if (slave.legAccessory === "long stockings") { r += `Long stockings.`; } } if (canWalk(slave)) { - if (slave.shoes == "heels") { + if (slave.shoes === "heels") { r += `Heels.`; - } else if (slave.shoes == "pumps") { + } else if (slave.shoes === "pumps") { r += `Pumps.`; - } else if (slave.shoes == "extreme heels") { + } else if (slave.shoes === "extreme heels") { r += `Extreme heels.`; - } else if (slave.shoes == "boots") { + } else if (slave.shoes === "boots") { r += `Boots.`; - } else if (slave.heels == 1) { + } else if (slave.heels === 1) { r += `<span class="yellow">Crawling.</span>`; - } else if (slave.shoes == "flats") { + } else if (slave.shoes === "flats") { r += `Flats.`; } } @@ -4045,11 +4057,11 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { r += `Long and wide vaginal dildo.`; break; } - if (slave.dickAccessory == "chastity") { + if (slave.dickAccessory === "chastity") { r += `Chastity cage.`; - } else if (slave.dickAccessory == "combined chastity") { + } else if (slave.dickAccessory === "combined chastity") { r += `Combined chastity.`; - } else if (slave.dickAccessory == "anal chastity") { + } else if (slave.dickAccessory === "anal chastity") { r += `Anal chastity.`; } switch (slave.buttplug) { @@ -4081,15 +4093,15 @@ window.SlaveSummaryUncached = function SlaveSummaryUncached(slave) { } r += ` `; - if (slave.useRulesAssistant == 0) { + if (slave.useRulesAssistant === 0) { r += `<span class="lightgreen">RA-Exempt</span>`; - } else if (V.abbreviateRulesets == 2 && (slave.currentRules !== undefined) && (slave.currentRules.length > 0)) { + } else if (V.abbreviateRulesets === 2 && (slave.currentRules !== undefined) && (slave.currentRules.length > 0)) { r += `Rules: ${V.defaultRules.filter(x => ruleApplied(slave, x)).map(x => x.name).join(" ") }`; } - if (V.abbreviateOrigins == 2 && slave.origin != 0) { + if (V.abbreviateOrigins === 2 && slave.origin !== 0) { r += `<br>`; - if (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) { + if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) { r += ` `; } r += `<span class="gray">${slave.origin}</span>`; diff --git a/src/pregmod/widgets/slaveSummaryWidgets.tw b/src/pregmod/widgets/slaveSummaryWidgets.tw index c88e9092db95827905157b82d0f3f382698961e1..1ef14f1e4b45320d886d03612ab0381a05fdd240 100644 --- a/src/pregmod/widgets/slaveSummaryWidgets.tw +++ b/src/pregmod/widgets/slaveSummaryWidgets.tw @@ -2,26 +2,7 @@ /* Try to use cached summary */ <<run setup.summaryCache = {}>> -<<widget "SlaveSummary">> -<<if $useSummaryCache>> - <<set _Slave = $args[0]>> - <<if !setup.summaryCache[_Slave.ID]>> - <<run setup.summaryCache[_Slave.ID] = SlaveSummaryUncached($args[0])>> - <</if>> - <<script>> - /* - * NOTE: This is for text passages only. Links inside it need to have their events re-attached - * Example basic code to do so: - * jQuery(summary).find('.link-internal').each(function() { - * var el = jQuery(this); - * el.ariaClick({ one : true }, () => Engine.play(el.attr('data-passage'))); - * }); - */ - this.output.appendChild(setup.summaryCache[State.temporary.Slave.ID].cloneNode(true)) - <</script>> -<<else>> - <<SlaveSummaryUncached $args[0]>> -<</if>> -<</widget>> + +<<widget "SlaveSummary">><<=SlaveSummary($args[0])>><</widget>> <<widget "SlaveSummaryUncached">><<=SlaveSummaryUncached($args[0])>><</widget>>