:: underwear_bodysuits
<<set $here = 'underwear_bodysuits'>>
<<set $ARGS = $location_var[$here]>>
<!-- !!This is bodysuits file and that means underwear['type'] = 2-->
<!-- !!bodysuits use the panty term in variables, this is intentional-->
<!-- !!gs 'underwear_bodysuits', 'dispose'-->
<!-- !!to remove bodysuits and destroy them-->
<!-- !!gs 'underwear_bodysuits', 'remove'-->
<!-- !!To remove bodysuits and store them-->
<!-- !!gs 'underwear_bodysuits', 'wear'-->
<!-- !!To wear bodysuits-->
<<set $menu_off = 1>>
<<if $location_var[$here][0] == 'view_bodysuit_list'>>
	<!-- !! ARGS 0 - view_bodysuit_list-->
	<!-- !! ARGS 1 - action type (clean, dirty, store, bathroom)-->
	<<if $pursepantytype != '' or $pursebratype != ''>>
		<center><b>You put the '+iif($pursepantytype ! '','bodysuits','')+iif($pursepantytype ! '' and $pursebratype ! '',' and ','')+iif($pursebratype ! '','bra','')+' from your purse back in the wardrobe.</b></center><br>
	<</if>>
	<<if $location_var[$here][1] != 'bathroom'>>
		<<act 'Return'>>
			<<gt 'wardrobe' 'main'>>
		<</act>>
	<<else>>
		<<actCLA 'Return'>>
			<<gt $location>>
		<</actCLA>>
	<</if>>
	<<if $location_var[$here][1] == 'wardrobe'>>
		<<set $metka_bodysuits = 0>>
	<</if>>
	<<if $location_var[$here][1] == 'store'>>
		<<set $metka_bodysuits = 1>>
	<</if>>
	<<if $location_var[$here][1] == 'unwanted'>>
		<<set $metka_bodysuits = 2>>
	<</if>>
	<<gs 'underwear_bodysuits' 'filter_header'>>
	<center><table border=1><TH><<link "Draw">><<gt 'underwear_bodysuits' 'view_bodysuit_list' 'wardrobe'>><</link>></TH><TH><<link "Storage">><<gt 'underwear_bodysuits' 'view_bodysuit_list' 'store'>><</link>></TH><TH><<link "Unwanted">><<gt 'underwear_bodysuits' 'view_bodysuit_list' 'unwanted'>><</link>></TH></table></center>
	<<if $wardrobe.isWearingPanties>>
		<<actCLA 'Remove bodysuits'>>
	<<gs 'underwear_bodysuits' 'remove'>> <<gt 'underwear_bodysuits' 'view_bodysuit_list' $location_var[$here][1]>>
