code:
:: Widgets Outfits [widget]
<<widget "listoutfits">>

<<radiobutton "$delete_outfit" "none" checked>> Wear | <<radiobutton "$delete_outfit" 1>> Delete | <<radiobutton "$delete_outfit" 2>> Overwrite | <<link Edit>><<overlayReplace "outfitEditor">><</link>>

<<for _i to 0; _i lt $outfit.length; _i++>>
	<<if $outfit[_i].location and $outfit[_i].location isnot $wardrobe_location>>
		<<continue>>
	<</if>>

		<<capture _i>>
			<<link `$outfit[_i].name + ($outfit[_i].colors is false? "" : " [C]") + ($outfit[_i].location is undefined ? "" : " [L]")`>>
				<<set $wear_outfit = _i>>
				<<updatewardrobe "outfits">>
			<</link>> |
		<</capture>>

<</for>>
<</widget>>

<<widget "listoutfitsPassage">>
<<set $wardrobe_location to $args[0]>>
<<wardrobeSelection true>>
<<for _i to 0; _i lt $outfit.length; _i++>>
	<<if $outfit[_i].location and $outfit[_i].location isnot $wardrobe_location>>
		<<continue>>
	<</if>>
	<<if !$outfit[_i].type.includes("swim") and !$outfit[_i].type.includes("sleep")>>
		<<print '<<link [["Wear "+$outfit[_i].name+($outfit[_i].colors is false? "" : " [C]")|$passage]]>><<set $eventskip to 1>><<set $wear_outfit to ' + _i + '>><</link>>'>>

	<</if>>
<</for>>
<</widget>>

<<widget "listsleepoutfits">>
<<switch $args[0]>>
	<<case "Farm Bed">>
		<<set _passage to $args[0]>>
		<<set $wardrobe_location to "alexFarm">>
		<<set $storeLocation to "Farm Bed">>
	<<case "prison bed">>
		<<set _passage to 'Prison Bed'>>
		<<set $wardrobe_location to "prison">>
		<<set $storeLocation to "prison bed">>
	<<case "cult bed">>
		<<set _passage to 'Cult Bed'>>
		<<set $wardrobe_location to "Cult Wardrobe">>
		<<set $storeLocation to "cult bed">>
	<<default>>
		<<set _passage to "Bed">>
		<<set $wardrobe_location to "wardrobe">>
		<<set $storeLocation to "bed">>
<</switch>>
<<wardrobeSelection true>>
<<if $alwaysSleepNaked isnot true>>
	<<for _i to 0; _i lt $outfit.length; _i++>>
		<<if $outfit[_i].type.includes("sleep")>>
			<<bedicon>><<print '<<link [["Wear "+$outfit[_i].name+($outfit[_i].colors is false? "" : " [C]") + " and climb in bed"|"'+_passage+'"]]>><<set $wear_outfit to ' + _i + '>><</link>>'>>

		<</if>>
	<</for>>
<<else>>
	<<if $possessed>>
		The slime in your head is silent.

	<<else>>
		The slime is not allowing you to sleep with anything on.

	<</if>>
<</if>>
<</widget>>

<<widget "listswimoutfits">>
<<set $wardrobe_location to $args[0]>>
<<wardrobeSelection true>>
<<for _i to 0; _i lt $outfit.length; _i++>>
	<<if $outfit[_i].location and $outfit[_i].location isnot $wardrobe_location>>
		<<continue>>
	<</if>>
	<<if $outfit[_i].type.includes("swim")>>
		<<print '<<link [["Wear "+$outfit[_i].name+($outfit[_i].colors is false? "" : " [C]")|$passage]]>><<set $eventskip to 1>><<set $wear_outfit to ' + _i + '>><<set $storeLocation to "'+$args[0]+'">><</link>>'>>

	<</if>>
<</for>>
<</widget>>

<<widget "radiooutfits">>
<<for _i to 0; _i lt $outfit.length; _i++>>
	<<if $outfit[_i].location and $outfit[_i].location isnot $wardrobe_location>>
		<<continue>>
	<</if>>
	<<print 'Wear $outfit[_i].name <<radiobutton "$wear_outfit" "' + _i + '">>'>> |
<</for>>
Dress like you were <<radiobutton "$wear_outfit" "clotheson" checked>>
<</widget>>

<<widget "deleteoutfit">>
<<if $delete_outfit is 1 and $wear_outfit isnot "none">>
<<set $outfit.deleteAt($wear_outfit)>>
<<set $wear_outfit to "none">>
<</if>>
<</widget>>

<<widget "wearoutfit">>
<<if $wardrobe_location is "wardrobe" or $wardrobes[$wardrobe_location] is undefined>>
	<<set _selectedWardrobe to $wardrobe>>
<<else>>
	<<set _selectedWardrobe to $wardrobes[$wardrobe_location]>>
<</if>>
<<updateWornClothingLocation $wardrobe_location>>
<<deleteoutfit>>
<<overwriteoutfit>>
<<set $delete_outfit to "none">>

<<if $wear_outfit is "clotheson">>
	<<storeon $storeLocation>>
