diff --git a/src/endWeek/saClothes.js b/src/endWeek/saClothes.js index 914f95a5d114e439633608ac242b6f5e80834ffd..1edffa8176e40a0f02fc0b2def9aad169e882f7b 100644 --- a/src/endWeek/saClothes.js +++ b/src/endWeek/saClothes.js @@ -296,7 +296,7 @@ App.SlaveAssignment.clothes = (function() { r.push(`${He} pretends to be embarrassed by ${his} clearly exposed breasts but <span class="hotpink">secretly gets off on it.</span>`); slave.devotion += 1; } - } else if (slave.fetish === "humiliation" && App.Data.clothes.get(slave.clothes).exposure === 3) { + } else if (slave.fetish === "humiliation" && getExposure(slave) === 3) { if (slave.fetishKnown === 0) { r.push(`${He} pretends to be embarrassed by ${his} extremely revealing clothing but seems to get off on it. <span class="lightcoral">${He}'s into humiliation.</span>`); slave.fetishKnown = 1; @@ -333,7 +333,7 @@ App.SlaveAssignment.clothes = (function() { // humiliating clothing effects if (slave.fetishKnown === 0 || slave.fetish === "none") { - if (App.Data.clothes.get(slave.clothes).exposure === 3) { + if (getExposure(slave) === 3) { if (fetishChangeChance(slave) > jsRandom(0, 100)) { r.push(`Surprisingly, ${he} takes to ${his} extremely revealing clothing, and gets an obvious thrill from it. <span class="lightcoral">${He}'s become a humiliation fetishist!</span>`); slave.fetish = "humiliation"; diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js index 614878e4b25b0ef7e6b37d832314ca1a2642bffb..ab276c1bae2c7108f3fa1d65101f2b58f77a8007 100644 --- a/src/interaction/siWardrobe.js +++ b/src/interaction/siWardrobe.js @@ -931,7 +931,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) { /* assuming nice clothes, could actually add some sort of check to make sure. */ /* which clothes have these is decided in miscData.js */ let clothTooltip = Cloth + ""; - switch (App.Data.clothes.get(slave.clothes).exposure) { + switch (getExposure(slave)) { case 3: clothTooltip += ", it's humiliating"; break; diff --git a/src/js/eventSelectionJS.js b/src/js/eventSelectionJS.js index f499e6bbae627abe658d7a6cf3658ea320beaf01..9576db5afa979e6973855d79ede9d1739edce19d 100644 --- a/src/js/eventSelectionJS.js +++ b/src/js/eventSelectionJS.js @@ -618,7 +618,7 @@ globalThis.generateRandomEventPoolStandard = function(eventSlave) { if (eventSlave.trust > 20) { if (eventSlave.rules.speech !== "restrictive") { if (eventSlave.choosesOwnClothes !== 1) { - if (App.Data.clothes.get(eventSlave.clothes).exposure === 0) { + if (getExposure(slave) === 0) { V.RESSevent.push("modest clothes"); } } diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index 4c94e5f40860ef9dda5431f208eab3e8fae95033..250bb2698a02ed44ccd00d7030af1c048018971a 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -472,7 +472,7 @@ globalThis.bimboScore = function(slave) { if (slave.skin === "sun tanned" || slave.skin === "spray tanned") { degree++; } - if (App.Data.clothes.get(slave.clothes).exposure === 2) { + if (getExposure(slave) === 2) { degree++; } diff --git a/src/js/utilsFC.js b/src/js/utilsFC.js index ff6d0c4e524222a00017bf18f4d4e6397c2e8f64..14f26e503ccbfd87a4971cc1de810d4e86f5bb46 100644 --- a/src/js/utilsFC.js +++ b/src/js/utilsFC.js @@ -3085,3 +3085,12 @@ App.Utils.alphabetizeIterable = function(iterable) { return clonedArray.sort(compare); }; +/** + * Returns how exposing a slave's outfit is, after taking into consideration a topless outfit is more revealing for beboobed slaves or female ones. + * @param {App.Entity.SlaveState} slave + * @returns {0|1|2|3|4} + */ +globalThis.getExposure = function(slave) { + const clothes = App.Data.clothes.get(slave.clothes); + return (clothes.topless && clothes.exposure < 3 && (slave.boobs > 299 || (slave.genes === 'XX' && slave.vagina >= 0))) ? 3 : clothes.exposure; +};