From 04ec5317c4ce7885fee3da26c52dd66c1329d624 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Mon, 17 Feb 2020 20:08:55 -0500
Subject: [PATCH] use isClothingAccessible to dedupe

---
 src/js/rulesAssistantOptions.js | 127 +-------------------------------
 1 file changed, 4 insertions(+), 123 deletions(-)

diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js
index 2fb8cb1db46..f94a65a5680 100644
--- a/src/js/rulesAssistantOptions.js
+++ b/src/js/rulesAssistantOptions.js
@@ -1743,132 +1743,13 @@ window.rulesAssistantOptions = (function() {
 			];
 			super("Clothes", items);
 
-			const nclothes = [
-				["Apron", "an apron"],
-				["Bangles", "slutty jewelry"],
-				["Bodysuit", "a comfortable bodysuit"],
-				["Cheerleader", "a cheerleader outfit"],
-				["Clubslut netting", "clubslut netting"],
-				["Cutoffs and a t-shirt", "cutoffs and a t-shirt"],
-				["Fallen nun", "a fallen nuns habit"],
-				["Hijab and abaya", "a hijab and abaya"],
-				["Leotard", "a leotard"],
-				["Maid (slutty)", "a slutty maid outfit"],
-				["Nice lingerie", "attractive lingerie"],
-				["Nurse (slutty)", "a slutty nurse outfit"],
-				["Overalls", "overalls"],
-				["Scalemail bikini", "a scalemail bikini"],
-				["Schoolgirl", "a schoolgirl outfit"],
-				["Slutty outfit", "a slutty outfit"],
-				["Spats and tank top", "spats and a tank top"],
-				["String bikini", "a string bikini"],
-				["Succubus costume", "a succubus outfit"],
-				["Suit (slutty)", "slutty business attire"]
-			];
-			const spclothes = [
-				["Ballgown", "a ball gown"],
-				["Battlearmor", "battlearmor"],
-				["Battledress", "battledress"],
-				["Biyelgee costume", "a biyelgee costume"],
-				["Boyshorts", "boyshorts"],
-				["Bra", "a bra"],
-				["Burkini", "a burkini"],
-				["Burqa", "a burqa"],
-				["Button-up shirt and panties", "a button-up shirt and panties"],
-				["Button-up shirt", "a button-up shirt"],
-				["Cutoffs", "cutoffs"],
-				["Cybersuit", "a cybersuit"],
-				["Dirndl", "a dirndl"],
-				["Gothic Lolita Dress", "a gothic lolita dress"],
-				["Halter top dress", "a halter top dress"],
-				["Hanbok", "a hanbok"],
-				["Hijab and blouse", "a hijab and blouse"],
-				["Jeans", "jeans"],
-				["Kitty lingerie", "kitty lingerie"],
-				["Ku Klux Klan Robe", "a klan robe"],
-				["Ku Klux Klan Robe (slutty)", "a slutty klan robe"],
-				["Latex catsuit", "a latex catsuit"],
-				["Leather pants and a tube top", "leather pants and a tube top"],
-				["Leather pants and pasties", "leather pants and pasties"],
-				["Leather pants", "leather pants"],
-				["Lederhosen", "lederhosen"],
-				["Maid (nice)", "a nice maid outfit"],
-				["Military uniform", "a military uniform"],
-				["Mini dress", "a mini dress"],
-				["Monokini", "a monokini"],
-				["Mounty outfit", "a mounty outfit"],
-				["Niqab and abaya", "a niqab and abaya"],
-				["Nurse (nice)", "a nice nurse outfit"],
-				["One-piece swimsuit", "a one-piece swimsuit"],
-				["Over-sized t-shirt and boyshorts", "an oversized t-shirt and boyshorts"],
-				["Over-sized t-shirt", "an oversized t-shirt"],
-				["Panties", "panties"],
-				["Pasties", "pasties"],
-				["Pasties and panties", "panties and pasties"],
-				["Police Uniform", "a police uniform"],
-				["Pony outfit (nice)", "a nice pony outfit"],
-				["Pony outfit (slutty)", "a slutty pony outfit"],
-				["Red Army uniform", "a red army uniform"],
-				["Santa dress", "a Santa dress"],
-				["Schutzstaffel uniform (nice)", "a schutzstaffel uniform"],
-				["Schutzstaffel uniform (slutty)", "a slutty schutzstaffel uniform"],
-				["Skimpy loincloth", "a skimpy loincloth"],
-				["Slave gown", "a slave gown"],
-				["Sport shorts and a sports bra", "sport shorts and a sports bra"],
-				["Sport shorts and a t-shirt", "sport shorts and a t-shirt"],
-				["Sport shorts", "sport shorts"],
-				["Sports bra", "a sports bra"],
-				["Striped Bra", "a striped bra"],
-				["Striped Panties", "striped panties"],
-				["Striped Underwear", "striped underwear"],
-				["Suit (nice)", "nice business attire"],
-				["Sweater and cutoffs", "a sweater and cutoffs"],
-				["Sweater and panties", "a sweater and panties"],
-				["Sweater", "a sweater"],
-				["T-shirt and jeans", "a t-shirt and jeans"],
-				["T-shirt and panties", "a t-shirt and panties"],
-				["T-shirt and thong", "a t-shirt and thong"],
-				["T-shirt", "a t-shirt"],
-				["Tank-top and panties", "a tank-top and panties"],
-				["Tank-top", "a tank-top"],
-				["Thong", "a thong"],
-				["Tube top and thong", "a tube top and thong"],
-				["Tube top", "a tube top"]
-			];
-			const fsnclothes = [
-				["Bimbo outfit (FS)", "a bimbo outfit"],
-				["Body oil (FS)", "body oil"],
-				["Bunny outfit (FS)", "a bunny outfit"],
-				["Chattel habit (FS)", "a chattel habit"],
-				["Conservative clothing (FS)", "conservative clothing"],
-				["Courtesan dress (FS)", "a courtesan dress"],
-				["Harem gauze (FS)", "harem gauze"],
-				["Huipil (FS)", "a huipil"],
-				["Kimono (FS)", "a kimono"],
-				["Maternity dress (FS)", "a maternity dress"],
-				["Maternity lingerie (FS)", "attractive lingerie for a pregnant woman"],
-				["Qipao (nice) (FS)", "a long qipao"],
-				["Qipao (slutty) (FS)", "a slutty qipao"],
-				["Stretch pants and a crop-top (FS)", "stretch pants and a crop-top"],
-				["Toga (FS)", "a toga"],
-				["Western clothing (FS)", "Western clothing"],
-			];
-			spclothes.forEach(pair => { if (isItemAccessible(pair[1])) { nclothes.push(pair); } });
-			fsnclothes.forEach(pair => { if (isItemAccessible(pair[1])) { nclothes.push(pair); } });
+			const nclothes = [];
+			App.Data.misc.niceClothes.forEach(pair => { if (isClothingAccessible(pair.value)) { nclothes.push([pair.name, pair.value]); } }); //add FS
 			nclothes.sort(function(a, b) { if (a[0] < b[0]) { return -1; } if (a[0] > b[0]) { return 1; } return 0; });
 			this._nice = new ListSubSection(this, "Nice", nclothes);
 
-			const hclothes = [
-				["Nude", "no clothing"],
-				["Penitent nun", "a penitent nuns habit"],
-				["Restrictive latex", "restrictive latex"],
-				["Shibari ropes", "shibari ropes"],
-				["Uncomfortable straps", "uncomfortable straps"]
-			];
-			const fshclothes = [
-				["Chains (FS)", "chains"],
-			];
-			fshclothes.forEach(pair => { if (isItemAccessible(pair[1])) { hclothes.push(pair); } });
+			const hclothes = [];
+			App.Data.misc.harshClothes.forEach(pair => { if (isClothingAccessible(pair.value)) { hclothes.push([pair.name, pair.value]); } });
 			hclothes.sort(function(a, b) { if (a[0] < b[0]) { return -1; } if (a[0] > b[0]) { return 1; } return 0; });
 
 			this._harsh = new ListSubSection(this, "Harsh", hclothes);
-- 
GitLab