From 7a1aefcb694e67ce3ae14b85c2da77a6dbcf4277 Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Sun, 23 Feb 2020 17:14:23 -0800
Subject: [PATCH] Set choosesOwnClothes correctly.

---
 src/js/wardrobeUse.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/js/wardrobeUse.js b/src/js/wardrobeUse.js
index cfa2d979c03..517e42d9a3f 100644
--- a/src/js/wardrobeUse.js
+++ b/src/js/wardrobeUse.js
@@ -23,7 +23,7 @@ App.UI.Wardrobe.clothes = function(slave) {
 	// Choose her own
 	if (slave.clothes !== `choosing her own clothes`) {
 		let choiceOptionsArray = [];
-		choiceOptionsArray.push({text: `Let ${him} choose`, updateSlave: {clothes: `choosing her own clothes`}});
+		choiceOptionsArray.push({text: `Let ${him} choose`, updateSlave: {clothes: `choosing her own clothes`, choosesOwnClothes: 1}});
 		label.appendChild(App.UI.Wardrobe.generateRows(choiceOptionsArray, "clothes", slave, false));
 	}
 	el.appendChild(label);
@@ -37,7 +37,7 @@ App.UI.Wardrobe.clothes = function(slave) {
 	App.Data.misc.niceClothes.forEach(item => {
 		clothingOption = {
 			text: item.name,
-			updateSlave: {clothes: item.value}
+			updateSlave: {clothes: item.value, choosesOwnClothes: 0}
 		};
 		if (item.fs) {
 			clothingOption.FS = item.fs;
@@ -48,7 +48,7 @@ App.UI.Wardrobe.clothes = function(slave) {
 	App.Data.misc.harshClothes.forEach(item => {
 		clothingOption = {
 			text: item.name,
-			updateSlave: {clothes: item.value}
+			updateSlave: {clothes: item.value, choosesOwnClothes: 0}
 		};
 		if (item.fs) {
 			clothingOption.FS = item.fs;
@@ -739,8 +739,8 @@ App.UI.Wardrobe.generateRows = function(array, category, slave, accessCheck = fa
 		// Some items will never be in App.data.misc, especially "none" if it falls in between harsh and nice data sets.  Trying to look it up would cause an error, which is what access check works around.
 		let unlocked = false;
 		if (accessCheck === true) {
-			if (Object.keys(array[i].updateSlave).length > 1 || category === "chastity") {
-				let text = array[i].text.toLowerCase(); // Yucky.  Sometimes for now updateSlave is an object since multiple values need to be set (chastity).  Compare using a lowercased name instead.
+			if (category === "chastity") {
+				let text = array[i].text.toLowerCase(); // Yucky.  Category name does not match for chastity (since it sets multiple kinds of chastity at once).  Compare using a lowercased name instead.
 				unlocked = isClothingAccessible.entry(text, `${category}`, slave, true);
 			} else {
 				unlocked = isClothingAccessible.entry(array[i].updateSlave[category], `${category}`, slave, true);
-- 
GitLab