<<elseif $wear_outfit isnot "none">>
	<<set _equip to ["over_upper","over_lower","upper", "lower", "under_upper", "under_lower","over_head","head", "face", "neck", "hands", "legs", "feet"]>>
	<<set _equipSkip to {"over_upper":false, "over_lower":false, "upper":false, "lower":false, "under_upper":false, "under_lower":false, "over_head":false, "head":false, "face":false, "neck":false, "hands":false, "legs":false, "feet":false}>>
	<<set _storeItemSkip to {"over_upper":false, "over_lower":false, "upper":false, "lower":false, "under_upper":false, "under_lower":false, "over_head":false, "head":false, "face":false, "neck":false, "hands":false, "legs":false, "feet":false}>>
	<<set _equipDamageValue to {"over_upper":3, "over_lower":3, "upper":3, "lower":3, "under_upper":3, "under_lower":3, "over_head":1, "head":1, "face":1, "neck":1, "hands":1, "legs":1, "feet":1}>>
	<<set _corruptionEquipSkip to ["over_upper","over_lower","upper", "lower", "under_upper", "under_lower"]>>
	<<set _towels to ["towel top","large towel","towel skirt"]>>
	<<set _notEquipped to {}>>

	<<for _i to 0; _i lt _equip.length; _i++>>
		/*Skip slots that have been equipped with*/
		<<if _equipSkip[_equip[_i]] is true>>
			<<continue>>
		<</if>>
		/*Skip slots that have not been defined*/
		<<if $outfit[$wear_outfit][_equip[_i]] is undefined>>
			<<continue>>
		<</if>>

		/*Check for items that are cursed*/
		<<unset _preventItemEquip>>
		<<if $worn[_equip[_i]].cursed is 1>>
			<<set _preventItemEquip to true>>
		<</if>>
		<<set _outfitPrimaryOutfit to $worn[_equip[_i]].outfitPrimary>>
		<<if _outfitPrimaryOutfit isnot undefined>>
			<<for _labelOutfit, _valueOutfit range _outfitPrimaryOutfit>>
				<<if $worn[_labelOutfit].cursed is 1>>
					<<set _preventItemEquip to true>>
				<</if>>
			<</for>>
		<</if>>

		<<set $_storeLocation to ($storeLocation ? $storeLocation : $wardrobe_location)>>

		<<if _preventItemEquip is true>>
			<<if $outfit[$wear_outfit][_equip[_i]] is "naked">>
				<<set _notEquipped[_equip[_i]] to {"name": setup.clothes[_equip[_i]][clothesIndex(_equip[_i],$worn[_equip[_i]])].name_cap, "reason": "cursed unequip"}>>
			<<else>>
				<<set _notEquipped[_equip[_i]] to {"name": $outfit[$wear_outfit][_equip[_i]], "reason": "cursed slot"}>>
			<</if>>
		<<else>>
			<<if $outfit[$wear_outfit][_equip[_i]] is "naked">>
				<<generalUndress $_storeLocation _equip[_i]>>
			<<elseif _towels.includes($outfit[$wear_outfit][_equip[_i]])>>
				<<generalUndress $_storeLocation _equip[_i]>>
				<<if $worn[_equip[_i]].name is "naked">>
					<<switch $outfit[$wear_outfit][_equip[_i]]>>
						<<case "towel top">>
							<<set $worn.upper to clone(setup.clothes.upper[3])>>
						<<case "large towel">>
							<<generalUndress $_storeLocation "lower">>
							<<if $worn.lower.name is "naked">>
								<<set $worn.upper to clone(setup.clothes.upper[14])>>
								<<set $worn.lower to clone(setup.clothes.lower[15])>>
								<<set _equipSkip.lower to true>>
							<</if>>
						<<case "towel skirt">>
							<<set $worn.lower to clone(setup.clothes.lower[3])>>
					<</switch>>
				<</if>>
			<<else>>
				<<set _foundEquip to null>><<set _lastResort to null>><<unset _outFitPieces>>
				<<for _j to 0; _j lt _selectedWardrobe[_equip[_i]].length; _j++>>
					<<if $outfit[$wear_outfit][_equip[_i]] is _selectedWardrobe[_equip[_i]][_j].name>>
						/*Check for saved colors in clothing set*/
						<<if $outfit[$wear_outfit].colors isnot false and $outfit[$wear_outfit].colors isnot undefined>>
							<<if $outfit[$wear_outfit].colors[_equip[_i]][0] isnot _selectedWardrobe[_equip[_i]][_j].colour or $outfit[$wear_outfit].colors[_equip[_i]][1] isnot _selectedWardrobe[_equip[_i]][_j].accessory_colour>>
								<<continue>>
							<</if>>
							<<if _selectedWardrobe[_equip[_i]][_j].colour is "custom">>
								<<if _selectedWardrobe[_equip[_i]][_j].colourCustom isnot undefined or $outfit[$wear_outfit].colors[_equip[_i]+"custom"][0] isnot undefined>>
									<<if _selectedWardrobe[_equip[_i]][_j].colourCustom isnot $outfit[$wear_outfit].colors[_equip[_i]+"custom"][0]>>
										<<continue>>
									<</if>>
								<</if>>
							<</if>>
							<<if _selectedWardrobe[_equip[_i]][_j].accessory_colour is "custom">>
								<<if _selectedWardrobe[_equip[_i]][_j].colourCustom isnot undefined or $outfit[$wear_outfit].colors[_equip[_i]+"custom"][1] isnot undefined>>
									<<if _selectedWardrobe[_equip[_i]][_j].accessory_colourCustom isnot $outfit[$wear_outfit].colors[_equip[_i]+"custom"][1]>>
										<<continue>>
									<</if>>
								<</if>>
							<</if>>
						<</if>>
						/*Check for slime corruption*/
						<<if _corruptionEquipSkip.includes(_equip[_i])>>
							<<if $corruption_slime gte 80 and $willpower lt 800 and _selectedWardrobe[_equip[_i]][_j].reveal lt 500 and !_selectedWardrobe[_equip[_i]][_j].type.includesAny("school", "event")>>
								<<set _notEquipped[_equip[_i]] to {"name": $outfit[$wear_outfit][_equip[_i]], "reason": "corruption_slime_deny"}>>
								<<break>>
							<</if>>
						<</if>>

						/*Finds the least damaged outfit if the current clothing item is the main part and sets it as a last resort incase an undamaged one isnt found*/
						<<unset _outfitPrimaryWearOutfit>>
						<<set _damage to 0>>
						<<set _outfitPrimaryWearOutfit to _selectedWardrobe[_equip[_i]][_j].outfitPrimary>>
						<<if _outfitPrimaryWearOutfit isnot undefined>>
							/*Check for damaged parts*/
							<<for _labelWO, _valueWO range _outfitPrimaryWearOutfit>>
								<<if _valueWO is "broken">>
									<<set _damage += _equipDamageValue[_labelWO]>>
								<</if>>
							<</for>>
							<<if _lastResort is null and _damage gt 0>>
								<<set _lastResort to {}>>
								<<set _lastResort to {
									damage: clone(_damage),
									id: clone(_j)
								}>>
							<<elseif _damage gt 0>>
								<<if _damage lt _lastResort.damage>>
									<<set _lastResort to {
										damage: clone(_damage),
										id: clone(_j)
									}>>
								<</if>>
							<</if>>
							<<if _damage gt 0>>
								<<continue>>
							<</if>>
						<</if>>
						<<if _damage is 0>>
							<<set _foundEquip to {}>>
							<<set _foundEquip[_equip[_i]] to clone(_j)>>
						<</if>>
						<<break>>
					<</if>>
				<</for>>

				/*If the main outfit has not been found, use the last resort*/
				<<if _foundEquip is null and _lastResort isnot null>>
					<<if !($worn[_equip[_i]].name is $outfit[$wear_outfit][_equip[_i]] and $worn[_equip[_i]].one_piece is 1)>>
						<<set _foundEquip to {}>>
						<<set _foundEquip[_equip[_i]] to _lastResort.id>>
					<</if>>
				<</if>>

				/*Ensure at this point, the main piece of clothing has been found*/
				<<if _foundEquip isnot null>>
					/*Undress equip*/
					<<generalUndress $_storeLocation _equip[_i]>>

					/*Find all the outfit pieces now the main least damaged piece has been found if the clothing is part of an outfit*/
					<<unset _outfitPrimaryWearOutfit>>
					<<set _outfitPrimaryWearOutfit to _selectedWardrobe[_equip[_i]][_foundEquip[_equip[_i]]].outfitPrimary>>
					<<if _outfitPrimaryWearOutfit isnot undefined>>
						<<for _labelWO, _valueWO range _outfitPrimaryWearOutfit>>
							<<if _valueWO isnot "broken">>
								<<if !_storeItemSkip[_labelWO]>>
									<<generalUndress $_storeLocation _labelWO>>
								<</if>>
								<<for _k to 0; _k lt _selectedWardrobe[_labelWO].length; _k++>>
									<<if _valueWO is _selectedWardrobe[_labelWO][_k].name>>
										/*Skip broken pieces*/
										<<if _selectedWardrobe[_labelWO][_k].outfitSecondary[1] is "broken">>
											<<continue>>
										<</if>>
										/*Skip items that don't have matching colours*/
										<<if _selectedWardrobe[_equip[_i]][_j].colour isnot _selectedWardrobe[_labelWO][_k].colour or _selectedWardrobe[_equip[_i]][_j].accessory_colour isnot _selectedWardrobe[_labelWO][_k].accessory_colour>>
											<<continue>>
										<</if>>
										<<if _selectedWardrobe[_equip[_i]][_j].colour is "custom">>
											<<if _selectedWardrobe[_equip[_i]][_j].colourCustom isnot undefined and _selectedWardrobe[_labelWO][_k].colourCustom isnot undefined>>
												<<if _selectedWardrobe[_equip[_i]][_j].colourCustom isnot _selectedWardrobe[_labelWO][_k].colourCustom>>
													<<continue>>
												<</if>>
											<<else>>
												<<continue>>
											<</if>>
										<</if>>
										<<if _selectedWardrobe[_equip[_i]][_j].accessory_colour is "custom">>
											<<if _selectedWardrobe[_equip[_i]][_j].colourCustom isnot undefined and _selectedWardrobe[_labelWO][_k].accessory_colourCustom isnot undefined>>
												<<if _selectedWardrobe[_equip[_i]][_j].accessory_colourCustom isnot _selectedWardrobe[_labelWO][_k].accessory_colourCustom>>
													<<continue>>
												<</if>>
											<<else>>
												<<continue>>
											<</if>>
										<</if>>
										<<if _outFitPieces is undefined>>
											<<set _outFitPieces to {}>>
										<</if>>
										<<set _foundEquip[clone(_labelWO)] to clone(_k)>>
										<<set _equipSkip[_labelWO] to true>>
										<<break>>
									<</if>>
									<<if _k is _selectedWardrobe[_labelWO].length - 1>>
										/*None were found, error in code/save?*/
										<<set _notEquipped[_equip[_i]] to {"name": $outfit[$wear_outfit][_equip[_i]], "reason": "not found piece"}>>
									<</if>>
								<</for>>
							<</if>>
						<</for>>
					<</if>>
					/*Equip all the clothing items*/

					<<for _labelWO, _valueWO range _foundEquip>>
						<<set $worn[_labelWO] to clone(_selectedWardrobe[_labelWO][_valueWO])>>
						<<set $worn[_labelWO].lastTaken to clone($wardrobe_location)>>
						<<set _selectedWardrobe[_labelWO].deleteAt(_valueWO)>>
						<<resetClothingState _labelWO>>
					<</for>>
				<<else>>
					<<if $worn[_equip[_i]].name is $outfit[$wear_outfit][_equip[_i]]>>
						<<set _notEquipped[_equip[_i]] to {"name": $outfit[$wear_outfit][_equip[_i]], "reason": "not found replacement"}>>
						<<if $wardrobe_location isnot "wardrobe">>
							<<set _makeTempClothing to 1>>
							<<storeItem $wardrobe_location _equip[_i]>>
						<</if>>
					<<else>>
						<<set _notEquipped[_equip[_i]] to {"name": $outfit[$wear_outfit][_equip[_i]], "reason": "not found"}>>
						<<if $wardrobe_location isnot "wardrobe" and $worn[_equip[_i]].name isnot "naked">>
							<<set _makeTempClothing to 1>>
							<<storeItem $wardrobe_location _equip[_i]>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<</for>>
