From 3fbf3361b17ef1e1c603471374c4d22fd246e642 Mon Sep 17 00:00:00 2001
From: lowercase-donkey <lowercasedonkey@gmail.com>
Date: Wed, 29 May 2019 14:35:59 -0400
Subject: [PATCH] finish removing keySum

---
 src/js/utilJS.js                       | 15 ---------------
 src/uncategorized/saLongTermEffects.tw |  2 +-
 src/uncategorized/sellSlave.tw         |  2 +-
 3 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/js/utilJS.js b/src/js/utilJS.js
index 9608cc41610..0fea5bf0956 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 bb743a2c97e..7536ae2b26a 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 d921989da5b..f07c250b38e 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>>
-- 
GitLab