From d00dcb4c804e25160c65258cd572e6149f43ceae Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Fri, 21 Feb 2020 14:29:15 -0500
Subject: [PATCH] basic start to moving functions out of data

---
 js/003-data/miscData.js    | 479 +++++++------------------------------
 src/js/itemAvailability.js | 166 ++++++++++++-
 2 files changed, 252 insertions(+), 393 deletions(-)

diff --git a/js/003-data/miscData.js b/js/003-data/miscData.js
index 4a0891fabf9..3bd3bc81ee5 100644
--- a/js/003-data/miscData.js
+++ b/js/003-data/miscData.js
@@ -1912,43 +1912,43 @@ App.Data.misc = {
 			name: "Maternity lingerie",
 			value: "attractive lingerie for a pregnant woman",
 			fs: "FSRepopulationFocus",
-			isUnlocked: function(slave) { if (V.clothesBoughtMaternityLingerie > 0) { return true; } }
+			rs: "clothesBoughtMaternityLingerie"
 		},
 		{
 			name: "Bunny outfit",
 			value: "a bunny outfit",
 			fs: "FSGenderFundamentalist",
-			isUnlocked: function(slave) { if (V.clothesBoughtBunny > 0) { return true; } }
+			rs: "clothesBoughtBunny"
 		},
 		{
 			name: "Body oil",
 			value: "body oil",
 			fs: "FSPhysicalIdealist",
-			isUnlocked: function(slave) { if (V.clothesBoughtOil > 0) { return true; } }
+			rs: "clothesBoughtOil"
 		},
 		{
 			name: "Chattel habit",
 			value: "a chattel habit",
 			fs: "FSChattelReligionist",
-			isUnlocked: function(slave) { if (V.clothesBoughtHabit > 0) { return true; } }
+			rs: "clothesBoughtHabit"
 		},
 		{
 			name: "Conservative clothing",
 			value: "conservative clothing",
 			fs: "FSPaternalist",
-			isUnlocked: function(slave) { if (V.clothesBoughtConservative > 0) { return true; } }
+			rs: "clothesBoughtConservative"
 		},
 		{
 			name: "Harem gauze",
 			value: "harem gauze",
 			fs: "FSArabianRevivalist",
-			isUnlocked: function(slave) { if (V.clothesBoughtHarem > 0) { return true; } }
+			rs: "clothesBoughtHarem"
 		},
 		{
 			name: "Huipil",
 			value: "a huipil",
 			fs: "FSAztecRevivalist",
-			isUnlocked: function(slave) { if (V.clothesBoughtHuipil > 0) { return true; } }
+			rs: "clothesBoughtHuipil"
 		},
 		{
 			name: "Kimono",
@@ -1964,65 +1964,65 @@ App.Data.misc = {
 			name: "Maternity dress",
 			value: "a maternity dress",
 			fs: "FSRepopulationFocus",
-			isUnlocked: function(slave) { if (V.clothesBoughtMaternityDress > 0) { return true; } }
+			rs: "clothesBoughtMaternityDress"
 		},
 		{
 			name: "Qipao (slutty)",
 			value: "a slutty qipao",
 			fs: "FSChineseRevivalist",
-			isUnlocked: function(slave) { if (V.clothesBoughtQipao > 0) { return true; } }
+			rs: "clothesBoughtQipao"
 		},
 		{
 			name: "Qipao (long)",
 			value: "a long qipao",
 			fs: "FSChineseRevivalist",
-			isUnlocked: function(slave) { if (V.clothesBoughtCultural > 0) { return true; } }
+			rs: "clothesBoughtCultural"
 		},
 		{
 			name: "Stretch pants and a crop-top",
 			value: "stretch pants and a crop-top",
 			fs: "FSHedonisticDecadence",
-			isUnlocked: function(slave) { if (V.clothesBoughtLazyClothes > 0) { return true; } }
+			rs: "clothesBoughtLazyClothes"
 		},
 		{
 			name: "Toga",
 			value: "a toga",
 			fs: "FSRomanRevivalist",
-			isUnlocked: function(slave) { if (V.clothesBoughtToga > 0) { return true; } }
+			rs: "clothesBoughtToga"
 		},
 		{
 			name: "Western clothing",
 			value: "Western clothing",
 			fs: "FSPastoralist",
-			isUnlocked: function(slave) { if (V.clothesBoughtWestern > 0) { return true; } }
+			rs: "clothesBoughtWestern"
 		},
 		{
 			name: "Courtesan dress",
 			value: "a courtesan dress",
 			fs: "FSSlaveProfessionalism",
-			isUnlocked: function(slave) { if (V.clothesBoughtCourtesan > 0) { return true; } }
+			rs: "clothesBoughtCourtesan"
 		},
 		{
 			name: "Bimbo outfit",
 			value: "a bimbo outfit",
 			fs: "FSIntellectualDependency",
-			isUnlocked: function(slave) { if (V.clothesBoughtBimbo > 0) { return true; } }
+			rs: "clothesBoughtBimbo"
 		},
 		{
 			name: "Petite admi outfit",
 			value: "petite admi outfit",
 			fs: "FSPetiteAdmiration",
-			isUnlocked: function(slave) { if (V.clothesBoughtPetite > 0) { return true; } }
-		},
-		{name: "Battlearmor", value: "battlearmor", isUnlocked: function(slave) { if (V.clothesBoughtMilitary > 0) { return true; } }},
-		{name: "Military uniform", value: "a military uniform", isUnlocked: function(slave) { if (V.clothesBoughtMilitary > 0) { return true; } }},
-		{name: "Red Army uniform", value: "a red army uniform", isUnlocked: function(slave) { if (V.clothesBoughtMilitary > 0) { return true; } }},
-		{name: "Battledress", value: "battledress", isUnlocked: function(slave) { if (V.clothesBoughtMilitary > 0) { return true; } }},
-		{name: "Biyelgee costume", value: "a biyelgee costume", isUnlocked: function(slave) { if (V.clothesBoughtCultural > 0) { return true; } }},
-		{name: "Dirndl", value: "a dirndl", isUnlocked: function(slave) { if (V.clothesBoughtCultural > 0) { return true; } }},
-		{name: "Lederhosen", value: "lederhosen", isUnlocked: function(slave) { if (V.clothesBoughtCultural > 0) { return true; } }},
-		{name: "Mounty outfit", value: "a mounty outfit", isUnlocked: function(slave) { if (V.clothesBoughtCultural > 0) { return true; } }},
-		{name: "Hanbok", value: "a hanbok", isUnlocked: function(slave) { if (V.clothesBoughtCultural > 0) { return true; } }},
+			rs: "clothesBoughtPetite"
+		},
+		{name: "Battlearmor", value: "battlearmor", rs: "clothesBoughtMilitary"},
+		{name: "Military uniform", value: "a military uniform", rs: "clothesBoughtMilitary"},
+		{name: "Red Army uniform", value: "a red army uniform", rs: "clothesBoughtMilitary"},
+		{name: "Battledress", value: "battledress", rs: "clothesBoughtMilitary"},
+		{name: "Biyelgee costume", value: "a biyelgee costume", rs: "clothesBoughtCultural"},
+		{name: "Dirndl", value: "a dirndl", rs: "clothesBoughtCultural"},
+		{name: "Lederhosen", value: "lederhosen", rs: "clothesBoughtCultural"},
+		{name: "Mounty outfit", value: "a mounty outfit", rs: "clothesBoughtCultural"},
+		{name: "Hanbok", value: "a hanbok", rs: "clothesBoughtCultural"},
 		{
 			name: "Burqa",
 			value: "a burqa",
@@ -2059,16 +2059,16 @@ App.Data.misc = {
 				}
 			}
 		},