<</if>>

<<if $wear_outfit isnot "none">>
	<<set _keys to Object.keys(_notEquipped)>>
	<<if _keys.length gt 0>>
		<<set _resultStrings to {}>>
		<<if $wardrobes[$wardrobe_location] is undefined>>
			<<set _locationName to "wardrobe">>
		<<else>>
			<<set _locationName to $wardrobe_location>>
		<</if>>
		<<set _wardrobeName to $wardrobes[_locationName].name + (!$wardrobes[_locationName].name.includes("locker") ? " wardrobe" : "")>>
		<<for _i to 0; _i lt _keys.length; _i++>>
			<<switch _notEquipped[_keys[_i]].reason>>
				<<case "not found">>
					<<if _resultStrings.notFound is undefined>>
						<<set _resultStrings.notFound to {
							"start": "You were unable to find any ",
							"end": " in your " + _wardrobeName + ".",
							"count": 0,
							"color": "purple"
						}>>
					<</if>>
					<<set _resultStrings.notFound[_resultStrings.notFound.count] to _notEquipped[_keys[_i]].name>>
					<<set _resultStrings.notFound.count++>>
				<<case "not found replacement">>
					<<if _resultStrings.notFoundReplacement is undefined>>
						<<set _resultStrings.notFoundReplacement to {
							"start": "You were unable to find any ",
							"end": " in your " + _wardrobeName + " to replace what you're already wearing.",
							"count": 0,
							"color": "lewd"
						}>>
					<</if>>
					<<set _resultStrings.notFoundReplacement[_resultStrings.notFoundReplacement.count] to _notEquipped[_keys[_i]].name>>
					<<set _resultStrings.notFoundReplacement.count++>>
				<<case "corruption_slime_deny">>
					<<if _resultStrings.corruption_slime_deny is undefined>>
						<<set _resultStrings.corruption_slime_deny to {
							"start": "You were unable to equip your ",
							"end": " as the slime in your ear did not permit it.",
							"count": 0,
							"color": "red"
						}>>
					<</if>>
					<<set _resultStrings.corruption_slime_deny[_resultStrings.corruption_slime_deny.count] to _notEquipped[_keys[_i]].name>>
					<<set _resultStrings.corruption_slime_deny.count++>>
				<<case "cursed slot">>
					<<if _resultStrings.cursed is undefined>>
						<<set _resultStrings.cursed to {
							"start": "You were unable to equip your ",
							"end": " due to not being able to remove what you're already wearing.",
							"count": 0,
							"color": "red"
						}>>
					<</if>>
					<<set _resultStrings.cursed[_resultStrings.cursed.count] to _notEquipped[_keys[_i]].name>>
					<<set _resultStrings.cursed.count++>>
				<<case "cursed unequip">>
					<<if _resultStrings.cursedUnequip is undefined>>
						<<set _resultStrings.cursedUnequip to {
							"start": "You were unable to unequip your ",
							"end": " due to not being able to remove it on your own.",
							"count": 0,
							"color": "red"
						}>>
					<</if>>
					<<set _resultStrings.cursedUnequip[_resultStrings.cursedUnequip.count] to _notEquipped[_keys[_i]].name>>
					<<set _resultStrings.cursedUnequip.count++>>
				<<case "not found piece">>
					<<if _resultStrings.notFoundPiece is undefined>>
						<<set _resultStrings.notFoundPiece to {
							"start": "You were unable to fully equip your ",
							"end": " due to an unexpected issue (Error in save most likely). Discarding and replacing related items should deal with the issue.",
							"count": 0,
							"color": "red"
						}>>
					<</if>>
					<<set _resultStrings.notFoundPiece[_resultStrings.notFoundPiece.count] to _notEquipped[_keys[_i]].name>>
					<<set _resultStrings.notFoundPiece.count++>>
			<</switch>>
		<</for>>
		<<set _keys to Object.keys(_resultStrings)>>
		<<for _i to 0; _i lt _keys.length; _i++>>
			<<set _string to _resultStrings[_keys[_i]].start>>
			<<for _j to 0; _j lt _resultStrings[_keys[_i]].count; _j++>>
				<<if _j is 0>>
					<<set _string += _resultStrings[_keys[_i]][_j]>>
				<<elseif _j lt _resultStrings[_keys[_i]].count - 1 and _resultStrings[_keys[_i]].count gt 2>>
					<<set _string += ", " + _resultStrings[_keys[_i]][_j]>>
				<<elseif _resultStrings[_keys[_i]].count gte 2>>
					<<set _string += " and " + _resultStrings[_keys[_i]][_j]>>
				<</if>>
			<</for>>
			<<set _string += _resultStrings[_keys[_i]].end>>
			_string

		<</for>>
	<</if>>
<</if>>

<<set $wear_outfit to "none">>
<<unset $storeLocation>>
<</widget>>

<<widget "overwriteoutfit">>
<<if $delete_outfit is 2 and $wear_outfit isnot "none">>
	<<set _equip to ["over_head","over_upper","over_lower","upper", "lower", "under_upper", "under_lower","head", "face", "neck", "hands", "legs", "feet"]>>
	<<set _outfit to $outfit[$wear_outfit]>>
	<<for _i to 0; _i lt _equip.length;_i++>>
		<<set _outfit[_equip[_i]] to $worn[_equip[_i]].name>>
		<<if _outfit.colors isnot false and _outfit.colors isnot undefined>>
			<<set _outfit.colors[_equip[_i]] to [clone($worn[_equip[_i]].colour),clone($worn[_equip[_i]].accessory_colour)]>>
			<<if $worn[_equip[_i]].colour is "custom" or $worn[_equip[_i]].accessory_colour is "custom">>
				<<run _outfit.colors[_equip[_i]+"custom"] to [clone($worn[_equip[_i]].colourCustom),clone($worn[_equip[_i]].accessory_colourCustom)]>>
			<</if>>
		<</if>>
	<</for>>
	<<set $wear_outfit to "none">>
<</if>>
<</widget>>

<<widget "outfitEditor">>

Outfit Editor

<<link "Filter Options">><<toggleclass "#outfitEditorFilter" "hidden">><</link>> |
<<link "Help">><<toggleclass "#outfitEditorHelp" "hidden">><</link>>

	All options change the settings the moment you change the option, however, they will only save or be updated in the passage only if you first change the passage (Leave the wardrobe or click on 'Update Wardrobe' at the bottom of this overlay).

	Changing the clothing items may result in the colour settings being reset for that item. This is caused from going from an item with colour options to one that doesnt have any colour options. Just because you can change it to some item's doesn't mean you have access to every item.

	Location is where the Outfit is unique to and will only show for that wardrobe. Please note, where it says 'No access', this is either based on the multiple wardrobe setting or may not be avaliable till a later version of the game. In most cases the 'Orphanage' wardrobe will be shared when Multiple wardrobes is set to 'isolated only' or is disabled.

<<if _outfitEditorFilter is undefined>>
	<<outfitEditorDefaultFilter>>
<</if>>
<<outfitEditorUpdateFilter>>
<<set _subState to {}>>

	<<outfitEditorFilter>>

	<<outfitEditorList>>

<<link [[Update Wardrobe|$passage]]>><</link>>
<</widget>>

<<widget "outfitEditorFilter">>

Filter

Items Per Page: <<numberslider "$outfitEditorPerPage" $outfitEditorPerPage 5 20 1>>

