From 42c271b5ca1e33b1e9a52e8cfb0c69543362df6a Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Wed, 19 Feb 2020 21:39:44 -0500 Subject: [PATCH] fix access check --- src/js/wardrobeUse.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/js/wardrobeUse.js b/src/js/wardrobeUse.js index d36e98e3058..48574643c1c 100644 --- a/src/js/wardrobeUse.js +++ b/src/js/wardrobeUse.js @@ -241,7 +241,7 @@ App.UI.Wardrobe.shoes = function(slave) { // Options let links = document.createElement('div'); links.className = "choices"; - links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "shoes", slave)); + links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "shoes", slave, false)); el.appendChild(links); return jQuery('#shoes').empty().append(el); @@ -343,7 +343,7 @@ App.UI.Wardrobe.bellyAccessory = function(slave) { // Options let links = document.createElement('div'); links.className = "choices"; - links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "bellyAccessory", slave)); + links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "bellyAccessory", slave, false)); el.appendChild(links); return jQuery('#bellyAccessory').empty().append(el); @@ -401,7 +401,7 @@ App.UI.Wardrobe.buttplug = function(slave) { // Options let links = document.createElement('div'); links.className = "choices"; - links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "buttplug", slave)); + links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "buttplug", slave, false)); el.appendChild(links); return jQuery('#buttplug').empty().append(el); @@ -461,14 +461,14 @@ App.UI.Wardrobe.buttplugAttachment = function(slave) { // Options let links = document.createElement('div'); links.className = "choices"; - links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "buttplugAttachment", slave)); + links.appendChild(App.UI.Wardrobe.generateRows(optionsArray, "buttplugAttachment", slave, false)); el.appendChild(links); return jQuery('#buttplugAttachment').empty().append(el); }; -App.UI.Wardrobe.generateRows = function(array, category, slave, ignoreAccessCheck="false") { // category should be in the form of slave.category, the thing we want to update. +App.UI.Wardrobe.generateRows = function(array, category, slave, ignoreAccessCheck=false) { // category should be in the form of slave.category, the thing we want to update. let row = document.createElement('span'); for (let i = 0; i < array.length; i++) { let link; @@ -486,9 +486,9 @@ App.UI.Wardrobe.generateRows = function(array, category, slave, ignoreAccessChec } } // 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; + let unlocked = false; if (ignoreAccessCheck === false) { - unlocked = isClothingAccessible.entry(array[i].updateSlave[category], `${category}`, slave); + unlocked = isClothingAccessible.entry(array[i].updateSlave[category], `${category}`, slave, false); } if (ignoreAccessCheck === true || unlocked) { // is it just text? -- GitLab