-		{name: "Santa dress", value: "a Santa dress", isUnlocked: function(slave) { if (V.clothesBoughtCostume > 0) { return true; } }},
+		{name: "Santa dress", value: "a Santa dress", rs: "clothesBoughtCostume"},
 
-		{name: "Klan robe", value: "a klan robe", isUnlocked: function(slave) { if (V.clothesBoughtPol > 0) { return true; } }},
-		{name: "Slutty klan robe", value: "a slutty klan robe", isUnlocked: function(slave) { if (V.clothesBoughtPol > 0) { return true; } }},
-		{name: "Schutzstaffel uniform", value: "a schutzstaffel uniform", isUnlocked: function(slave) { if (V.clothesBoughtPol > 0) { return true; } }},
-		{name: "Slutty schutzstaffel uniform", value: "a slutty schutzstaffel uniform", isUnlocked: function(slave) { if (V.clothesBoughtPol > 0) { return true; } }},
+		{name: "Klan robe", value: "a klan robe", rs: "clothesBoughtPol"},
+		{name: "Slutty klan robe", value: "a slutty klan robe", rs: "clothesBoughtPol"},
+		{name: "Schutzstaffel uniform", value: "a schutzstaffel uniform", rs: "clothesBoughtPol"},
+		{name: "Slutty schutzstaffel uniform", value: "a slutty schutzstaffel uniform", rs: "clothesBoughtPol"},
 