Type:
<<checkbox "_outfitEditorFilter.type.normal" false true autocheck>> Normal |
<<checkbox "_outfitEditorFilter.type.sleep" false true autocheck>> Sleep |
<<checkbox "_outfitEditorFilter.type.swim" false true autocheck>> Swim |
<<checkbox "_outfitEditorFilter.type.school" false true autocheck>> School (Only used by starter outfits, may be added later) |

Location:
<<for $_label, $_value range _outfitEditorFilter.location>>
	<<set $_name to $wardrobes[$_label] ? $wardrobes[$_label].name : $_label>>
	<<set $_var to "_outfitEditorFilter.location." + $_label>>
	<<capture $_var>>

			<<checkbox $_var false true autocheck>> <<print $_name>>
			<<if (!$multipleWardrobes or ($multipleWardrobes is "isolated" and !$_value.isolated)) and $_label isnot "wardrobe">>
				(No access)
			<</if>>
		 |
	<</capture>>
<</for>>

Colour Saved in Outfit:
<<checkbox "_outfitEditorFilter.colors.notSaved" false true autocheck>> No |
<<checkbox "_outfitEditorFilter.colors.saved" false true autocheck>> Yes |

<<link "Update Filter">>
	<<outfitEditorUpdateFilter>>
	<<replace "#outfitEditor">><<outfitEditorList>><</replace>>
<</link>> |
<<link "Reset Filter">>
	<<outfitEditorDefaultFilter>>
	<<outfitEditorPageSetup>>
	<<replace "#outfitEditorFilter">><<outfitEditorFilter>><</replace>>
	<<replace "#outfitEditor">><<outfitEditorList>><</replace>>
<</link>>

<</widget>>

<<widget "outfitEditorDefaultFilter">>
<<if $outfitEditorPerPage is undefined>>
	<<set $outfitEditorPerPage to 10>>
<</if>>
<<set _outfitEditorFilter to {
	type:{
		normal: true,
		sleep: true,
		swim: true,
		school: true,
	},
	location:{
		All: true,
		disabled: true,
	},
	colors:{
		notSaved: true,
		saved: true
	},
	outfitIndex:[],
}>>
<<for $_label, $_value range $wardrobes>>
	<<if $_value.unlocked>>
		<<set _outfitEditorFilter.location[$_label] to true>>
	<</if>>
<</for>>
<<set _outfitEditorFilter.outfitIndex to []>>
<<run $outfit.forEach((item, index) => {T.outfitEditorFilter.outfitIndex.push(index);})>>
<</widget>>

<<widget "outfitEditorUpdateFilter">>
<<set _outfitEditorFilter.outfitIndex to []>>
<<run $outfit.forEach((item, index) => {
	if(T.outfitEditorFilter.type[item.type[0]]){
		if((T.outfitEditorFilter.location.All && item.type[0].location === undefined) || T.outfitEditorFilter.location[item.type[0].location]){
			if((!item.colors && T.outfitEditorFilter.colors.notSaved) || (item.colors && T.outfitEditorFilter.colors.saved)){
				T.outfitEditorFilter.outfitIndex.push(index);
			}
		}
	}
})>>
<<outfitEditorPageSetup>>
<</widget>>

<<widget "outfitEditorPageSetup">>
<<set _outfitEditorPages to {
	page:1,
	perPage:$outfitEditorPerPage
}>>
<<set _outfitEditorPages.maxPages to Math.ceil(_outfitEditorFilter.outfitIndex.length / _outfitEditorPages.perPage)>>
<</widget>>

<<widget "outfitEditorList">>
<<outfitEditorPageControls>>

<<set $_start to (_outfitEditorPages.page - 1) * _outfitEditorPages.perPage>>
<<for $_i to $_start; $_i lt $_start + _outfitEditorPages.perPage; $_i++>>
	<<set $_index to _outfitEditorFilter.outfitIndex[$_i]>>
	<<if !$outfit[$_index]>>
		<<break>>
	<</if>>

		<<outfitEditorItem $_index>>

<</for>>

<<outfitEditorPageControls>>
<</widget>>

<<widget "outfitEditorPageControls">>
<<if _outfitEditorPages.page gt 1>>
	<<link Previous>>
		<<set _outfitEditorPages.page-->>
		<<replace "#outfitEditor">><<outfitEditorList>><</replace>>
	<</link>> |
<<else>>
	Previous |
<</if>>
Page <<print _outfitEditorPages.page>>/<<print _outfitEditorPages.maxPages>> |
<<if _outfitEditorPages.page lt _outfitEditorPages.maxPages and _outfitEditorPages.maxPages gt 1>>
	<<link Next>>
		<<set _outfitEditorPages.page++>>
		<<replace "#outfitEditor">><<outfitEditorList>><</replace>>
	<</link>>
<<else>>
	Next
<</if>>
<</widget>>

<<widget "outfitEditorItem">>
<<capture $args[0]>>
	<<set _subState[$args[0]] to "">>

		<<set $_name to "$outfit["+$args[0]+"].name">>
		Name: <<textbox $_name $outfit[$args[0]].name>>

		<<run $(() => { $('.outfitEditorItem .name .macro-textbox').on('input change', e => {
			let index = e.target.name.replace(/\D/g,'');
			V.outfit[index].name = V.outfit[index].name.replace(/[^a-zA-Z 0-9.!()]+/g,"").substr(0,30);
		}).trigger('input change') })>>

		<<set $_type to "$outfit["+$args[0]+"].type[0]">>

			Type:
			<<listbox $_type autoselect>>
				<<option "Normal" "normal">>
				<<option "Sleep" "sleep">>
				<<option "Swim" "swim">>
				<<option "School" "school">>
			<</listbox>>

		<<set $_location to "$outfit["+$args[0]+"].location">>
		<<set $_locations to {}>>
		<<for $_label, $_value range $wardrobes>>
			<<if $_value.unlocked>>
				<<set _warning to "">>
				<<if (!$multipleWardrobes or ($multipleWardrobes is "isolated" and !$_value.isolated)) and $_label isnot "wardrobe">>
					<<set _warning to " (No access)">>
				<</if>>
				<<set $_locations[$_value.name + _warning] to $_label>>
			<</if>>
		<</for>>

			Location:
			<<listbox $_location autoselect>>
				<<option "All" undefined>>
				<<option "Disabled" "disabled">>
				<<optionsfrom $_locations>>
			<</listbox>>

		Items:
		<<link View>>
			<<set _subId to "#outfitItemSub-" + $args[0]>>
			<<if _subState[$args[0]] is "itemEdit">>
				<<set _subState[$args[0]] to "">>
				<<replace _subId>><</replace>>
			<<else>>
				<<set _subState[$args[0]] to "itemEdit">>
				<<replace _subId>><<outfitEditorItemClothes $args[0]>><</replace>>
			<</if>>
		<</link>>

		Colours: <<print $outfit[$args[0]].colors ? "Enabled" : "Disabled">> |
		<<if $outfit[$args[0]].colors>>
			<<link Disable>>
				<<set $outfit[$args[0]].colors to false>>
				<<set _id to "#outfitItem-" + $args[0]>>
				<<replace `_id`>><<outfitEditorItem $args[0]>><</replace>>
			<</link>> |
			<<link Edit>>
				<<set _subId to "#outfitItemSub-" + $args[0]>>
				<<if _subState[$args[0]] is "colourView">>
					<<set _subState[$args[0]] to "">>
					<<replace _subId>><</replace>>
				<<else>>
					<<set _subState[$args[0]] to "colourView">>
					<<replace _subId>><<outfitEditorItemColour $args[0]>><</replace>>
				<</if>>
			<</link>>
		<<else>>
			<<link Enable>>
				<<set $outfit[$args[0]].colors to {}>>
				<<set _outfitIndex to $args[0]>>
				<<for _label, _value range setup.clothes>>
					<<set _item to setup.clothes[_label].filter((item) => item.name === V.outfit[T.outfitIndex][T.label])[0]>>
					<<set _colors to [0,0]>>
					<<if _item>>
						<<if _item.colour_options.length gt 0>>
							<<set _colors[0] to _item.colour_options[0]>>
						<</if>>
						<<if _item.accessory_colour_options.length gt 0>>
							<<set _colors[1] to _item.accessory_colour_options[0]>>
						<</if>>
					<</if>>
					<<set $outfit[$args[0]].colors[_label] to clone(_colors)>>
				<</for>>
				<<set _id to "#outfitItem-" + $args[0]>>
				<<replace `_id`>><<outfitEditorItem $args[0]>><</replace>>
			<</link>>
		<</if>>

