diff --git a/src/interaction/wardrobeUse.js b/src/interaction/wardrobeUse.js index 2203e7df071f580dba6758ab14120deaeeb32c32..0b6fbfe83e1e5b070d4c3e56e573e374ad69648c 100644 --- a/src/interaction/wardrobeUse.js +++ b/src/interaction/wardrobeUse.js @@ -34,26 +34,33 @@ App.UI.Wardrobe.clothes = function(slave) { let clothingOption; // Nice clothes App.Data.misc.niceClothes.forEach(item => { - clothingOption = { - text: item.name, - updateSlave: {clothes: item.value, choosesOwnClothes: 0} - }; - if (item.fs) { - clothingOption.FS = item.fs; + console.log("results: ", isItemAccessible.entry(item.value, "clothing", slave), item); + if (isItemAccessible.entry(item.value, "clothing", slave) === true) { + clothingOption = { + text: item.name, + updateSlave: {clothes: item.value, choosesOwnClothes: 0} + }; + if (item.fs) { + clothingOption.FS = item.fs; + } + niceOptionsArray.push(clothingOption); + } else { + console.log("failed", item); } - niceOptionsArray.push(clothingOption); }); // Harsh clothes App.Data.misc.harshClothes.forEach(item => { - clothingOption = { - text: item.name, - updateSlave: {clothes: item.value, choosesOwnClothes: 0} - }; - if (item.fs) { - clothingOption.FS = item.fs; - } - if (item.value !== "choosing her own clothes") { - harshOptionsArray.push(clothingOption); + if (isItemAccessible.entry(item.value, "clothing", slave) === true) { + clothingOption = { + text: item.name, + updateSlave: {clothes: item.value, choosesOwnClothes: 0} + }; + if (item.fs) { + clothingOption.FS = item.fs; + } + if (item.value !== "choosing her own clothes") { + harshOptionsArray.push(clothingOption); + } } }); diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index 044139009a3433d6a5d7cd8594ea80513be4eec8..c8bdc983e407df4ca898bca981de9517aa5c9c05 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -104,7 +104,7 @@ globalThis.isItemAccessible = (function() { return true; } if (item.hasOwnProperty("rs")) { - if (item.rs) { + if (item.rs === true) { return true; } }