-		{name: "Nice business attire", value: "nice business attire", isUnlocked: function(slave) { if (V.clothesBoughtCareer > 0) { return true; } }},
-		{name: "Nurse (nice)", value: "a nice nurse outfit", isUnlocked: function(slave) { if (V.clothesBoughtCareer > 0) { return true; } }},
-		{name: "Police uniform", value: "a police uniform", isUnlocked: function(slave) { if (V.clothesBoughtCareer > 0) { return true; } }},
+		{name: "Nice business attire", value: "nice business attire", rs: "clothesBoughtCareer"},
+		{name: "Nurse (nice)", value: "a nice nurse outfit", rs: "clothesBoughtCareer"},
+		{name: "Police uniform", value: "a police uniform", rs: "clothesBoughtCareer"},
 		{
 			name: "Maid (nice)",
 			value: "a nice maid outfit",
@@ -2079,36 +2079,36 @@ App.Data.misc = {
 			}
 		},
 
-		{name: "Ballgown", value: "a ball gown", isUnlocked: function(slave) { if (V.clothesBoughtDresses > 0) { return true; } }},
-		{name: "Gothic lolita dress", value: "a gothic lolita dress", isUnlocked: function(slave) { if (V.clothesBoughtDresses > 0) { return true; } }},
-
-		{name: "Cybersuit", value: "a cybersuit", isUnlocked: function(slave) { if (V.clothesBoughtBodysuits > 0) { return true; } }},
-		{name: "Latex catsuit", value: "a latex catsuit", isUnlocked: function(slave) { if (V.clothesBoughtBodysuits > 0) { return true; } }},
-
-		{name: "Button-up shirt and panties", value: "a button-up shirt and panties", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Button-up shirt", value: "a button-up shirt", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Cutoffs", value: "cutoffs", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Jeans", value: "jeans", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Leather pants and a tube top", value: "leather pants and a tube top", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Leather pants", value: "leather pants", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Oversized t-shirt", value: "an oversized t-shirt", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Sweater and cutoffs", value: "a sweater and cutoffs", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Sweater and panties", value: "a sweater and panties", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Sweater", value: "a sweater", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "T-shirt and jeans", value: "a t-shirt and jeans", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "T-shirt and panties", value: "a t-shirt and panties", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "T-shirt", value: "a t-shirt", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Tank-top and panties", value: "a tank-top and panties", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Tank-top", value: "a tank-top", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-		{name: "Tube top", value: "a tube top", isUnlocked: function(slave) { if (V.clothesBoughtCasual > 0) { return true; } }},
-
-		{name: "Boyshorts", value: "boyshorts", isUnlocked: function(slave) { if (V.clothesBoughtUnderwear > 0) { return true; } }},
-		{name: "Bra", value: "a bra", isUnlocked: function(slave) { if (V.clothesBoughtUnderwear > 0) { return true; } }},
-		{name: "Kitty lingerie", value: "kitty lingerie", isUnlocked: function(slave) { if (V.clothesBoughtUnderwear > 0) { return true; } }},
-		{name: "Panties and pasties", value: "panties and pasties", isUnlocked: function(slave) { if (V.clothesBoughtUnderwear > 0) { return true; } }},
-		{name: "Skimpy loincloth", value: "a skimpy loincloth", isUnlocked: function(slave) { if (V.clothesBoughtUnderwear > 0) { return true; } }},
-		{name: "Thong", value: "a thong", isUnlocked: function(slave) { if (V.clothesBoughtUnderwear > 0) { return true; } }},
-		{name: "Pasties", value: "pasties", isUnlocked: function(slave) { if (V.clothesBoughtUnderwear > 0) { return true; } }},
+		{name: "Ballgown", value: "a ball gown", rs: "clothesBoughtDresses"},
+		{name: "Gothic lolita dress", value: "a gothic lolita dress", rs: "clothesBoughtDresses"},
+
+		{name: "Cybersuit", value: "a cybersuit", rs: "clothesBoughtBodysuits"},
+		{name: "Latex catsuit", value: "a latex catsuit", rs: "clothesBoughtBodysuits"},
+
+		{name: "Button-up shirt and panties", value: "a button-up shirt and panties", rs: "clothesBoughtCasual"},
+		{name: "Button-up shirt", value: "a button-up shirt", rs: "clothesBoughtCasual"},
+		{name: "Cutoffs", value: "cutoffs", rs: "clothesBoughtCasual"},
+		{name: "Jeans", value: "jeans", rs: "clothesBoughtCasual"},
+		{name: "Leather pants and a tube top", value: "leather pants and a tube top", rs: "clothesBoughtCasual"},
+		{name: "Leather pants", value: "leather pants", rs: "clothesBoughtCasual"},
+		{name: "Oversized t-shirt", value: "an oversized t-shirt", rs: "clothesBoughtCasual"},
+		{name: "Sweater and cutoffs", value: "a sweater and cutoffs", rs: "clothesBoughtCasual"},
+		{name: "Sweater and panties", value: "a sweater and panties", rs: "clothesBoughtCasual"},
+		{name: "Sweater", value: "a sweater", rs: "clothesBoughtCasual"},
+		{name: "T-shirt and jeans", value: "a t-shirt and jeans", rs: "clothesBoughtCasual"},
+		{name: "T-shirt and panties", value: "a t-shirt and panties", rs: "clothesBoughtCasual"},
+		{name: "T-shirt", value: "a t-shirt", rs: "clothesBoughtCasual"},
+		{name: "Tank-top and panties", value: "a tank-top and panties", rs: "clothesBoughtCasual"},
+		{name: "Tank-top", value: "a tank-top", rs: "clothesBoughtCasual"},
+		{name: "Tube top", value: "a tube top", rs: "clothesBoughtCasual"},
+
+		{name: "Boyshorts", value: "boyshorts", rs: "clothesBoughtUnderwear"},
+		{name: "Bra", value: "a bra", rs: "clothesBoughtUnderwear"},
+		{name: "Kitty lingerie", value: "kitty lingerie", rs: "clothesBoughtUnderwear"},
+		{name: "Panties and pasties", value: "panties and pasties", rs: "clothesBoughtUnderwear"},
+		{name: "Skimpy loincloth", value: "a skimpy loincloth", rs: "clothesBoughtUnderwear"},
+		{name: "Thong", value: "a thong", rs: "clothesBoughtUnderwear"},
+		{name: "Pasties", value: "pasties", rs: "clothesBoughtUnderwear"},
 
 		{
 			name: "Leather pants and pasties",
@@ -2146,9 +2146,9 @@ App.Data.misc = {
 				}
 			}
 		},