<</actCLA>>

	<</if>>
	<<if $location_var[$here][1] == 'store'>>
		<<set $cloc = 1>>
	<</if>>
	<!-- !! Check for no bodysuits-->
	<<set $j = 0>>
	<<if ARRSIZE('moncheri_bodysuits') > 0>>
		<<set $j += 1>>
		<<if getvar("$clothingfilter['quality']") == 1>>
			<<image 'locations/city/citycenter/mall/moncheri.png'>>

		<</if>>
	<</if>>
	<!-- !!To filter just this set-->
	<<set $clo_i = 0>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopbodysuitquality_filter'>>
	<<set $i = 1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopmoncheribodysuits'>>
	<<if $moncheri_bodysuits_s[$i] == $metka_bodysuits and getvar("$moncheri_bodysuits["+$i+"]") == 1>>
		<<gs 'underwear_attributes' 'moncheri_bodysuits' $i>>
		<<gs 'underwear_bodysuits' 'bodysuit_filter'>>
		<!-- !!sort by filter-->
		<<if (getvar("$clothingfilter['quality']") == 0 and $BraQuality == $clo_i) or getvar("$clothingfilter['number']") == 0>>
			<<if getvar("$clothingfilter['inc']") == 1 and getvar("$clothingfilter['only']") == 1>>
				*p '<<link '<img src="images/pc/items/moncheri/bodysuits/<<i>>.jpg" 	height="150" />'>><<gt  'underwear_bodysuits'  'view_bodysuit_item'  '<<$larg(1)>>'  'moncheri'  <<i>>>><</link>>'
			<</if>>
		<</if>>
	<</if>>
	<<set $i += 1>>
	<<if $i <= ARRSIZE('moncheri_bodysuits')>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopmoncheribodysuits'>>

	<</if>>
	<<if ARRSIZE('lusso_bodysuits') > 0>>
		<<set $j += 1>>
		<<if getvar("$clothingfilter['quality']") == 1>>
			<<image 'locations/city/citycenter/mall/Lusso.png'>>

		<</if>>
	<</if>>
	<<set $i = 1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :looplussobodysuits'>>
	<<if $lusso_bodysuits_s[$i] == $metka_bodysuits and getvar("$lusso_bodysuits["+$i+"]") == 1>>
		<<gs 'underwear_attributes' 'lusso_bodysuits' $i>>
		<<gs 'underwear_bodysuits' 'bodysuit_filter'>>
		<!-- !!sort by filter-->
		<<if (getvar("$clothingfilter['quality']") == 0 and $BraQuality == $clo_i) or getvar("$clothingfilter['number']") == 0>>
			<<if getvar("$clothingfilter['inc']") == 1 and getvar("$clothingfilter['only']") == 1>>
				*p '<<link '<img src="images/pc/items/lusso/bodysuits/<<i>>.jpg" 	height="150" />'>><<gt  'underwear_bodysuits'  'view_bodysuit_item'  '<<$larg(1)>>'  'lusso'  <<i>>>><</link>>'
			<</if>>
		<</if>>
	<</if>>
	<<set $i += 1>>
	<<if $i <= ARRSIZE('lusso_bodysuits')>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump looplussobodysuits'>>

	<</if>>
	<<if ARRSIZE('salacious_bodysuits') > 0>>
		<<set $j += 1>>
		<<if getvar("$clothingfilter['quality']") == 1>>
			<<image 'locations/pushkin/exhibitshop/shop_name.png'>>

		<</if>>
	<</if>>
	<<set $i = 1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopsalaciousbodysuits'>>
	<<if $salacious_bodysuits_s[$i] == $metka_bodysuits and getvar("$salacious_bodysuits["+$i+"]") == 1>>
		<<gs 'underwear_attributes' 'salacious_bodysuits' $i>>
		<<gs 'underwear_bodysuits' 'bodysuit_filter'>>
		<!-- !!sort by filter-->
		<<if (getvar("$clothingfilter['quality']") == 0 and $BraQuality == $clo_i) or getvar("$clothingfilter['number']") == 0>>
			<<if getvar("$clothingfilter['inc']") == 1 and getvar("$clothingfilter['only']") == 1>>
				*p '<<link '<img src="images/pc/items/salacious/bodysuits/<<i>>.jpg" 	height="150" />'>><<gt  'underwear_bodysuits'  'view_bodysuit_item'  '<<$larg(1)>>'  'salacious'  <<i>>>><</link>>'
			<</if>>
		<</if>>
	<</if>>
	<<set $i += 1>>
	<<if $i <= ARRSIZE('salacious_bodysuits')>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopsalaciousbodysuits'>>

	<</if>>
	<<if ARRSIZE('scandalicious_bodysuits') > 0>>
		<<set $j += 1>>
		<<if getvar("$clothingfilter['quality']") == 1>>
			<<image 'locations/city/citycenter/mall/scandalicious.png'>>

		<</if>>
	<</if>>
	<<set $i = 1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopscandaliciousbodysuits'>>
	<<if $scandalicious_bodysuits_s[$i] == $metka_bodysuits and getvar("$scandalicious_bodysuits["+$i+"]") == 1>>
		<<gs 'underwear_attributes' 'scandalicious_bodysuits' $i>>
		<<gs 'underwear_bodysuits' 'bodysuit_filter'>>
		<!-- !!sort by filter-->
		<<if (getvar("$clothingfilter['quality']") == 0 and $BraQuality == $clo_i) or getvar("$clothingfilter['number']") == 0>>
			<<if getvar("$clothingfilter['inc']") == 1 and getvar("$clothingfilter['only']") == 1>>
				*p '<<link '<img src="images/pc/items/scandalicious/bodysuits/<<i>>.jpg" 	height="150" />'>><<gt  'underwear_bodysuits'  'view_bodysuit_item'  '<<$larg(1)>>'  'scandalicious'  <<i>>>><</link>>'
			<</if>>
		<</if>>
	<</if>>
	<<set $i += 1>>
	<<if $i <= ARRSIZE('scandalicious_bodysuits')>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopscandaliciousbodysuits'>>

	<</if>>
	<<set $clo_i += 1>>
	<<if getvar("$clothingfilter['quality']") == 0 and getvar("$clo_i") <= 7>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopbodysuitquality_filter'>>
	<</if>>
	<<if getvar("$j") == 0>>
		<center><b><font color = red>You do not own any bodysuits</font></b></center>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'view_bodysuit_item'>>
	<!-- !! ARGS 0 - view_bodysuit_item-->
	<!-- !! ARGS 1 = action type (draw, shop)-->
	<!-- !! ARGS 2 - bodysuit type-->
	<!-- !! ARGS 3 - bodysuit index-->
	<!-- !! ARGS 4 - price for shop-->
	<center><img src="<<setup.func(''$pcs_outfit_image'', $larg(2)+''_bodysuits'', ARGS[3])>>"></center>
	<<gs 'underwear_attributes' $location_var[$here][2] + '_bodysuits' $larg(3)>>
	<<gs 'underwear_descriptions' 'bodysuit'>>
	<<if $location_var[$here][1] == 'shop'>>
		<<if State.getVar('$'+$larg(2)+'_bodysuits['+$larg(3)+']') == 1>>
			You already own this item.
			<<actCLA 'Leave'>>
				<<gt $location>>
			<</actCLA>>
		<<else>>
			<<set $price = $larg(4)>>
			<p>Price: ARGS[4] <b>₽</b></p>
			<<actCLA 'Leave'>>
				<<gt $location>>
			<</actCLA>>
			<<if $finances.cash >= $price>>
				<<actCLA 'Buy (cash)'>>
					<<set $finances.cash -= $price>>
					<!-- FAILED TO CONVERT
						dynamic $larg(2) + '_bodysuits[<<ARGS[3]>>] = 1'
					-----
						<<set dynamic $larg(2) + '_bodysuits[$ERROR: FAILED TO CONVERT LITERAL: """<<ARGS[3]>>"""] = 1'>>

					-->
					<<warn "CONVERSION ERROR 252fd1a8fd16a43b538ccbbad73db064">>
					<!-- FAILED TO CONVERT
						dynamic $larg(2) + '_bodysuits_s[<<ARGS[3]>>] = 0'
					-----
						<<set dynamic $larg(2) + '_bodysuits_s[$ERROR: FAILED TO CONVERT LITERAL: """<<ARGS[3]>>"""] = 0'>>

					-->
					<<warn "CONVERSION ERROR 669cb78a6a9929478be07a5ce0244a73">>
					<<gt $location>>
				<</actCLA>>
			<<else>>
				You do not have enough cash to buy this bodysuit.
			<</if>>
			<<if $finances.bankAvailable >= $price>>
				<<actCLA 'Buy (card)'>>
					<<set $finances.bank -= $price>>
					<!-- FAILED TO CONVERT
						dynamic $larg(2) + '_bodysuits[<<ARGS[3]>>] = 1'
					-----
						<<set dynamic $larg(2) + '_bodysuits[$ERROR: FAILED TO CONVERT LITERAL: """<<ARGS[3]>>"""] = 1'>>

					-->
					<<warn "CONVERSION ERROR 252fd1a8fd16a43b538ccbbad73db064">>
					<!-- FAILED TO CONVERT
						dynamic $larg(2) + '_bodysuits_s[<<ARGS[3]>>] = 0'
					-----
						<<set dynamic $larg(2) + '_bodysuits_s[$ERROR: FAILED TO CONVERT LITERAL: """<<ARGS[3]>>"""] = 0'>>

					-->
					<<warn "CONVERSION ERROR 669cb78a6a9929478be07a5ce0244a73">>
					<<gt $location>>
				<</actCLA>>
			<<else>>
				You do not have enough money in your bank to buy this bodysuit.
			<</if>>
		<</if>>
	<<else>>
		<<if $location_var[$here][1] != 'bathroom'>>
			<<if getvar("$metka_bodysuits") != 1>>
				<<sets $result += 'Move this bodysuit to <<link "Storage">><<gt 'underwear_bodysuits' 'dest1' '$larg(1)' '$larg(2)' $larg(3)>><</link>><BR>'>>

			<</if>>
			<<if getvar("$metka_bodysuits") != 0>>
				<<sets $result += 'Move this bodysuit to  <<link "Wardrobe">><<gt 'underwear_bodysuits' 'dest0' '$larg(1)' '$larg(2)' $larg(3)>><</link>><BR>'>>

			<</if>>
			<<if getvar("$metka_bodysuits") != 2>>
				<<sets $result += 'Move this bodysuit to  <<link "Unwanted">><<gt 'underwear_bodysuits' 'dest2' '$larg(1)' '$larg(2)' $larg(3)>><</link>>'>>

			<</if>>
		<</if>>
		<<actCLA 'Return'>>
			<<gt 'underwear_bodysuits' 'view_bodysuit_list' $location_var[$here][1]>>
		<</actCLA>>
		<<if $location_var[$here][1] == 'store'>>
			This bodysuit is in storage.
		<<elseif $location_var[$here][1] == 'unwanted'>>
			This bodysuit is unwanted.
		<<else>>
			<<if $pc.bodysuitworntype == $location_var[$here][2] and $pc.bodysuitwornnumber == $larg(3)>>
				You are wearing this bodysuit.
			<<else>>
				<<if getvar("$metka_bodysuits") == 0>>
					<<actCLA 'Wear'>>
						<<if getvar("$CloPanties") == 1 and getvar("$CloBra") == 1>>
							<<msg 'Your outfit is already replacing your underwear'>>
						<<else>>
							<<if getvar("$hypnoPanty") > 0>>
								 								You pick up the bodysuit and think about trying it on... but you don't really like wearing bodysuits.
								<<gs 'willpower' 'misc' 'resist' 'easy'>>
								<<set $will_cost += $quest('therapist').hypnoTime>>
								<<if $will_cost <= $pc.willpower>>
									<<actCLA 'Put it on anyways (will_cost Willpower)'>>
										<<gs 'willpower' 'pay' 'resist'>>
										<<gs 'underwear_bodysuits' 'wear2' $location_var[$here][2] $larg(3)>>
										<<if $location_var[$here][1] == 'wardrobe'>>
											<<gt 'wardrobe' 'main'>>
										<<else>>
											<<gt $location>>
										<</if>>
									<</actCLA>>
								<<else>>
									<<actCLA `'Put it on anyways ('+$will_cost+')'`>><font color=red><br/>You don`t have enough willpower to use this action.</font><</actCLA>>
								<</if>>
								<<act 'Back'>>
									<<gt 'wardrobe' 'main'>>
								<</act>>
							<<else>>
								<<gs 'underwear_bodysuits' 'wear2' $location_var[$here][2] $larg(3)>>
								<<if $location_var[$here][1] == 'wardrobe'>>
									<<gt 'wardrobe' 'main'>>
								<<else>>
									<<gt $location>>
								<</if>>
							<</if>>
						<</if>>
					<</actCLA>>
				<</if>>
			<</if>>
		<</if>>
		<<if $location_var[$here][1] != 'store'>>
			<<actCLA 'Move to storage'>>
				<<gt 'underwear_bodysuits' 'dest1' $location_var[$here][1] $location_var[$here][2] $larg(3)>>
			<</actCLA>>
		<</if>>
		<<if $location_var[$here][1] != 'unwanted'>>
			<<actCLA 'Move to unwanted'>>
				<<gt 'underwear_bodysuits' 'dest2' $location_var[$here][1] $location_var[$here][2] $larg(3)>>
			<</actCLA>>
		<</if>>
		<<if $location_var[$here][1] != 'wardrobe'>>
			<<actCLA 'Move to wardrobe'>>
				<<gt 'underwear_bodysuits' 'dest0' $location_var[$here][1] $location_var[$here][2] $larg(3)>>
			<</actCLA>>
		<</if>>
		<<actCLA '<font color="red">Throw this bodysuit away</font>'>>
			<<set '+$larg(2)+'_bodysuits['+ARGS[3]+'] = 0>>
			<<gt 'wardrobe' 'main'>>
		<</actCLA>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'dest0'>>
	 	<<run State.setVar($larg(2)+'_bodysuits_s['+$larg(3)+']',0)>>
	<<gt 'underwear_bodysuits' 'view_bodysuit_item' $location_var[$here][1] $location_var[$here][2] $larg(3)>>
<</if>>
<<if $location_var[$here][0] == 'dest1'>>
	 	<<run State.setVar($larg(2)+'_bodysuits_s['+$larg(3)+']',1)>>
	<<gt 'underwear_bodysuits' 'view_bodysuit_item' $location_var[$here][1] $location_var[$here][2] $larg(3)>>
<</if>>
<<if $location_var[$here][0] == 'dest2'>>
	 	<<run State.setVar($larg(2)+'_bodysuits_s['+$larg(3)+']',2)>>
	<<gt 'underwear_bodysuits' 'view_bodysuit_item' $location_var[$here][1] $location_var[$here][2] $larg(3)>>
<</if>>
<<if $location_var[$here][0] == 'sum'>>
	<<set $t[0] = 'lusso'>>
	<<set $t[1] = 'salacious'>>
	<<set $t[2] = 'scandalicious'>>
	<<set $result = 0>>
	<<set $i = 0>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopsumbodysuits_i'>>
	<<set $temp = $t[$i]>>
	<<set $j = 1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopsumbodysuits_j'>>
	<!-- FAILED TO CONVERT
		$temp1 = '<<$temp>>_bodysuits[<<j>>]'
	-----
		<<set $temp1 = '$temp_bodysuits[ERROR: FAILED TO CONVERT LITERAL: """<<j>>"""]'>>

	-->
	<<warn "CONVERSION ERROR 65cd89dbd0904758f9d1cf15ca3c4048">>
	<!-- FAILED TO CONVERT
		$temp2 = '<<$temp>>_bodysuits_s[<<j>>]'
	-----
		<<set $temp2 = '$temp_bodysuits_s[ERROR: FAILED TO CONVERT LITERAL: """<<j>>"""]'>>

	-->
	<<warn "CONVERSION ERROR dd3c39ad561e8941b039addb4212f18e">>
	<!-- FAILED TO CONVERT
		dynamic 'if <<$temp1>> = 1 and <<$temp2>> = 0: result +=1'
	-----
		<<set if '+$temp1+' = ERROR: FAILED TO CONVERT LITERAL: """1 and $temp2 = 0: result""" + ERROR: FAILED TO CONVERT LITERAL: """=1""">>

	-->
	<<warn "CONVERSION ERROR 8266d55ce498bb657ceaaa6cc8d25c17">>
	<<set $j += 1>>
	<<if $j <= dyneval('result>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopsumbodysuits_j'>>

	<</if>>
	<<set $i += 1>>
	<<if $i <= arrsize('$t')>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopsumbodysuits_i'>>

	<</if>>
	<<if $location_var[$here][1] == 'dresser'>>
		<<if $wardrobe.isWearingPanties and getvar("$result") > 0>>
	<<setn $result -= 1>>

<</if>>

	<</if>>
	killvar('t')
	killvar('temp')
	killvar('temp1')
	killvar('temp2')
<</if>>
<<if $location_var[$here][0] == 'dispose'>>
	<!-- FAILED TO CONVERT
		dynamic $wardrobe.pantyworntype + '_bodysuit[<<pantywornnumber>>] = 0'
	-----
		<<set dynamic $wardrobe.pantyworntype + '_bodysuit[$ERROR: FAILED TO CONVERT LITERAL: """<<pantywornnumber>>"""] = 0'>>

	-->
	<<warn "CONVERSION ERROR dbf8a4883c8df4383bf827c045679350">>
	<<set $lastwornbodysuittype = 'none'>>
	<<set $lastwornbodysuitnumber = 0>>
	<<set $pc.bodysuitworntype = 'none'>>
	<<set $pc.bodysuitwornnumber = 0>>
	<<set $wardrobe.pantyworntype = 'none'>>
	<<set $wardrobe.braworntype = 'none'>>
	<<set $wardrobe.PBraQuality = 0>>
	<<set $wardrobe.PBraMaterial = 0>>
	<<set $wardrobe.PBraType = 0>>
	<<set $wardrobe.PBraFun = 0>>
	<<set $wardrobe.PPanThinness = 0>>
	<<set $wardrobe.PBraThinness = 0>>
	<<set $wardrobe.PPanCoverFront = 4>>
	<<set $wardrobe.PPanCoverBack = 4>>
	<<set $wardrobe.PBraCover = 4>>
	<<gs 'clothing' 'exposure_calc'>>
<</if>>
<<if $location_var[$here][0] == 'remove'>>
	<<set $lastwornbodysuittype = $pc.bodysuitworntype>>
	<<set $lastwornbodysuitnumber = $pc.bodysuitwornnumber>>
	<<set $pc.bodysuitworntype = 'none'>>
	<<set $pc.bodysuitwornnumber = 0>>
	<<setinit $underwear['lastworntype'] = 2>>
	<<set $wardrobe.pantyworntype = 'none'>>
	<<set $wardrobe.braworntype = 'none'>>
	<<set $wardrobe.PBraQuality = 0>>
	<<set $wardrobe.PBraMaterial = 0>>
	<<set $wardrobe.PBraType = 0>>
	<<set $wardrobe.PBraFun = 0>>
	<<set $wardrobe.PPanThinness = 0>>
	<<set $wardrobe.PBraThinness = 0>>
	<<set $wardrobe.PPanCoverFront = 4>>
	<<set $wardrobe.PPanCoverBack = 4>>
	<<set $wardrobe.PBraCover = 4>>
	<<gs 'clothing' 'exposure_calc'>>
<</if>>
<<if $location_var[$here][0] == 'wear'>>
	<<if $location_var[$here][1] == ''>>
		<<if State.getVar('$'+$lastwornbodysuittype+'_bodysuits_s['+lastwornbodysuitnumber+']') == 0 and $lastwornbodysuittype != ''>>
			<<set $pc.bodysuitworntype = $lastwornbodysuittype>>
			<<set $pc.bodysuitwornnumber = $lastwornbodysuitnumber>>
			<<gs 'underwear_bodysuits' 'wear2' $lastwornpantytype $lastwornpantynumber>>
		<<else>>
			<<setinit $underwear['type'] = 0>>
			<<set $pc.bodysuitworntype = 'none'>>
			<<set $pc.bodysuitwornnumber = 0>>
		<</if>>
	<<else>>
		<<if State.getVar('$'+$larg(1)+'_bodysuits_s['+$larg(2)+']') == 0>>
			<<gs 'underwear_bodysuits' 'wear2' $location_var[$here][2] $larg(3)>>
		<<else>>
			<<setinit $underwear['type'] = 0>>
			<<set $pc.bodysuitworntype = 'none'>>
			<<set $pc.bodysuitwornnumber = 0>>
		<</if>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'wear2'>>
	<!-- !! ARGS 0 - action-->
	<!-- !! ARGS 1 - bodysuits type name-->
	<!-- !! ARGS 2 - bodysuits index-->
	<!-- !! removing bra and panties or bodysuit if worn-->
	<<if getvar("$underwear['type']") == 0>>
		<<run $wardrobe.strip('panties')>>
		<<run $wardrobe.strip('bra')>>
	<<else>>
		<<gs 'underwear_bodysuits' 'remove'>>
	<</if>>
	<<setinit $underwear['type'] = 2>>
	<<set $pc.bodysuitworntype = $location_var[$here][1]>>
	<<set $pc.bodysuitwornnumber = $larg(2)>>
	<<set $wardrobe.pantyworntype = 'bodysuit'>>
	<<set $wardrobe.braworntype = 'bodysuit'>>
	<<run State.setVar($larg(1)+'_bodysuits_w['+$larg(2)+']',1)>>
	<<gs 'underwear_attributes' $location_var[$here][1] $larg(2)>>
	<<run State.setVar($larg(1)+'_bodysuits_s['+$larg(2)+']',0)>>
	<<set $wardrobe.PBraQuality = $BraQuality>>
	<<set $wardrobe.PBraMaterial = $BraMaterial>>
	<<set $wardrobe.PBraType = $BraType>>
	<<set $wardrobe.PBraFun = $BraFun>>
	<<set $wardrobe.PPanThinness = $PanThinness>>
	<<set $wardrobe.PBraThinness = $BraThinness>>
	<<set $wardrobe.PPanCoverFront = $PanCoverFront>>
	<<set $wardrobe.PPanCoverBack = $PanCoverBack>>
	<<set $wardrobe.PBraCover = $BraCover>>
	<<gs 'clothing' 'exposure_calc'>>
<</if>>
<<if $location_var[$here][0] == 'wear_last_worn'>>
	<!-- !!contingency-->
	<<if $lastwornbodysuittype == ''>>
		<<set $lastwornbodysuittype = 'none'>>

	<</if>>
	<<gs 'underwear_bodysuits' 'wear' $lastwornbodysuittype $lastwornbodysuitnumber>>
<</if>>
<<if $location_var[$here][0] == 'filter_header'>>
	<!-- !!Exclude filters-->
	<<set $Headerstring = '<TD>'>>
	<<if getvar("$clothingfilter['sport']") == 0>>
		<!-- FAILED TO CONVERT
			$Headerstring += '<a href="exec:clothingfilter[''sport''] = 1 & clothingfilter[''sport_only''] = 0 & gt ''underwear_bodysuits'', ''view_bodysuit_list'', $ward_list_store"><img src="images/system/icons/clothing/sport.png"></a></TD>'
		-----
			<<set $Headerstring += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['sport'] = 1""">> <<setinit $clothingfilter['sport_only'] = 0>> <<set gt ''underwear_bodysuits'' , 'view_bodysuit_list' , ERROR: FAILED TO CONVERT LITERAL: """$ward_list_store"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """sport.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR 798b0232c0c57394e9e90f822d414b52">>
	<<else>>
		<!-- FAILED TO CONVERT
			$Headerstring += '<a href="exec:clothingfilter[''sport''] = 0 & gt ''underwear_bodysuits'', ''view_bodysuit_list'',  $ward_list_store"><img src="images/system/icons/clothing/sport_off.png"></a></TD>'
		-----
			<<set $Headerstring += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['sport'] = 0""">> <<set gt ''underwear_bodysuits'' , 'view_bodysuit_list' , ERROR: FAILED TO CONVERT LITERAL: """$ward_list_store"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """sport_off.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR 4bca0a49504ce941d76f50179d90e617">>
	<</if>>
	<!-- !!sort by filters-->
	<<set $Headerstring += '<TD>'>>
	<<if getvar("$clothingfilter['number']") == 0>>
		<<setinit $clothingfilter['quality'] = 1>> <<set $clothingfilter['inhibition'] = 1>>
		<<set $Headerstring += '<<image 'images/system/icons/clothing/number.png'>></TD>'>>
	<<else>>
		<!-- FAILED TO CONVERT
			$Headerstring += '<a href="exec:clothingfilter[''number''] = 0 & clothingfilter[''quality''] = 1 & clothingfilter[''inhibition''] = 1 & gt ''underwear_bodysuits'', ''view_bodysuit_list'',  $ward_list_store"><img src="images/system/icons/clothing/number_off.png"></a></TD>'
		-----
			<<set $Headerstring += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['number'] = 0""">> <<setinit $clothingfilter['quality'] = 1>> <<set $clothingfilter['inhibition'] = 1>> <<set gt ''underwear_bodysuits'' , 'view_bodysuit_list' , ERROR: FAILED TO CONVERT LITERAL: """$ward_list_store"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """number_off.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR 7c7e5e094d1b23dd132696b077e896d2">>
	<</if>>
	<<set $Headerstring += '<TD>'>>
	<<if getvar("$clothingfilter['quality']") == 0>>
		<<set $Headerstring += '<<image 'images/system/icons/clothing/quality.png'>></TD>'>>
	<<else>>
		<!-- FAILED TO CONVERT
			$Headerstring += '<a href="exec:clothingfilter[''quality''] = 0 & clothingfilter[''number''] = 1 & clothingfilter[''inhibition''] = 1 & gt ''underwear_bodysuits'', ''view_bodysuit_list'',  $ward_list_store"><img src="images/system/icons/clothing/quality_off.png"></a></TD>'
		-----
			<<set $Headerstring += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['quality'] = 0""">> <<setinit $clothingfilter['number'] = 1>> <<set $clothingfilter['inhibition'] = 1>> <<set gt ''underwear_bodysuits'' , 'view_bodysuit_list' , ERROR: FAILED TO CONVERT LITERAL: """$ward_list_store"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """quality_off.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR e1751897bd8df54c498ba10fb2c1e16f">>
	<</if>>
	<!-- !! Show only filers-->
	<<setinit $Headerstring[1] = '<TD>'>>
	<<if getvar("$clothingfilter['sport_only']") == 0>>
		<!-- FAILED TO CONVERT
			$Headerstring[1] += '<a href="exec:clothingfilter[''sport_only''] = 1 & clothingfilter[''sport''] = 0 & gt ''underwear_bodysuits'', ''view_bodysuit_list'',  $ward_list_store"><img src="images/system/icons/clothing/sport_off.png"></a></TD>'
		-----
			<<setinit $Headerstring[1] += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['sport_only'] = 1""">> <<set $clothingfilter['sport'] = 0>> <<set gt ''underwear_bodysuits'' , 'view_bodysuit_list' , ERROR: FAILED TO CONVERT LITERAL: """$ward_list_store"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """sport_off.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR cc4b6239c8fef20a03dbe1e4bb9a8086">>
	<<else>>
		<!-- FAILED TO CONVERT
			$Headerstring[1] += '<a href="exec:clothingfilter[''sport_only''] = 0 & gt ''underwear_bodysuits'', ''view_bodysuit_list'',  $ward_list_store"><img src="images/system/icons/clothing/sport.png"></a></TD>'
		-----
			<<setinit $Headerstring[1] += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['sport_only'] = 0""">> <<set gt ''underwear_bodysuits'' , 'view_bodysuit_list' , ERROR: FAILED TO CONVERT LITERAL: """$ward_list_store"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """sport.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR 07233a29f59efd4cd75da982769438f5">>
	<</if>>
	<<setinit $Headerstring[2] = '<TH>Include</TH><TH>Sort by</TH><TH></TH>'>>
	<<setinit $Headerstring[3] = '<TH>Only show</TH>'>>
	<center><table><<$Headerstring[2]>>
	<TR><border=1><<$Headerstring>>
	<TR><border=0><<$Headerstring[3]>>
	<TR><border=1><<$Headerstring[1]>></table></center>
<</if>>
<<if $location_var[$here][0] == 'bodysuit_filter'>>
	<!-- !!Exclude filters-->
	<<setinit $clothingfilter['inc'] = 1>>
	<!-- !!filters, if inc set to 0 they will not display-->
	<<if getvar("$clothingfilter['sport']") == 1 and getvar("$BraFun") == 2>>
		<<setinit $clothingfilter['inc'] = 0>>
	<</if>>
	<!-- !!only filters-->
	<<setinit $clothingfilter['only'] = 0>>
	<!-- !!filters, if only set to 1 they will only display those set-->
	<<if getvar("$clothingfilter['sport_only']") == 1 and getvar("$BraFun") == 2>>
		<<setinit $clothingfilter['only'] = 1>>
	<</if>>
	<<if $clothingfilter['only'] == $clothingfilter['sport_only']>>
		<<setinit $clothingfilter['only'] = 1>>
	<<else>>
		<<setinit $clothingfilter['only'] = 0>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'shop_filter_header'>>
	<!-- !! sort by filters-->
	<<set $Headerstring = '<TD>'>>
	<<if getvar("$clothingfilter['number']") == 0>>
		<<setinit $clothingfilter['quality'] = 1>>
		<<set $Headerstring += '<<image 'images/system/icons/clothing/number.png'>></TD>'>>
	<<else>>
		<!-- FAILED TO CONVERT
			$Headerstring += '<a href="exec:clothingfilter[''number''] = 0 & clothingfilter[''quality''] = 1 & clothingfilter[''inhibition''] = 1 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/number_off.png"></a></TD>'
		-----
			<<set $Headerstring += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['number'] = 0""">> <<setinit $clothingfilter['quality'] = 1>> <<set $clothingfilter['inhibition'] = 1>> <<set gt $loc , ERROR: FAILED TO CONVERT LITERAL: """$loc_arg"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """number_off.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR 8f9dde9d3d200949a32d3ae004823097">>
	<</if>>
	<<set $Headerstring += '<TD>'>>
	<<if getvar("$clothingfilter['quality']") == 0>>
		<<set $Headerstring += '<<image 'images/system/icons/clothing/quality.png'>></TD>'>>
	<<else>>
		<!-- FAILED TO CONVERT
			$Headerstring += '<a href="exec:clothingfilter[''quality''] = 0 & clothingfilter[''number''] = 1 & clothingfilter[''inhibition''] = 1 & gt $loc, $loc_arg"><img src="images/system/icons/clothing/quality_off.png"></a></TD>'
		-----
			<<set $Headerstring += ERROR: FAILED TO CONVERT LITERAL: """'<a href="exec:clothingfilter['quality'] = 0""">> <<setinit $clothingfilter['number'] = 1>> <<set $clothingfilter['inhibition'] = 1>> <<set gt $loc , ERROR: FAILED TO CONVERT LITERAL: """$loc_arg"><img src""" = "images / $system / $icons / $clothing / ERROR: FAILED TO CONVERT LITERAL: """quality_off.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """TD>'""">>

		-->
		<<warn "CONVERSION ERROR 11e954eefe2bfe07b53ef01a1940d84c">>
	<</if>>
	<<setinit $Headerstring[2] = '<TH>Sort by</TH>'>>
	<center><table><<$Headerstring[2]>>
	<TR><border=1><<$Headerstring>></table></center>
<</if>>
<<if $location_var[$here][0] == 'shop_filter'>>
<</if>>