<</capture>>
<</widget>>

<<widget "outfitEditorItemClothes">>
<<capture $args[0]>>
	<<for $_label, $_value range setup.clothes>>
		<<set $_itemName to $outfit[$args[0]][$_label]>>
		<<if $_itemName and !["over_upper","over_lower","over_head"].includes($_label)>>

				<<set $_options to []>>
				<<for $_value2 range $_value>>
					<<run $_options.push($_value2.name)>>
				<</for>>
				<<print $_label>> -
				<<set $_var to "$outfit[" + $args[0] + "]['" + $_label + "']">>
				<<listbox `$_var` autoselect>>
					<<optionsfrom $_options>>
				<</listbox>>

				<<run $(() => { $('.outfitEditorItemClothes select').on('input change', e => {
					let outfitIndex = e.target.name.replace(/\D/g,'');
					if(V.outfit[outfitIndex].colors === false) return;

					let target = e.target.name.match(/[a-zA-Z]+/g);
					let slot = target[2] + (target[3] !== undefined ? '_' + target[3] : '');
					let item = setup.clothes[slot].filter((item) => item.name === V.outfit[outfitIndex][slot])[0];
					if(item !== undefined){
						if(item.colour_options.length > 0 && V.outfit[outfitIndex].colors[slot][0] === 0){
							V.outfit[outfitIndex].colors[slot][0] = item.colour_options[0];
						} else if(item.colour_options.length === 0 && V.outfit[outfitIndex].colors[slot][0] !== 0) {
							V.outfit[outfitIndex].colors[slot][0] = 0;
						}
						if(item.accessory_colour_options.length > 0 && V.outfit[outfitIndex].colors[slot][1] === 0){
							V.outfit[outfitIndex].colors[slot][0] = item.accessory_colour_options[0];
						} else if(item.accessory_colour_options.length === 0 && V.outfit[outfitIndex].colors[slot][1] !== 0) {
							V.outfit[outfitIndex].colors[slot][1] = 0;
						}
					}
				}).trigger('input change') })>>

		<</if>>
	<</for>>
<</capture>>
<</widget>>

<<widget "outfitEditorItemColour">>
<<capture $args[0]>>
	<<for $_label, $_value range setup.clothes>>
		<<set _colourLabel to $_label>>
		<<set _colourOutfit to $args[0]>>
		<<set $_item to setup.clothes[$_label].filter((item) => item.name === V.outfit[T.colourOutfit][T.colourLabel])[0]>>
		<<if $_item>>
			<<if $_item.colour_options.length gt 0 or $_item.accessory_colour_options.length gt 0>>
				<<print $_label>> - <<print $_item.name>>:
				<<if $_item.colour_options.length gt 0>>
					<<set $_colour_options to "$outfit["+$args[0]+"].colors['"+$_label+"'][0]">>
					<<listbox `$_colour_options` autoselect>>
						<<optionsfrom $_item.colour_options>>
					<</listbox>>
				<</if>>
				<<if $_item.accessory_colour_options.length gt 0>>
					<<set $_accessory_colour_options to "$outfit["+$args[0]+"].colors['"+$_label+"'][1]">>
					<<listbox `$_accessory_colour_options` autoselect>>
						<<optionsfrom $_item.accessory_colour_options>>
					<</listbox>>
				<</if>>

			<</if>>
		<</if>>
	<</for>>
<</capture>>
<</widget>>