-		{name: "Sport shorts and a sports bra", value: "sport shorts and a sports bra", isUnlocked: function(slave) { if (V.clothesBoughtSports > 0) { return true; } }},
-		{name: "Sport shorts", value: "sport shorts", isUnlocked: function(slave) { if (V.clothesBoughtSports > 0) { return true; } }},
-		{name: "Sports bra", value: "a sports bra", isUnlocked: function(slave) { if (V.clothesBoughtSports > 0) { return true; } }},
+		{name: "Sport shorts and a sports bra", value: "sport shorts and a sports bra", rs: "clothesBoughtSports"},
+		{name: "Sport shorts", value: "sport shorts", rs: "clothesBoughtSports"},
+		{name: "Sports bra", value: "a sports bra", rs: "clothesBoughtSports"},
 		{
 			name: "Sport shorts and a t-shirt",
 			value: "sport shorts and a t-shirt",
@@ -2158,11 +2158,11 @@ App.Data.misc = {
 				}
 			}
 		},
-		{name: "Pony outfit (nice)", value: "a nice pony outfit", isUnlocked: function(slave) { if (V.clothesBoughtPony > 0) { return true; } }},
-		{name: "Pony outfit (slutty)", value: "a slutty pony outfit", isUnlocked: function(slave) { if (V.clothesBoughtPony > 0) { return true; } }},
+		{name: "Pony outfit (nice)", value: "a nice pony outfit", rs: "clothesBoughtPony"},
+		{name: "Pony outfit (slutty)", value: "a slutty pony outfit", rs: "clothesBoughtPony"},
 
