From c77420d0cc532cbf077ee7fbd8bf41b67ac893a2 Mon Sep 17 00:00:00 2001 From: lowercase-donkey <lowercasedonkey@gmail.com> Date: Wed, 29 May 2019 14:33:12 -0400 Subject: [PATCH] more fixes --- src/js/slaveCostJS.js | 4 ++-- src/js/slaveSummaryWidgets.js | 4 ++-- src/npc/uploadSlave.tw | 2 +- src/uncategorized/bodyModification.tw | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index 6ca6c2dcb52..69db2b464ae 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -188,7 +188,7 @@ window.Beauty = (function() { * @param {App.Entity.SlaveState} slave */ function calcCosmeticsBeauty(slave) { - if (keySum(slave.brand) !== 0) { + for (let [key, value] of Object.entries(slave.brand)) { if (V.rep > 10000) { beauty += 1; } else if (V.rep < 5000) { @@ -2232,7 +2232,7 @@ window.slaveCost = (function() { if (slave.geneticQuirks.albinism === 2) { multiplier += 0.2; } - if (keySum(slave.brand) !== 0) { + for (let [key, value] of Object.entries(slave.brand)) { if (V.rep > 10000) { multiplier += 0.1; } else if (V.rep < 5000) { diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index 9ec7c5b9f59..6e219a60792 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -145,7 +145,7 @@ window.SlaveSummaryUncached = (function() { long_implants(slave); long_lactation(slave); long_mods(slave); - if (keySum(slave.brand) !== 0) { + if (!jQuery.isEmptyObject(slave.brand)) { r += `Branded.`; } r += `</span>`; @@ -2412,7 +2412,7 @@ window.SlaveSummaryUncached = (function() { } else { r += `Mods`; } - if (keySum(slave.brand) !== 0) { + if (!jQuery.isEmptyObject(slave.brand)) { r += `Br`; } r += " "; diff --git a/src/npc/uploadSlave.tw b/src/npc/uploadSlave.tw index 59fcb784691..e45bbdec198 100644 --- a/src/npc/uploadSlave.tw +++ b/src/npc/uploadSlave.tw @@ -135,7 +135,7 @@ anusPiercing: $activeSlave.anusPiercing, anusTat: "$activeSlave.anusTat", makeup: $activeSlave.makeup, nails: $activeSlave.nails, -brand: <<if keySum($activeSlave.brand) == 0>>0,<<else>> +brand: <<if (!jQuery.isEmptyObject($activeSlave.brand))>>0,<<else>> <<for _brandName, _brand range $activeSlave.brand>> <<if _brand == 0>> <<continue>> diff --git a/src/uncategorized/bodyModification.tw b/src/uncategorized/bodyModification.tw index 9a8b9483995..5421394574b 100644 --- a/src/uncategorized/bodyModification.tw +++ b/src/uncategorized/bodyModification.tw @@ -897,7 +897,7 @@ Branding: <</link>> <</capture>> <</for>> -<<if (keySum($activeSlave.brand) === 0)>> +<<if (jQuery.isEmptyObject($activeSlave.brand))>> <br>$His skin is unmarked. <</if>> -- GitLab