From 2eecc41d23f045cee87ae0330826ce5aa1cc9e21 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Tue, 29 Dec 2020 16:39:33 -0500 Subject: [PATCH] chastity --- js/003-data/slaveWearData.js | 2 +- src/interaction/siWardrobe.js | 2 +- src/js/itemAvailability.js | 11 +---------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/js/003-data/slaveWearData.js b/js/003-data/slaveWearData.js index 976ac8371e7..2f8b6e4374e 100644 --- a/js/003-data/slaveWearData.js +++ b/js/003-data/slaveWearData.js @@ -1318,7 +1318,7 @@ App.Data.vaginalAccessory = new Map([ */ /** @type {Map<string, slaveWearChastity>} */ -App.Data.chastityDevices = new Map([ +App.Data.chastity = new Map([ // '.value' must be a string, so using update slave so I can update multiple values. ["none", { diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js index bcaf5d7eb71..574596fb0df 100644 --- a/src/interaction/siWardrobe.js +++ b/src/interaction/siWardrobe.js @@ -777,7 +777,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) { let optionsArray = []; - for (const [key, object] of App.Data.chastityDevices) { + for (const [key, object] of App.Data.chastity) { if (key === "none") { // skip none in set, we set the link elsewhere. continue; diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index 1a24a3e0da0..88c30da783e 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -15,16 +15,7 @@ globalThis.isItemAccessible = (function() { if (V.cheatMode === 1) { return true; } - let selectedDB; - switch (category) { - case "chastity": - selectedDB = App.Data.chastityDevices; - break; - default: - // console.log(`made a category for ${category} automatically, may need to define this by hand`); - selectedDB = App.Data.slaveWear[category] || App.Data[category]; - break; - } + const selectedDB = App.Data.slaveWear[category] || App.Data[category]; const item = selectedDB.get(string); if (!item) { console.log(`${string} is not a registered piece of clothing! Check App.Data.slaveWear.${category}`); -- GitLab