diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 564864a9b0047c04e3b8ef3d414905edaff6f3a4..34c04ab75a1901235750a84de9121e16c61c3018 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -1824,17 +1824,7 @@ window.rulesAssistantOptions = (function() { class ShoeList extends ListSelector { constructor() { - const shoes = []; - setup.shoes.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - shoes.push([acc.name, acc.value]); - } else if (acc.fs === "statuesque" && V.arcologies[0].FSStatuesqueGlorification !== "unset") { - shoes.push([`${acc.name} (FS)`, acc.value]); - } else if (acc.rs === "shoesBoughtHeels" && V.shoesBoughtHeels === 1) { - shoes.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Shoes", shoes); + super("Shoes", isClothingAccessible.array(App.Data.misc.shoes)); this.setValue(current_rule.set.shoes); this.onchange = (value) => current_rule.set.shoes = value; } @@ -1842,17 +1832,7 @@ window.rulesAssistantOptions = (function() { class CorsetList extends ListSelector { constructor() { - const bellies = []; - setup.bellyAccessories.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - bellies.push([acc.name, acc.value]); - } else if (acc.fs === "repopulation" && V.arcologies[0].FSRepopulationFocus !== "unset") { - bellies.push([`${acc.name} (FS)`, acc.value]); - } else if (acc.rs === "clothesBoughtBelly" && V.clothesBoughtBelly === 1) { - bellies.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Corsetage", bellies); + super("Corsetage", isClothingAccessible.array(App.Data.misc.bellyAccessories)); this.setValue(current_rule.set.bellyAccessory); this.onchange = (value) => current_rule.set.bellyAccessory = value; } @@ -1898,15 +1878,7 @@ window.rulesAssistantOptions = (function() { class VagAccVirginsList extends ListSelector { constructor() { - const accs = []; - setup.vaginalAccessories.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - accs.push([acc.name, acc.value]); - } else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1) { - accs.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Vaginal accessories for virgins", accs); + super("Vaginal accessories for virgins", isClothingAccessible.array(App.Data.misc.vaginalAccessories)); this.setValue(current_rule.set.virginAccessory); this.onchange = (value) => current_rule.set.virginAccessory = value; } @@ -1914,15 +1886,7 @@ window.rulesAssistantOptions = (function() { class VagAccAVirginsList extends ListSelector { constructor() { - const accs = []; - setup.vaginalAccessories.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - accs.push([acc.name, acc.value]); - } else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1) { - accs.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Vaginal accessories for anal virgins", accs); + super("Vaginal accessories for anal virgins", isClothingAccessible.array(App.Data.misc.vaginalAccessories)); this.setValue(current_rule.set.aVirginAccessory); this.onchange = (value) => current_rule.set.aVirginAccessory = value; } @@ -1930,15 +1894,7 @@ window.rulesAssistantOptions = (function() { class VagAccOtherList extends ListSelector { constructor() { - const accs = []; - setup.vaginalAccessories.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - accs.push([acc.name, acc.value]); - } else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1) { - accs.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Vaginal accessories for other slaves", accs); + super("Vaginal accessories for other slaves", isClothingAccessible.array(App.Data.misc.vaginalAccessories)); this.setValue(current_rule.set.vaginalAccessory); this.onchange = (value) => current_rule.set.vaginalAccessory = value; } @@ -1946,15 +1902,7 @@ window.rulesAssistantOptions = (function() { class VaginalAttachmentsList extends ListSelector { constructor() { - const accs = []; - setup.vaginalAttachments.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - accs.push([acc.name, acc.value]); - } else if (acc.rs === "buyVaginalAttachments" && V.toysBoughtVaginalAttachments === 1) { - accs.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Vaginal attachments for slaves with vaginal accessories", accs); + super("Vaginal attachments for slaves with vaginal accessories", isClothingAccessible.array(App.Data.misc.vaginalAttachments)); this.setValue(current_rule.set.vaginalAttachment); this.onchange = (value) => current_rule.set.vaginalAttachment = value; } @@ -1974,7 +1922,7 @@ window.rulesAssistantOptions = (function() { class DickAccVirginsList extends ListSelector { constructor() { - super("Dick accessories for anal virgins", setup.dickAccessories.map(i => [i.name, i.value])); + super("Dick accessories for anal virgins", isClothingAccessible.array(App.Data.misc.dickAccessories)); this.setValue(current_rule.set.aVirginDickAccessory); this.onchange = (value) => current_rule.set.aVirginDickAccessory = value; } @@ -1982,7 +1930,7 @@ window.rulesAssistantOptions = (function() { class DickAccOtherList extends ListSelector { constructor() { - super("Dick accessories for other slaves", setup.dickAccessories.map(i => [i.name, i.value])); + super("Dick accessories for other slaves", isClothingAccessible.array(App.Data.misc.dickAccessories)); this.setValue(current_rule.set.dickAccessory); this.onchange = (value) => current_rule.set.dickAccessory = value; } @@ -2002,15 +1950,7 @@ window.rulesAssistantOptions = (function() { class ButtplugsVirginsList extends ListSelector { constructor() { - const accs = []; - setup.buttplugs.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - accs.push([acc.name, acc.value]); - } else if (acc.rs === "toysBoughtButtPlugs" && V.toysBoughtButtPlugs === 1) { - accs.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Buttplugs for anal virgins", accs); + super("Buttplugs for anal virgins", isClothingAccessible.array(App.Data.misc.buttplugs)); this.setValue(current_rule.set.aVirginButtplug); this.onchange = (value) => current_rule.set.aVirginButtplug = value; } @@ -2018,15 +1958,7 @@ window.rulesAssistantOptions = (function() { class ButtplugsOtherList extends ListSelector { constructor() { - const accs = []; - setup.buttplugs.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - accs.push([acc.name, acc.value]); - } else if (acc.rs === "toysBoughtButtPlugs" && V.toysBoughtButtPlugs === 1) { - accs.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Buttplugs for other slaves", accs); + super("Buttplugs for other slaves", isClothingAccessible.array(App.Data.misc.buttplugs)); this.setValue(current_rule.set.buttplug); this.onchange = (value) => current_rule.set.buttplug = value; } @@ -2034,15 +1966,7 @@ window.rulesAssistantOptions = (function() { class ButtplugAttachmentsList extends ListSelector { constructor() { - const accs = []; - setup.buttplugAttachments.forEach(acc => { - if (acc.fs === undefined && acc.rs === undefined) { - accs.push([acc.name, acc.value]); - } else if (acc.rs === "toysBoughtButtPlugTails" && V.toysBoughtButtPlugTails === 1) { - accs.push([`${acc.name} (Purchased)`, acc.value]); - } - }); - super("Buttplug attachments for slaves with buttplugs", accs); + super("Buttplug attachments for slaves with buttplugs", isClothingAccessible.array(App.Data.misc.buttplugAttachments)); this.setValue(current_rule.set.buttplugAttachment); this.onchange = (value) => current_rule.set.buttplugAttachment = value; }