code:
:: Widgets Under Upper Clothing [widget]
<!-- For any item that has a colour_combat tag, set it to 0 if that item ever gets its own combat sprites. -->
<<widget "init_under_upper">>
<<set setup.clothes.under_upper to [
	{index: 0,
	name: "naked",
	name_cap: "Naked",
	variable: "naked",
	integrity: 0,
	integrity_max: 0,
	fabric_strength: 0,
	reveal: 1000,
	bustresize: 0,
	word: "n",
	one_piece: 0,
	strap: 0,
	open: 0,
	state: 0,
	state_base: 0,
	state_top: 0,
	state_top_base: 0,
	plural: 0,
	colour: 0,
	colour_options: [],
	exposed: 1,
	exposed_base: 1,
	type: ["naked"],
	set: "under_upper",
	gender: "n",
	warmth: 0,
	cost: 0,
	description: "naked",
	shop: [],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	mainImage:0
},

	{index: 1,
	name: "bikini top",
	name_cap: "Bikini top",
	variable: "bikini",
	integrity: 20,
	integrity_max: 20,
	fabric_strength: 20,
	reveal: 900,
	bustresize: 0,
	word: "n",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim", "tanLines"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 2000,
	description: "Revealing swimwear.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Bikini top.png",
	accIcon: 0
},

	{index: 2,
	name: "school swimsuit",
	name_cap: "School swimsuit",
	variable: "schoolswimsuit",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 30,
	reveal: 600,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 0,
	open: 1,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim", "school", "tanLines"],
	set: "school swimsuit",
	gender: "f",
	femininity: 300,
	warmth: 20,
	cost: 2500,
	description: "Proper school swimwear.",
	shop: ["clothing", "school", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "School swimsuit.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"school swimsuit bottom"}
},

	{index: 3,
	name: "leotard",
	name_cap: "Leotard",
	variable: "leotard",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 30,
	reveal: 600,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 0,
	open: 0,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	type: ["dance", "athletic"],
	set: "leotard",
	gender: "n",
	warmth: 20,
	cost: 3000,
	description: "Form fitting.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 1,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Leotard.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"leotard bottom"}
},

	{index: 4,
	name: "full body leotard",
	name_cap: "Full body leotard",
	variable: "leotardfull",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 30,
	reveal: 500,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 0,
	open: 0,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	type: ["dance", "athletic"],
	set: "long leotard",
	gender: "n",
	warmth: 25,
	cost: 3500,
	description: "Form fitting. Covers your legs.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 1,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Full body leotard.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"full body leotard bottom"}
},

	{index: 5,
	name: "skimpy leotard",
	name_cap: "Skimpy leotard",
	variable: "leotardskimpy",
	integrity: 80,
	integrity_max: 80,
	fabric_strength: 30,
	reveal: 600,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 0,
	open: 0,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	type: ["dance", "athletic"],
	set: "skimpy leotard",
	gender: "n",
	warmth: 15,
	cost: 2500,
	description: "Form fitting. Shows off your thighs.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Skimpy leotard.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"skimpy leotard bottom"}
},

	{index: 6,
	name: "foreign school swimsuit",
	name_cap: "Foreign school swimsuit",
	variable: "schoolswimsuitj",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 30,
	reveal: 600,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 0,
	open: 1,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim", "school", "tanLines"],
	set: "foreign school swimsuit",
	gender: "f",
	femininity: 300,
	warmth: 20,
	cost: 2500,
	description: "Official uniform swimsuit for the local school, but in a style popular in a foreign country.",
	shop: ["clothing", "school"],
	accessory: 1,
	accessory_colour: 0,
	accessory_colour_options: [],
	accessory_colour_combat:"white",
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Foreign school swimsuit.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"foreign school swimsuit bottom"}
},

	{index: 7,
	name: "swimsuit",
	name_cap: "Swimsuit",
	variable: "swimsuit",
	integrity: 60,
	integrity_max: 60,
	fabric_strength: 30,
	reveal: 700,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 1,
	open: 1,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim"],
	set: "swimsuit",
	gender: "f",
	femininity: 300,
	warmth: 20,
	cost: 7500,
	description: "Sexy.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Swimsuit.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"swimsuit bottom"}
},

	{index: 8,
	name: "bunny leotard",
	name_cap: "Bunny leotard",
	variable: "leotardbunny",
	integrity: 120,
	integrity_max: 120,
	fabric_strength: 30,
	reveal: 800,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 0,
	open: 1,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	type: ["costume", "serving"],
	set: "leotardbunny",
	gender: "f",
	femininity: 300,
	warmth: 25,
	cost: 5000,
	description: "Waitress attire. Tougher than it looks. Part of a bunny outfit, and has a fluffy white tail on the back to prove it.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Bunny leotard.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"bunny leotard bottom"}
},

	{index: 9,
	name: "catgirl bra",
	name_cap: "Catgirl bra",
	variable: "catgirlbra",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 30,
	reveal: 500,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["costume", "serving"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 3000,
	description: "For when a regular bra just isn't cute enough.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Catgirl bra.png",
	accIcon: 0,
	mainImage: 0,
},

	{index: 10,
	name: "lace bra",
	name_cap: "Lace bra",
	variable: "lacebra",
	integrity: 80,
	integrity_max: 80,
	fabric_strength: 30,
	reveal: 600,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["normal"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 1000,
	description: "Hints at what lies beneath.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Lace bra.png",
	accIcon: 0
},

	{index: 11,
	name: "microkini top",
	name_cap: "Microkini top",
	variable: "microkini",
	integrity: 80,
	integrity_max: 80,
	fabric_strength: 30,
	reveal: 900,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 2,
	cost: 2400,
	description: "Skirts the borders of decency.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Microkini top.png",
	accIcon: 0
},

	{index: 12,
	name: "plain bra",
	name_cap: "Plain bra",
	variable: "plainbra",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 30,
	reveal: 400,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["normal"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 500,
	description: "No-nonsense.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Plain bra.png",
	accIcon: 0
},

	{index: 13,
	name: "sports bra",
	name_cap: "Sports bra",
	variable: "sportsbra",
	integrity: 150,
	integrity_max: 150,
	fabric_strength: 30,
	reveal: 300,
	bustresize: -1,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["normal"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 15,
	cost: 2000,
	description: "Supportive.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Sports bra.png",
	accIcon: 0
},

	{index: 14,
	name: "mesh shirt",
	name_cap: "Mesh shirt",
	variable: "mesh",
	integrity: 50,
	integrity_max: 50,
	fabric_strength: 30,
	reveal: 900,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 0,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	type: ["fetish"],
	set: "under_upper",
	gender: "n",
	warmth: 0,
	cost: 3500,
	description: "Doesn't conceal a thing.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 1,
	breast_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Mesh shirt.png",
	accIcon: 0
},

	{index: 15,
	name: "corset",
	name_cap: "Corset",
	variable: "corset",
	integrity: 180,
	integrity_max: 180,
	fabric_strength: 30,
	reveal: 1000,
	bustresize: 2,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "waist",
	state_top_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 1,
	exposed_base: 1,
	type: ["fetish", "naked"],
	set: "under_upper",
	gender: "n",
	warmth: 20,
	cost: 2500,
	description: "Constricts your tummy and emphasises your chest.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Corset.png",
	accIcon: 0
},

	{index: 16,
	name: "striped bra",
	name_cap: "Striped bra",
	variable: "stripedbra",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 15,
	reveal: 900,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["normal"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 600,
	description: "Brimming with personality.",
	shop: ["clothing"],
	accessory: 1,
	accessory_colour: 0,
	accessory_colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	accessory_colour_sidebar: 1,
	sleeve_img: 0,
	breast_img: 1,
	breast_acc_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Striped bra.png",
	accIcon: "Striped bra_acc.png"
},

	{index: 17,
	name: "chest wrap",
	name_cap: "Chest wrap",
	variable: "chestwrap",
	integrity: 200,
	integrity_max: 200,
	fabric_strength: 15,
	reveal: 300,
	bustresize: -3,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat: 0,
	exposed: 0,
	exposed_base: 0,
	type: ["chest_bind"],
	set: "under_upper",
	gender: "n",
	femininity: 0,
	warmth: 35,
	cost: 600,
	description: "Flattens and protects.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Chest wrap.png",
	accIcon: 0
},

	{index: 18,
	name: "arm sleeves",
	name_cap: "Arm sleeves",
	variable: "armsleeves",
	integrity: 80,
	integrity_max: 80,
	fabric_strength: 15,
	reveal: 1000,
	bustresize: 0,
	word: "n",
	one_piece: 0,
	strap: 0,
	open: 1,
	state: "chest",
	state_base: "chest",
	state_top: "neck",
	state_top_base: "neck",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 1,
	exposed_base: 1,
	type: ["naked"],
	gender: "n",
	femininity: 0,
	warmth: 10,
	cost: 1500,
	description: "Protect your arms.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 1,
	breast_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Arm sleeves.png",
	accIcon: 0
},

{index: 19,
	name: "classic bikini top",
	name_cap: "Classic bikini top",
	variable: "classicbikini",
	integrity: 20,
	integrity_max: 20,
	fabric_strength: 20,
	reveal: 900,
	bustresize: 0,
	word: "n",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim", "tanLines"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 2000,
	description: "Revealing swimwear. Not kind to the well-endowed.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Classic bikini top.png",
	accIcon: 0
},

	{index: 20,
	name: "classic school swimsuit",
	name_cap: "Classic school swimsuit",
	variable: "classicschoolswimsuit",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 30,
	reveal: 600,
	bustresize: 0,
	bustresize: 0,
	word: "a",
	one_piece: 1,
	strap: 0,
	open: 1,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim", "school", "tanLines"],
	set: "classic school swimsuit",
	gender: "f",
	femininity: 300,
	warmth: 20,
	cost: 2500,
	description: "Proper school swimwear. Vintage.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Classic school swimsuit.png",
	accIcon: 0,
	outfitPrimary:{under_lower:"classic school swimsuit bottom"}
},

{index: 21,
	name: "swim shirt",
	name_cap: "Swim shirt",
	variable: "swimshirt",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 20,
	reveal: 200,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 0,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim", "school", "chest_bind"],
	set: "under_upper",
	gender: "m",
	femininity: -100,
	warmth: 30,
	cost: 6000,
	description: "Protects you from the sun while swimming.",
	shop: ["clothing", "school"],
	accessory: 1,
	accessory_integrity_img: 1,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 1,
	breast_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Swim shirt.png",
 	accIcon: 0
},

{index: 22,
	name: "vest",
	name_cap: "Vest",
	variable: "vest",
	integrity: 150,
	integrity_max: 150,
	fabric_strength: 20,
	reveal: 300,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 0,
	state: "waist",
	state_base: "waist",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["normal"],
	set: "under_upper",
	gender: "m",
	femininity: -200,
	warmth: 30,
	cost: 1200,
	description: "No-nonsense.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Vest.png",
 	accIcon: 0
},

	{index: 23,
	name: "strapless bra",
	name_cap: "Strapless bra",
	variable: "straplessbra",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 30,
	reveal: 500,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["normal"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 1000,
	description: "Frees your shoulders.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Strapless bra.png",
	accIcon: 0
},

	{index: 24,
	name: "school swim top",
	name_cap: "School swim top",
	variable: "schoolswimtop",
	integrity: 50,
	integrity_max: 50,
	fabric_strength: 30,
	reveal: 500,
	bustresize: 0,
	word: "a",
	one_piece: 0,
	strap: 0,
	open: 0,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["swim", "school"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 3000,
	description: "Imitates a foreign school uniform.",
	shop: ["clothing", "school"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "School swim top.png",
	accIcon: 0
},

	{index: 25,
	name: "tape",
	name_cap: "Tape",
	variable: "tape",
	integrity: 10,
	integrity_max: 10,
	fabric_strength: 30,
	reveal: 1000,
	bustresize: 0,
	word: "n",
	one_piece: 0,
	strap: 0,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 1,
	exposed_base: 1,
	type: ["costume", "sticky"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 0,
	cost: 2000,
	description: "Barely there.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Tape.png",
	accIcon: 0
},

	{index: 26,
	name: "cow bra",
	name_cap: "Cow bra",
	variable: "cow",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 30,
	reveal: 500,
	bustresize: 0,
	word: "n",
	one_piece: 0,
	strap: 1,
	open: 0,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: [],
	exposed: 0,
	exposed_base: 0,
	type: ["costume"],
	set: "under_upper",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 2000,
	description: "Supportive.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Cow bra.png",
	accIcon: 0
},

	{index: 27,
	name: "chest binder",
	name_cap: "Chest Binder",
	variable: "chestbinder",
	integrity: 200,
	integrity_max: 200,
	fabric_strength: 30,
	reveal: 100,
	bustresize: -4,
	word: "a",
	one_piece: 0,
	strap: 1,
	open: 1,
	state: "midriff",
	state_base: "midriff",
	state_top: "chest",
	state_top_base: "chest",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	type: ["chest_bind"],
	set: "under_upper",
	gender: "n",
	femininity: 0,
	warmth: 35,
	cost: 6000,
	description: "Flattens and protects.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	sleeve_img: 0,
	breast_img: 1,
	cursed: 0,
	location: 0,
	iconFile: "Chest binder.png",
	accIcon: 0
}

]>>

<!--
	Clothes that modders add go into this array, this should be empty in the base game at all times.
	These items should have a `modder` variable with a the modders name in a short string
-->
<<set setup.moddedClothes.under_upper to []>>

<<run setup.moddedClothes.under_upper.forEach( (x,i) => x.index = setup.clothes.under_upper.length + i )>>
<<run setup.clothes.under_upper.push(...setup.moddedClothes.under_upper)>>
<</widget>>

repo_name: Area/degrees

license: mit


code:
:: Widgets Under Lower Clothing [widget]
<!-- For any item that has a colour_combat tag, set it to 0 if that item ever gets its own combat sprites. -->
<<widget "init_under_lower">>
<<set setup.clothes.under_lower to [

	{index: 0,
	name: "naked",
	name_cap: "Naked",
	variable: "naked",
	integrity: 0,
	integrity_max: 0,
	fabric_strength: 0,
	reveal: 1000,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: 0,
	state_base: 0,
	plural: 0,
	colour: 0,
	colour_options: [],
	exposed: 1,
	exposed_base: 1,
	vagina_exposed: 1,
	vagina_exposed_base: 1,
	anus_exposed: 1,
	anus_exposed_base: 1,
	type: ["naked"],
	anal_shield: 0,
	set: "under_lower",
	gender: "n",
	warmth: 0,
	cost: 0,
	description: "naked",
	shop: [],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	mainImage:0
},

	{index: 1,
	name: "plain panties",
	name_cap: "Plain panties",
	variable: "plainpanties",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 15,
	reveal: 400,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 500,
	description: "No-nonsense.",
	shop: ["clothing","cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Plain panties.png",
	accIcon: 0
},

	{index: 2,
	name: "bikini bottoms",
	name_cap: "Bikini bottoms",
	variable: "bikini",
	integrity: 20,
	integrity_max: 20,
	fabric_strength: 20,
	reveal: 700,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim", "tanLines"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 2000,
	description: "Revealing swimwear.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Bikini bottoms.png",
	accIcon: 0
},

	{index: 3,
	name: "lace panties",
	name_cap: "Lace panties",
	variable: "lacepanties",
	integrity: 60,
	integrity_max: 60,
	fabric_strength: 15,
	reveal: 600,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 1500,
	description: "Fashionable and sexy.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Lace panties.png",
	accIcon: 0
},

	{index: 4,
	name: "briefs",
	name_cap: "Briefs",
	variable: "briefs",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 15,
	reveal: 400,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	no_aside: 1,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "m",
	femininity: -300,
	warmth: 5,
	cost: 500,
	description: "Snug.",
	shop: ["clothing"],
	accessory: 1,
	accessory_colour: 0,
	accessory_colour_options: [],
	accessory_colour_combat:"white",
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Briefs.png",
	accIcon: 0
},

	{index: 5,
	name: "chastity belt",
	name_cap: "Chastity belt",
	variable: "chastitybelt",
	integrity: 2000,
	integrity_max: 2000,
	fabric_strength: 15,
	reveal: 1000,
	rearresize: 0,
	word: "a",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 1,
	anus_exposed_base: 1,
	type: ["chastity", "swim", "school"],
	anal_shield: 0,
	set: "under_lower",
	gender: "n",
	femininity: 500,
	warmth: 0,
	cost: 0,
	description: "Restrictive.",
	shop: [],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 1,
	location: 0,
	iconFile: 0,
	accIcon: 0
},

	{index: 6,
	name: "school swimsuit bottom",
	name_cap: "School swimsuit bottom",
	variable: "schoolswimsuit",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 20,
	reveal: 600,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim", "school", "tanLines"],
	anal_shield: 0,
	set: "school swimsuit",
	warmth: 5,
	gender: "f",
	femininity: 300,
	cost: 0,
	description: "Proper school swimwear.",
	shop: ["clothing", "school", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","school swimsuit"]
},

	{index: 7,
	name: "school swim shorts",
	name_cap: "School swim shorts",
	variable: "schoolswimshorts",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 20,
	reveal: 600,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	no_aside: 1,
	type: ["swim", "school", "tanLines"],
	anal_shield: 0,
	set: "under_lower",
	gender: "m",
	femininity: -300,
	warmth: 20,
	cost: 2000,
	description: "Proper school swimwear.",
	shop: ["clothing", "school"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "School swim shorts.png",
	accIcon: 0
},

	{index: 8,
	name: "leotard bottom",
	name_cap: "Leotard bottom",
	variable: "leotard",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 20,
	reveal: 600,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	no_aside: 1,
	type: ["dance", "athletic"],
	anal_shield: 0,
	set: "leotard",
	gender: "n",
	warmth: 20,
	cost: 0,
	description: "Form fitting.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","leotard"]
},

	{index: 9,
	name: "full body leotard bottom",
	name_cap: "Full body leotard bottom",
	variable: "leotardfull",
	integrity: 140,
	integrity_max: 140,
	fabric_strength: 20,
	reveal: 400,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	no_aside: 1,
	type: ["dance", "athletic"],
	anal_shield: 0,
	set: "long leotard",
	gender: "n",
	warmth: 40,
	cost: 0,
	description: "Form fitting. Covers your legs.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","full body leotard"]
},

	{index: 10,
	name: "skimpy leotard bottom",
	name_cap: "Skimpy leotard bottom",
	variable: "leotardskimpy",
	integrity: 80,
	integrity_max: 80,
	fabric_strength: 20,
	reveal: 600,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["dance", "athletic"],
	anal_shield: 0,
	set: "skimpy leotard",
	gender: "n",
	warmth: 10,
	cost: 0,
	description: "Form fitting. Shows off your thighs.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","skimpy leotard"]
},

	{index: 11,
	name: "foreign school swimsuit bottom",
	name_cap: "Foreign school swimsuit bottom",
	variable: "schoolswimsuitj",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 20,
	reveal: 600,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim", "school", "tanLines"],
	anal_shield: 0,
	set: "foreign school swimsuit",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 0,
	description: "Official uniform swimsuit for the local school, but in a style popular in a foreign country.",
	shop: ["clothing", "school"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","foreign school swimsuit"]
},

	{index: 12,
	name: "swimsuit bottom",
	name_cap: "Swimsuit bottom",
	variable: "swimsuit",
	integrity: 60,
	integrity_max: 60,
	fabric_strength: 20,
	reveal: 700,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim"],
	anal_shield: 0,
	set: "swimsuit",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 0,
	description: "Sexy.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","swimsuit"]
},

	{index: 13,
	name: "bunny leotard bottom",
	name_cap: "Bunny leotard bottom",
	variable: "leotardbunny",
	integrity: 120,
	integrity_max: 120,
	fabric_strength: 20,
	reveal: 800,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: [],
	colour_combat:"black",
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["costume", "serving"],
	anal_shield: 0,
	set: "leotardbunny",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 0,
	description: "Waitress attire. Tougher than it looks. Part of a bunny outfit, and has a tufty white tail on the back to prove it.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","bunny leotard"]
},

	{index: 14,
	name: "boyshorts",
	name_cap: "Boyshorts",
	variable: "boyshorts",
	integrity: 120,
	integrity_max: 120,
	fabric_strength: 20,
	reveal: 300,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	no_aside: 1,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 20,
	cost: 1000,
	description: "Cute and comfy.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Boyshorts.png",
	accIcon: 0
},

	{index: 15,
	name: "catgirl panties",
	name_cap: "Catgirl panties",
	variable: "catgirlpanties",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 20,
	reveal: 500,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["costume", "serving"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 3000,
	description: "For when mundane panties aren't cute enough.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Catgirl panties.png",
	accIcon: 0
},

	{index: 16,
	name: "G-string",
	name_cap: "G-string",
	variable: "gstring",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 20,
	reveal: 900,
	rearresize: 0,
	word: "a",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 1,
	anus_exposed_base: 1,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "n",
	warmth: 2,
	cost: 1500,
	description: "Protects the essentials. Just.",
	shop: ["clothing","cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "G-string.png",
	accIcon: 0
},

	{index: 17,
	name: "crotchless panties",
	name_cap: "Crotchless panties",
	variable: "crotchlesspanties",
	integrity: 50,
	integrity_max: 50,
	fabric_strength: 20,
	reveal: 900,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 1,
	exposed_base: 1,
	vagina_exposed: 1,
	vagina_exposed_base: 1,
	anus_exposed: 1,
	anus_exposed_base: 1,
	type: ["fetish", "naked"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 3,
	cost: 1200,
	description: "Open access.",
	shop: ["clothing","cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Crotchless panties.png",
	accIcon: 0
},

	{index: 18,
	name: "microkini bottom",
	name_cap: "Microkini bottom",
	variable: "microkini",
	integrity: 30,
	integrity_max: 30,
	fabric_strength: 20,
	reveal: 900,
	rearresize: 0,
	word: "a",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 2,
	cost: 2400,
	description: "Skirts the borders of decency.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Microkini bottom.png",
	accIcon: 0
},

	{index: 19,
	name: "speedo",
	name_cap: "Speedo",
	variable: "speedo",
	integrity: 50,
	integrity_max: 50,
	fabric_strength: 20,
	reveal: 700,
	rearresize: 0,
	word: "a",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim"],
	anal_shield: 0,
	set: "under_lower",
	gender: "m",
	femininity: -300,
	warmth: 5,
	cost: 2400,
	description: "Show what you've got. Without getting arrested.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Speedo.png",
	accIcon: 0
},

	{index: 20,
	name: "striped panties",
	name_cap: "Striped panties",
	variable: "stripedpanties",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 15,
	reveal: 400,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 5,
	cost: 600,
	description: "Brimming with personality.",
	shop: ["clothing"],
	accessory: 1,
	accessory_colour: 0,
	accessory_colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	accessory_colour_sidebar: 1,
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Striped panties.png",
	accIcon: "Striped panties_acc.png"
},

	{index: 21,
	name: "loincloth",
	name_cap: "Loincloth",
	variable: "loincloth",
	integrity: 80,
	integrity_max: 80,
	fabric_strength: 10,
	reveal: 800,
	rearresize: 0,
	word: "a",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 1,
	vagina_exposed_base: 1,
	anus_exposed: 1,
	anus_exposed_base: 1,
	no_aside: 1,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "n",
	warmth: 10,
	cost: 100,
	description: "Revealing, unprotective, sturdy, and savage.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Loincloth.png",
	accIcon: 0
},

	{index: 22,
	name: "thong",
	name_cap: "Thong",
	variable: "thong",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 20,
	reveal: 900,
	rearresize: 0,
	word: "a",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "pale tangerine", "teal", "pale white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 1,
	anus_exposed_base: 1,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 3,
	cost: 1500,
	description: "Protects the essentials. Just.",
	shop: ["clothing", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 1,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Thong.png",
	accIcon: 0
},

	{index: 23,
	name: "classic plain panties",
	name_cap: "Classic plain panties",
	variable: "classicplainpanties",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 15,
	reveal: 400,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 500,
	description: "No-nonsense. Vintage.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Classic plain panties.png",
	accIcon: 0
},

	{index: 24,
	name: "classic bikini bottoms",
	name_cap: "Classic bikini bottoms",
	variable: "classicbikini",
	integrity: 20,
	integrity_max: 20,
	fabric_strength: 20,
	reveal: 700,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim", "tanLines"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 10,
	cost: 2000,
	description: "Revealing swimwear. Vintage.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Classic bikini bottoms.png",
	accIcon: 0
},

	{index: 25,
	name: "classic lace panties",
	name_cap: "Classic lace panties",
	variable: "classiclacepanties",
	integrity: 60,
	integrity_max: 60,
	fabric_strength: 15,
	reveal: 600,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "f",
	femininity: 300,
	warmth: 8,
	cost: 1500,
	description: "Fashionable and sexy. Vintage.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Classic lace panties.png",
	accIcon: 0
},

	{index: 26,
	name: "classic briefs",
	name_cap: "Classic briefs",
	variable: "classicbriefs",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 15,
	reveal: 400,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "pale yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	no_aside: 1,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	gender: "m",
	femininity: -300,
	warmth: 10,
	cost: 500,
	description: "Snug and vintage.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Classic briefs.png",
	accIcon: 0
},

	{index: 27,
	name: "classic school swimsuit bottom",
	name_cap: "Classic school swimsuit bottom",
	variable: "classicschoolswimsuit",
	integrity: 40,
	integrity_max: 40,
	fabric_strength: 20,
	reveal: 600,
	rearresize: 0,
	word: "a",
	one_piece: 1,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim", "school", "tanLines"],
	anal_shield: 0,
	set: "classic school swimsuit",
	warmth: 10,
	gender: "f",
	femininity: 300,
	cost: 0,
	description: "Proper school swimwear. Vintage.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: 0,
	accIcon: 0,
	outfitSecondary: ["under_upper","classic school swimsuit"]
},

	{index: 28,
	name: "jockstrap",
	name_cap: "Jockstrap",
	variable: "jockstrap",
	integrity: 120,
	integrity_max: 120,
	fabric_strength: 20,
	reveal: 700,
	rearresize: 0,
	word: "a",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 0,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 1,
	anus_exposed_base: 1,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	warmth: 10,
	gender: "m",
	femininity: -200,
	cost: 3500,
	description: "Not too tight.",
	shop: ["clothing", "cult"],
	accessory: 1,
	accessory_colour: 0,
	accessory_colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	accessory_colour_sidebar: 1,
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Jockstrap.png",
	accIcon: 1
},

	{index: 29,
	name: "boxers",
	name_cap: "Boxers",
	variable: "boxers",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 20,
	reveal: 350,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	warmth: 10,
	gender: "m",
	femininity: -200,
	cost: 800,
	description: "Gives room to breathe.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Boxers.png",
	accIcon: 0
},

	{index: 30,
	name: "long johns",
	name_cap: "Long johns",
	variable: "longjohns",
	integrity: 150,
	integrity_max: 150,
	fabric_strength: 20,
	reveal: 200,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["normal"],
	anal_shield: 0,
	set: "under_lower",
	warmth: 30,
	gender: "m",
	femininity: -100,
	cost: 2500,
	description: "Helps keep the chill off.",
	shop: ["clothing"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Long johns.png",
	accIcon: 0
},

	{index: 31,
	name: "school swim bottoms",
	name_cap: "School swim bottoms",
	variable: "schoolswimbottoms",
	integrity: 70,
	integrity_max: 70,
	fabric_strength: 20,
	reveal: 700,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow", "custom"],
	colour_sidebar: 1,
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["swim", "school"],
	anal_shield: 0,
	set: "under_lower",
	warmth: 30,
	gender: "f",
	femininity: 300,
	cost: 3000,
	description: "Surprisingly scanty for sanctioned uniform.",
	shop: ["clothing", "school", "cult"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "School swim bottoms.png",
	accIcon: 0
},

	{index: 32,
	name: "cow panties",
	name_cap: "Cow panties",
	variable: "cow",
	integrity: 100,
	integrity_max: 100,
	fabric_strength: 15,
	reveal: 500,
	rearresize: 0,
	word: "n",
	one_piece: 0,
	state: "waist",
	state_base: "waist",
	plural: 1,
	colour: 0,
	colour_options: [],
	exposed: 0,
	exposed_base: 0,
	vagina_exposed: 0,
	vagina_exposed_base: 0,
	anus_exposed: 0,
	anus_exposed_base: 0,
	type: ["costume"],
	anal_shield: 0,
	set: "under_lower",
	gender: "n",
	femininity: 0,
	warmth: 5,
	cost: 2000,
	description: "Cute cow print.",
	shop: ["forest"],
	accessory: 0,
	accessory_colour: 0,
	accessory_colour_options: [],
	penis_img: 0,
	high_img: 0,
	cursed: 0,
	location: 0,
	iconFile: "Cow panties.png",
	accIcon: 0
}

]>>

<!--
	Clothes that modders add go into this array, this should be empty in the base game at all times.
	These items should have a `modder` variable with a the modders name in a short string
-->
<<set setup.moddedClothes.under_lower to []>>

<<run setup.moddedClothes.under_lower.forEach( (x,i) => x.index = setup.clothes.under_lower.length + i )>>
<<run setup.clothes.under_lower.push(...setup.moddedClothes.under_lower)>>
<</widget>>