-		{name: "Monokini", value: "a monokini", isUnlocked: function(slave) { if (V.clothesBoughtSwimwear > 0) { return true; } }},
-		{name: "One-piece swimsuit", value: "a one-piece swimsuit", isUnlocked: function(slave) { if (V.clothesBoughtSwimwear > 0) { return true; } }},
+		{name: "Monokini", value: "a monokini", rs: "clothesBoughtSwimwear"},
+		{name: "One-piece swimsuit", value: "a one-piece swimsuit", rs: "clothesBoughtSwimwear"},
 
 		{
 			name: "Striped bra",
@@ -2225,7 +2225,7 @@ App.Data.misc = {
 			name: "Chains",
 			value: "chains",
 			fs: "FSDegradationist",
-			isUnlocked: function(slave) { if (V.clothesBoughtChains > 0) { return true; } }
+			rs: "clothesBoughtChains"
 		},
 		{name: "Go naked", value: "no clothing"},
 		{name: "Penitent nun", value: "a penitent nuns habit"},
@@ -2302,86 +2302,30 @@ App.Data.misc = {
 		{name: "None", value: "none"},
 		{name: "Tight corset", value: "a corset"},
 		{name: "Extreme corset", value: "an extreme corset"},
-		{
-			name: "Supportive band",
-			value: "a support band",
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.belly > 10000) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
-		},
+		{name: "Supportive band", value: "a support band"},
 		{
 			name: "1st Trimester belly",
 			value: "a small empathy belly",
 			fs: "FSRepopulationFocus",
-			rs: "boughtBelly",
-			isUnlocked: function(slave) {
-				if (V.boughtBelly > 0) {
-					if (slave) {
-						if (slave.belly < 1500 && slave.weight < 130) {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "boughtBelly"
 		},
 		{
 			name: "2nd Trimester belly",
 			value: "a medium empathy belly",
 			fs: "FSRepopulationFocus",
-			rs: "boughtBelly",
-			isUnlocked: function(slave) {
-				if (V.boughtBelly > 0) {
-					if (slave) {
-						if (slave.belly < 1500 && slave.weight < 130) {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "boughtBelly"
 		},
 		{
 			name: "3rd Trimester belly",
 			value: "a large empathy belly",
 			fs: "FSRepopulationFocus",
-			rs: "boughtBelly",
-			isUnlocked: function(slave) {
-				if (V.boughtBelly > 0) {
-					if (slave) {
-						if (slave.belly < 1500 && slave.weight < 130) {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "boughtBelly"
 		},
 		{
 			name: "3rd Trimester twins belly",
 			value: "a huge empathy belly",
 			fs: "FSRepopulationFocus",
-			rs: "boughtBelly",
-			isUnlocked: function(slave) {
-				if (V.boughtBelly > 0) {
-					if (slave) {
-						if (slave.belly < 1500 && slave.weight < 130) {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "boughtBelly"
 		}
 	],
 
@@ -2396,112 +2340,34 @@ App.Data.misc = {
 		{
 			name: "Smart bullet vibrator",
 			value: "smart bullet vibrator",
-			isUnlocked: function(slave) {
-				if (V.toysBoughtSmartVibes > 0) {
-					return true;
-				}
-			}
+			rs: "toysBoughtSmartVibes"
 		},
 		{
 			name: "Dildo",
-			value: "dildo",
-			isUnlocked: function(slave) {
-				if (slave.vagina < 0) {
-					return false;
-				} else {
-					return true;
-				}
-			}
+			value: "dildo"
 		},
 		{
 			name: "Long dildo",
 			value: "long dildo",
-			rs: "buyBigDildos",
-			isUnlocked: function(slave) {
-				if (V.buyBigDildos > 0) {
-					if (slave) {
-						if (slave.vagina < 0) {
-							return false;
-						} else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
-							return "Elites frown on this";
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "buyBigDildos"
 		},
 		{
 			name: "Large dildo",
-			value: "large dildo",
-			isUnlocked: function(slave) {
-				if (slave.vagina < 0) {
-					return false;
-				} else {
-					return true;
-				}
-			}
+			value: "large dildo"
 		},
 		{
 			name: "Long, large dildo",
 			value: "long, large dildo",
-			rs: "buyBigDildos",
-			isUnlocked: function(slave) {
-				if (V.buyBigDildos > 0) {
-					if (slave) {
-						if (slave.vagina < 0) {
-							return false;
-						} else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
-							return "Elites frown on this";
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "buyBigDildos"
 		},
 		{
 			name: "Huge dildo",
-			value: "huge dildo",
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.vagina < 0) {
-						return false;
-					} else if (slave.vagina < 2) {
-						return `Slave's vagina is too small for this right now`;
-					} else {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
+			value: "huge dildo"
 		},
 		{
 			name: "Long, huge dildo",
 			value: "long, huge dildo",
-			rs: "buyBigDildos",
-			isUnlocked: function(slave) {
-				if (V.buyBigDildos > 0) {
-					if (slave) {
-						if (slave.vagina < 0) {
-							return false;
-						} else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
-							return "Elites frown on this";
-						} else if (slave.vagina < 2) {
-							return `Slave's vagina is too small for this right now`;
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "buyBigDildos"
 		}
 	],
 
@@ -2510,23 +2376,6 @@ App.Data.misc = {
 		{
 			name: "Vibrating attachment",
 			value: "vibrator",
-			isUnlocked: function(slave) {
-				if (V.toysBoughtVaginalAttachments > 0) {
-					if (slave) {
-						if (slave.vagina < 0) {
-							return false;
-						} else if (slave.vaginalAccessory === "none") {
-							return "No vaginal accessory to attach it to";
-						} else if (slave.vaginalAccessory === "bullet vibrator" || slave.vaginalAccessory === "smart bullet vibrator") {
-							return "Vaginal accessory already vibrates";
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
 		}
 	],
 
@@ -2534,37 +2383,11 @@ App.Data.misc = {
 		{name: "None", value: "none"},
 		{
 			name: "Bullet vibrator",
-			value: "bullet vibrator",
-			isUnlocked: function(slave) {
-				if (V.toysBoughtVaginalAttachments > 0) { // TODO: copying from old slave interact, is this correct?
-					if (slave) {
-						if (slave.dick < 1) {
-							return false;
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			value: "bullet vibrator"
 		},
 		{
 			name: "Smart bullet vibrator",
-			value: "smart bullet vibrator",
-			isUnlocked: function(slave) {
-				if (V.toysBoughtVaginalAttachments > 0) { // TODO: copying from old slave interact, is this correct?
-					if (slave) {
-						if (slave.dick < 1) {
-							return false;
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			value: "smart bullet vibrator"
 		}
 	],
 
@@ -2579,20 +2402,7 @@ App.Data.misc = {
 		{
 			name: "Long plug",
 			value: "long plug",
-			rs: "toysBoughtButtPlugs",
-			isUnlocked: function(slave) {
-				if (V.toysBoughtButtPlugs > 0) {
-					if (slave) {
-						if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
-							return "Elites frown on this";
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
+			rs: "toysBoughtButtPlugs"
 		},
 		{
 			name: "Large plug",
@@ -2602,54 +2412,15 @@ App.Data.misc = {
 			name: "Long, large plug",
 			value: "long, large plug",
 			rs: "toysBoughtButtPlugs",
-			isUnlocked: function(slave) {
-				if (V.toysBoughtButtPlugs > 0) {
-					if (slave) {
-						if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
-							return "Elites frown on this";
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
 		},
 		{
 			name: "Huge plug",
 			value: "huge plug",
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.anus < 2) {
-						return `Slave's anus is too small for this right now`;
-					} else {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Long, huge plug",
 			value: "long, huge plug",
 			rs: "toysBoughtButtPlugs",
-			isUnlocked: function(slave) {
-				if (V.toysBoughtButtPlugs > 0) {
-					if (slave) {
-						if (slave.anus < 2) {
-							return `Slave's anus is too small for this right now`;
-						} else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
-							return "Elites frown on this";
-						} else {
-							return true;
-						}
-					} else {
-						return true;
-					}
-				}
-			}
 		}
 	],
 
@@ -2692,15 +2463,6 @@ App.Data.misc = {
 				chastityPenis: 0,
 				chastityVagina: 1
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.vagina > -1) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Combined chastity belt",
@@ -2711,15 +2473,6 @@ App.Data.misc = {
 				chastityPenis: 0,
 				chastityVagina: 1
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.vagina > -1) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Chastity cage",
@@ -2730,15 +2483,6 @@ App.Data.misc = {
 				chastityPenis: 1,
 				chastityVagina: 0
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.dick > 0) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Combined chastity cage",
@@ -2749,15 +2493,6 @@ App.Data.misc = {
 				chastityPenis: 1,
 				chastityVagina: 0
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.dick > 0) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Genital chastity",
@@ -2768,15 +2503,6 @@ App.Data.misc = {
 				chastityPenis: 1,
 				chastityVagina: 1
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.vagina > -1 && slave.dick > 0) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Full chastity",
@@ -2787,47 +2513,20 @@ App.Data.misc = {
 				chastityPenis: 1,
 				chastityVagina: 1
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.vagina > -1 && slave.dick > 0) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Choose own chastity",
 			value: "choose own chastity",
 			updateSlave: {
-				choosesOwnChastity: 1,
+				choosesOwnChastity: 1
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.choosesOwnChastity !== 1) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 		{
 			name: "Revoke choosing own chastity",
 			value: "revoke choosing own chastity",
 			updateSlave: {
-				choosesOwnChastity: 0,
+				choosesOwnChastity: 0
 			},
-			isUnlocked: function(slave) {
-				if (slave) {
-					if (slave.choosesOwnChastity > 0) {
-						return true;
-					}
-				} else {
-					return true;
-				}
-			}
 		},
 	],
 
diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js
index b84cedd4432..2347815d0ff 100644
--- a/src/js/itemAvailability.js
+++ b/src/js/itemAvailability.js
@@ -267,7 +267,7 @@ window.isClothingAccessible = (function() {
 			console.log(string);
 			return false; /* couldn't be found */
 		}
-		return isAvailable(item, slave);
+		return isAvailable(item, category, slave);
 	}
 	/**
 	 * Returns array of wearable clothing in format [name, value], basically player facing / game data.
@@ -286,7 +286,7 @@ window.isClothingAccessible = (function() {
 		});
 		return array;
 	}
-	function isAvailable(item, slave) {
+	function isAvailable(item, category, slave) {
 		if (!(item.hasOwnProperty("isUnlocked")) && !(item.hasOwnProperty("fs")) && !(item.hasOwnProperty("rs"))) {
 			// No restriction, this clothing item is available to everyone
 			return true;
@@ -301,11 +301,171 @@ window.isClothingAccessible = (function() {
 				return true;
 			}
 		}
-		if (item.hasOwnProperty("isUnlocked")) {
+		if (item.hasOwnProperty("isUnlocked")) { //Maybe remove
 			return item.isUnlocked(slave);
 		}
+		if (slave) {
+			return isAvailableForSlave(item, slave);
+		}
 		return false;
 	}
+	function isAvailableForSlave(item, slave) {
+		switch (category) {
+			case "clothing":
+			case "clothes":
+				switch (item.value) {
+
+				}
+				break;
+			case "collar":
+				break;
+			case "bellyAccessory": {
+				switch (item.value) {
+					case "a support band":
+						if (slave.belly > 10000) {
+							return true;
+						} else {
+							return `Slave belly too small for this`;
+						}
+					case "a small empathy belly":
+					case "a medium empathy belly":
+					case "a large empathy belly":
+					case "a huge empathy belly":
+						if (slave.belly < 1500 && slave.weight < 130) {
+							return true;
+						} else {
+							return `Slave belly too big for this`;
+						}
+					default:
+						return true;
+				}
+			}
+			case "buttplug": {
+				switch (item.value) {
+					case "huge plug":
+						if (slave.anus < 2) {
+							return `Slave's anus is too small for this right now`;
+						} else {
+							return true;
+						}
+					case "long plug":
+					case "long, large plug":
+						if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
+							return "Elites frown on this";
+						} else {
+							return true;
+						}
+					case "long, huge plug":
+						if (slave.anus < 2) {
+							return `Slave's anus is too small for this right now`;
+						} else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
+							return "Elites frown on this";
+						} else {
+							return true;
+						}
+					default:
+						return true;
+				}
+			}
+			case "buttplugAttachment":
+				break;
+			case "vaginalAccessory": {
+				if (slave.vagina < 0) {
+					return false;
+				}
+				switch (item.value) {
+					case "huge dildo":
+						if (slave.vagina < 2) {
+							return `Slave's vagina is too small for this right now`;
+						} else {
+							return true;
+						}
+					case "long dildo":
+					case "long, large dildo":
+						if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
+							return "Elites frown on this";
+						} else {
+							return true;
+						}
+					case "long, huge dildo":
+						if (slave.vagina < 2) {
+							return `Slave's vagina is too small for this right now`;
+						} else if (!(slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) {
+							return "Elites frown on this";
+						} else {
+							return true;
+						}
+					default:
+						return true;
+				}
+			}
+			case "vaginalAttachment": {
+				if (slave.vagina < 0) {
+					return false;
+				}
+				switch (item.value) {
+					case "vibrator":
+						if (slave.vaginalAccessory === "none") {
+							return "No vaginal accessory to attach it to";
+						} else if (slave.vaginalAccessory === "bullet vibrator" || slave.vaginalAccessory === "smart bullet vibrator") {
+							return "Vaginal accessory already vibrates";
+						} else {
+							return true;
+						}
+				}
+				break;
+			}
+			case "dickAccessory":
+				if (slave.dick < 1) {
+					return false;
+				}
+				return true;
+			case "shoes":
+				break;
+			case "chastity": {
+				switch (item.value) {
+					case "chastity belt":
+					case "combined chastity belt":
+						if (slave.vagina > -1) {
+							return true;
+						} else {
+							return false;
+						}
+					case "chastity cage":
+					case "combined chastity cage":
+						if (slave.dick > 0) {
+							return true;
+						} else {
+							return false;
+						}
+					case "genital chastity":
+					case "full chastity":
+						if (slave.vagina > -1 && slave.dick > 0) {
+							return true;
+						} else {
+							return false;
+						}
+					case "choose own chastity":
+						if (slave.choosesOwnChastity !== 1) {
+							return true;
+						} else {
+							return false;
+						}
+					case "revoke choosing own chastity":
+						if (slave.choosesOwnChastity > 0) {
+							return true;
+						} else {
+							return false;
+						}
+					default:
+						return true;
+				}
+			}
+			default:
+				console.log(`made a category for ${category} automatically, may need to define this by hand`);
+				break;
+		}
+	}
 })();
 
 /**
-- 
GitLab