diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 9608cc416109054743c1ad831f7610ca59f9fe6a..0fea5bf0956826ad9de29e6e1e19b14c63f78346 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -3037,18 +3037,3 @@ App.Utils.setLocalPronouns = function(slave, suffix, pronouns) { scope[p + pSuffix] = ps[p]; }); }; - - -/** - * Returns the sum of keys in an object - * @param {number} obj - * @returns {int} - */ -window.keySum = function(obj) { - let summed = 0; - - for (let key in obj) { - summed += obj[key]; - } - return summed; -}; diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index bb743a2c97e8f3c556b62c25f8d80d5c5ac04881..7536ae2b26a8f69b84edc7ea2dfb9660e55611a9 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -5895,7 +5895,7 @@ /* LONG TERM PHYSICAL EFFECTS */ <<if $slaves[$i].fuckdoll == 0>> - <<if (keySum($slaves[$i].brand) != 0)>> + <<if (!jQuery.isEmptyObject($slaves[$i].brand))>> <<if ($slaves[$i].assignment == "serve the public") || ($slaves[$i].assignment == "whore") || ($slaves[$i].assignment == "work in the brothel") || ($slaves[$i].assignment == "serve in the club")>> Since $he is in public, your brand against the $slaves[$i].skin skin of $his <<for _brandName, _brand range $activeSlave.brand>> diff --git a/src/uncategorized/sellSlave.tw b/src/uncategorized/sellSlave.tw index d921989da5baccc69c08231b7d2e75a51108853c..f07c250b38ee7f592c3008df0318be908b86bf78 100644 --- a/src/uncategorized/sellSlave.tw +++ b/src/uncategorized/sellSlave.tw @@ -580,7 +580,7 @@ A reputable slave appraiser arrives promptly to inspect $him and certify $his qu <</if>> <</if>> -<<if keySum($activeSlave.brand) != 0>> +<<if (!jQuery.isEmptyObject($activeSlave.brand)>> <<if $rep > 10000>> I see $he's branded with your mark; with your stellar reputation, that will make $him appraise better. <<elseif $rep < 5000>>