# panties
!!This is separate panties file and that means underwear['type'] = 0
!!2021/04/15
!!gs 'panties', 'dispose'
!!to remove panties and destroy them
!!gs 'panties', 'remove'
!!To remove panties and store them
!!gs 'panties', 'wear'
!!To wear panties

menu_off = 1

if $ARGS[0] = 'view_panty_list':
	!! ARGS 0 - view_panty_list
	!! ARGS 1 - action type (clean, dirty, store, bathroom)
	
	if $pursepantytype ! '' or $pursebratype ! '':
		'<center><b>You put the '+iif($pursepantytype ! '','panties','')+iif($pursepantytype ! '' and $pursebratype ! '',' and ','')+iif($pursebratype ! '','bra','')+' from your purse back in the wardrobe.</b></center><br>'
		killvar '$pursepantytype' & killvar 'pursepantynumber'
		killvar '$pursebratype' & killvar 'pursebranumber'
	end

	if $ARGS[1] ! 'bathroom':
		act 'Return': gt 'wardrobe', 'main'
	else
		act 'Return': gt $loc, $loc_arg
	end

	if $ARGS[1] = 'wardrobe':
		metka_panties = 0
	end

	if $ARGS[1] = 'store':
		metka_panties = 1
	end

	if $ARGS[1] = 'unwanted':
		metka_panties = 2
	end

	gs 'panties', 'filter_header'

	'<center><table border=1><TH><a href="exec:gt ''panties'', ''view_panty_list'', ''wardrobe''">Draw</a></TH><TH><a href="exec:gt ''panties'', ''view_panty_list'', ''store''">Storage</a></TH><TH><a href="exec:gt ''panties'', ''view_panty_list'', ''unwanted''">Unwanted</a></TH></table></center>'

	if $pantyworntype ! 'none':act 'Remove panties':gs 'panties', 'remove' & gt 'panties', 'view_panty_list', $ARGS[1]
	
	if $ARGS[1] = 'store':
		cloc = 1
	end

	if ARRSIZE('gm_panties') > 0 and clothingfilter['quality'] = 1:'<center><img src="images/locations/city/citycenter/mall/gm.png"></center>'

	!!To filter just this set
	clo_i = 0
	:looppantyquality_filter

	i = 1
	:loopgmpanties
		if gm_pantiesS[i] = metka_panties and gm_panties[i] = 1:
			gs 'underwear_attributes', 'gm_panties', i
			gs 'panties', 'panty_filter'
			!!sort by filter
			if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
				if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:
					*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''gm'', <<i>>"><img src="images/pc/items/gm/panties/<<i>>.jpg" 	height="150" /></a>'
				end
			end
		end
	i += 1
	if i <= ARRSIZE('gm_panties'):jump 'loopgmpanties'

	if ARRSIZE('lusso_panties') > 0 and clothingfilter['quality'] = 1:'<center><img src="images/locations/city/citycenter/mall/Lusso.png"></center>'

	i = 1
	:looplussopanties
		if lusso_pantiesS[i] = metka_panties and lusso_panties[i] = 1:
			gs 'underwear_attributes', 'lusso_panties', i
			gs 'panties', 'panty_filter'
			!!sort by filter
			if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
				if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:
					*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''lusso'', <<i>>"><img src="images/pc/items/lusso/panties/<<i>>.jpg" 	height="150" /></a>'
				end
			end
		end
	i += 1
	if i <= ARRSIZE('lusso_panties'):jump 'looplussopanties'

	if ARRSIZE('salacious_panties') > 0 and clothingfilter['quality'] = 1:'<center><img src="images/locations/pushkin/exhibitshop/shop_name.png"></center>'

	i = 1
	:loopsalaciouspanties 
		if salacious_pantiesS[i] = metka_panties and salacious_panties[i] = 1:
			gs 'underwear_attributes', 'salacious_panties', i
			gs 'panties', 'panty_filter'
			!!sort by filter
			if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
				if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:
					*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''salacious'', <<i>>"><img src="images/pc/items/salacious/panties/<<i>>.jpg" 	height="150" /></a>'
				end
			end
		end
	i += 1
	if i <= ARRSIZE('salacious_panties'):jump 'loopsalaciouspanties'

	if ARRSIZE('fashionista_panties') > 0 and clothingfilter['quality'] = 1:'<center><img src="images/locations/city/citycenter/mall/fashionista.png"></center>'

	i = 1
	:loopfashionistapanties 
		if fashionista_pantiesS[i] = metka_panties and fashionista_panties[i] = 1:
			gs 'underwear_attributes', 'fashionista_panties', i
			gs 'panties', 'panty_filter'
			!!sort by filter
			if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
				if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:
					*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''fashionista'', <<i>>"><img src="images/pc/items/fashionista/panties/<<i>>.jpg" 	height="150" /></a>'
				end
			end
		end
	i += 1
	if i <= ARRSIZE('fashionista_panties'):jump 'loopfashionistapanties'

	if ARRSIZE('cats_panties') > 0 and clothingfilter['quality'] = 1:'<center><img src="images/locations/city/citycenter/mall/pussycat.png"></center>'

	i = 1
	:loopcatspanties 
		if cats_pantiesS[i] = metka_panties and cats_panties[i] = 1:
			gs 'underwear_attributes', 'cats_panties', i
			gs 'panties', 'panty_filter'
			!!sort by filter
			if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
				if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:
					*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''cats'', <<i>>"><img src="images/pc/items/cats/panties/<<i>>.jpg" 	height="150" /></a>'
				end
			end
		end
	i += 1
	if i <= ARRSIZE('cats_panties'):jump 'loopcatspanties'

	if ARRSIZE('eroto_panties') > 0 and clothingfilter['quality'] = 1:'<center><img src="images/locations/city/redlight/erotomaniac/shop_name.png"></center>'

	i = 1
	:looperotopanties 
		if eroto_pantiesS[i] = metka_panties and eroto_panties[i] = 1:
			gs 'underwear_attributes', 'eroto_panties', i
			gs 'panties', 'panty_filter'
			!!sort by filter
			if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
				if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:
					*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''eroto'', <<i>>"><img src="images/pc/items/eroto/panties/<<i>>.jpg" 	height="150" /></a>'
				end
			end
		end
	i += 1
	if i <= ARRSIZE('eroto_panties'):jump 'looperotopanties'

	if ARRSIZE('danilovich_panties') > 0 and clothingfilter['quality'] = 1:'<center><img src="images/locations/city/citycenter/mall/sports.png"></center>'

	i = 1
	:loopdanilovichpanties 
		if danilovich_pantiesS[i] = metka_panties and danilovich_panties[i] = 1:
			gs 'underwear_attributes', 'danilovich_panties', i
			gs 'panties', 'panty_filter'
			!!sort by filter
			if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
				if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1:
					*p '<a href="exec:gt ''panties'', ''view_panty_item'', ''<<$ARGS[1]>>'', ''danilovich'', <<i>>"><img src="images/pc/items/danilovich/panties/<<i>>.jpg" 	height="150" /></a>'
				end
			end
		end
	i += 1
	if i <= ARRSIZE('danilovich_panties'):jump 'loopdanilovichpanties'

	clo_i += 1
	if clothingfilter['quality'] = 0 and clo_i <= 7:
		jump 'looppantyquality_filter'
	end
end

if $ARGS[0] = 'view_panty_item':
	!! ARGS 0 - view_panty_item
	!! ARGS 1 = action type (draw, shop)
	!! ARGS 2 - panty type
	!! ARGS 3 - panty index
	!! ARGS 4 - price for shop
	cla
	'<center><img src="<<FUNC(''$panty_image'',  $ARGS[2], ARGS[3])>>"></center>'
	gs 'underwear_attributes', $ARGS[2]+'_panties', ARGS[3]
!!	$RESULT = FUNC('$short_description', $ARGS[2], CloStyle2)
!!	$RESULT += '<<ARGS[3]>>'
!!	'<<$RESULT>>'

	gs 'underwear_descriptions', 'panties'
	if underwear['pair'] > 0: 'These panties form a set with bra #<<underwear[''pair'']>>.'

	if $ARGS[1] = 'shop':
		if dyneval('RESULT = <<$ARGS[2]>>_panties[<<ARGS[3]>>]') = 1:
			'You already own this item.'
			act 'Leave': gt $loc, $loc_arg
		else
			price = ARGS[4]
			'Price: <<ARGS[4]>> <b>₽</b>'
			act 'Leave': gt $loc, $loc_arg
			if money >= price:
				act 'Buy (cash)':
					money -= price
					dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'
					dynamic $ARGS[2] + '_pantiesS[<<ARGS[3]>>] = 0'
					gt $loc, $loc_arg
				end
			else
				'You do not have enough cash to buy these panties.'
			end
			if karta + bankDebtLimit >= price:
				act 'Buy (card)':
					karta -= price
					dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'
					dynamic $ARGS[2] + '_pantiesS[<<ARGS[3]>>] = 0'
					gt $loc, $loc_arg
				end
			else
				'You do not have enough money in your bank to buy these panties.'
			end
			if underwear['pair'] > 0:
				if dyneval('RESULT = <<$ARGS[2]>>_bra[<<underwear[''pair'']>>]') = 1:
					'You own the matching bra buying these panties will complete the set.'
				else
					'You do not own the matching bra, you can buy it and these panties together as a set.'
					price_set = ARGS[4]*18/10
					'Price for set: <<price_set>> <b>₽</b>'
					if money >= price_set:
						act 'Buy set (cash)':
							money -= price_set
							dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'
							dynamic $ARGS[2] + '_pantiesS[<<ARGS[3]>>] = 0'
							dynamic $ARGS[2] + '_bras[<<underwear[''pair'']>>] = 1'
							dynamic $ARGS[2] + '_brasS[<<underwear[''pair'']>>] = 0'
							gt $loc, $loc_arg
						end
					else
						'You do not have enough cash to buy this set.'
					end
					if karta + bankDebtLimit >= price_set:
						act 'Buy set (card)':
							karta -= price_set
							dynamic $ARGS[2] + '_panties[<<ARGS[3]>>] = 1'
							dynamic $ARGS[2] + '_pantiesS[<<ARGS[3]>>] = 0'
							dynamic $ARGS[2] + '_bras[<<underwear[''pair'']>>] = 1'
							dynamic $ARGS[2] + '_brasS[<<underwear[''pair'']>>] = 0'
							gt $loc, $loc_arg
						end
					else
						'You do not have enough money in your bank to buy this set.'
					end
				end
			end
		end
	else
		act 'Return':gt 'panties', 'view_panty_list', $ARGS[1]
		
		if $ARGS[1] = 'store':
			'These panties are in storage.'
			gs 'panties', 'storage_options'
		elseif $ARGS[1] = 'unwanted':
			'These panties are unwanted.'
			gs 'panties', 'storage_options'
		else
			if $pantyworntype = $ARGS[2] and pantywornnumber = ARGS[3]:
				'You are wearing these panties.'
			else
				if metka_panties = 0:
					act 'Wear':
						if CloPanties = 1:
							msg'Your outfit is already replacing your panties'
						else
							if hypnoPanty > 0:
								cla
								*clr
								'You pick up the panties and think about trying them on... but you don''t really like wearing panties.'
								gs 'willpower', 'misc', 'resist', 'easy'
								will_cost += hypnoTime
								if will_cost <= pcs_willpwr:
									act 'Put them on anyways (<<will_cost>> Willpower)':
										gs 'willpower', 'pay', 'resist'
										gs 'stat'
										gs 'panties', 'wear', $ARGS[2], ARGS[3]
			
										if $ARGS[1] = 'wardrobe':
											gt 'wardrobe', 'main'
										else
											gt $loc, $loc_arg
										end
									end
								else
									act 'Put them on anyways (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
								end
								act 'Back':
									gt 'wardrobe', 'main'
								end
							else
								gs 'panties', 'wear', $ARGS[2], ARGS[3]

								if $ARGS[1] = 'wardrobe':
									gt 'wardrobe', 'main'
								else
									gt $loc, $loc_arg
								end
							end
						end
					end
					if underwear['pair'] > 0:
						if dyneval('RESULT = <<$ARGS[2]>>_bras[<<underwear[''pair'']>>]') = 1:
							'You own this bra and can wear this set.'
							act 'Wear set':
								if PCloBra = 1:
									msg'You cannot wear a bra with this top'
								elseif PCloPanties = 1:
									msg'You cannot wear a panties with this outfit'
								else
									if hypnoBra > 0 and hypnoPanty > 0:
										cla
										*clr
										'You pick up the bra and panties and think about trying them on... but you don''t really like wearing underwear.'
										gs 'willpower', 'misc', 'resist'
										will_cost += hypnoTime
										if will_cost <= pcs_willpwr:
											act 'Wear it anyway anyways (<<will_cost>> Willpower)':
												gs 'willpower', 'pay', 'resist'
												gs 'stat'
												gs 'bras', 'wear', $ARGS[2], underwear['pair']
												gs 'panties', 'wear', $ARGS[2], ARGS[3]
				
												if $ARGS[1] = 'wardrobe':
													gt 'wardrobe', 'main'
												else
													gt $loc, $loc_arg
												end
											end
										else
											act 'Wear it anyway anyways (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
										end
										act 'Back':
											gt 'wardrobe', 'main'
										end
									elseif hypnoBra > 0:
										cla
										*clr
										'You pick up the bra and think about trying them on... but you don''t really like wearing bras.'
										gs 'willpower', 'misc', 'resist', 'easy'
										will_cost += hypnoTime
										if will_cost <= pcs_willpwr:
											act 'Put them on anyways (<<will_cost>> Willpower)':
												gs 'willpower', 'pay', 'resist'
												gs 'stat'
												gs 'bras', 'wear', $ARGS[2], underwear['pair']
												gs 'panties', 'wear', $ARGS[2], ARGS[3]
				
												if $ARGS[1] = 'wardrobe':
													gt 'wardrobe', 'main'
												else
													gt $loc, $loc_arg
												end
											end
										else
											act 'Put them on anyways (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
										end
										act 'Back':
											gt 'wardrobe', 'main'
										end
									elseif hypnoPanty > 0:
										cla
										*clr
										'You pick up the panties and think about trying them on... but you don''t really like wearing panties.'
										gs 'willpower', 'misc', 'resist', 'easy'
										will_cost += hypnoTime
										if will_cost <= pcs_willpwr:
											act 'Put them on anyways (<<will_cost>> Willpower)':
												gs 'willpower', 'pay', 'resist'
												gs 'stat'
												gs 'bras', 'wear', $ARGS[2], underwear['pair']
												gs 'panties', 'wear', $ARGS[2], ARGS[3]
					
												if $ARGS[1] = 'wardrobe':
													gt 'wardrobe', 'main'
												else
													gt $loc, $loc_arg
												end
											end
										else
											act 'Put them on anyways (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
										end
										act 'Back':
											gt 'wardrobe', 'main'
										end
									else
										gs 'bras', 'wear', $ARGS[2], underwear['pair']
										gs 'panties', 'wear', $ARGS[2], ARGS[3]

										if $ARGS[1] = 'wardrobe':
											gt 'wardrobe', 'main'
										else
											gt $loc, $loc_arg
										end
									end
								end
							end
						else
							'You do not own the matching bra to make this set.'
						end
					end
				end
			end
			gs 'panties', 'storage_options'
		end
	end
end

if $ARGS[0] = 'storage_options':
	if $ARGS[1] ! 'store':
		act 'Move to storage': gt 'panties', 'dest1', $ARGS[1], $ARGS[2], ARGS[3]
	end
	if $ARGS[1] ! 'unwanted':
		act 'Move to unwanted': gt 'panties', 'dest2', $ARGS[1], $ARGS[2], ARGS[3]
	end
	if $ARGS[1] ! 'wardrobe':
		act 'Move to wardrobe': gt 'panties', 'dest0', $ARGS[1], $ARGS[2], ARGS[3]
	end
	act '<font color="red">Throw these panties away</font>':
		dynamic '<<$ARGS[2]>>_panties[<<ARGS[3]>>] = 0'
		gt 'wardrobe', 'main'
	end
end

if $ARGS[0] = 'dest0':
	*clr
	dynamic '<<$ARGS[2]>>_pantiesS[<<ARGS[3]>>] = 0'
	gt 'panties', 'view_panty_item', $ARGS[1], $ARGS[2], ARGS[3]
end

if $ARGS[0] = 'dest1':
	*clr
	dynamic '<<$ARGS[2]>>_pantiesS[<<ARGS[3]>>] = 1'
	gt 'panties', 'view_panty_item', $ARGS[1], $ARGS[2], ARGS[3]
end

if $ARGS[0] = 'dest2':
	*clr
	dynamic '<<$ARGS[2]>>_pantiesS[<<ARGS[3]>>] = 2'
	gt 'panties', 'view_panty_item', $ARGS[1], $ARGS[2], ARGS[3]
end

if $ARGS[0] = 'sum':
	$t[0] = 'lusso'
	$t[1] = 'cats'
	$t[2] = 'salacious'
	$t[3] = 'fashionista'
	$t[4] = 'gm'
	$t[5] = 'eroto'
	$t[6] = 'danilovich'
	result = 0
	i = 0
	:loopsumpanties_i
	$temp = $t[i]
	j = 1
	:loopsumpanties_j
	$temp1 = '<<$temp>>_panties[<<j>>]'
	$temp2 = '<<$temp>>_pantiesS[<<j>>]'
	dynamic 'if <<$temp1>> = 1 and <<$temp2>> = 0: result +=1'
	j += 1
	if j <= dyneval('result = arrsize(''<<$temp>>_panties'')') : jump 'loopsumpanties_j'
	i += 1
	if i <= arrsize('$t'): jump 'loopsumpanties_i'
	if $ARGS[1] = 'dresser': if $pantyworntype ! 'none' and result > 0: result -= 1
	killvar('t')
	killvar('temp')
	killvar('temp1')
	killvar('temp2')
end

if $ARGS[0] = 'dispose':
	if underwear['type'] = 2: gs 'underwear_bodysuits', 'dispose'
	dynamic $pantyworntype + '_panties[<<pantywornnumber>>] = 0'
	$lastwornpantytype = 'none'
	lastwornpantynumber = 0
	$pantyworntype = 'none'
	pantywornnumber = 0
	PPanMaterial = 0
	PPantyFun = 0
	PPanQuality = 0
	PPanThinness = 0
	PPanCoverFront = 4
	PPanCoverBack = 4

	gs 'clothing', 'exposure_calc'

end

if $ARGS[0] = 'remove':
	if underwear['type'] = 2: gs 'underwear_bodysuits', 'remove'
	$lastwornpantytype = $pantyworntype
	lastwornpantynumber = pantywornnumber
	$pantyworntype = 'none'
	pantywornnumber = 0
	underwear['lastworntype'] = 0
	PPanMaterial = 0
	PPantyFun = 0
	PPanQuality = 0
	PPanThinness = 0
	PPanCoverFront = 4
	PPanCoverBack = 4

	gs 'clothing', 'exposure_calc'

end

if $ARGS[0] = 'wear':
	if underwear['lastworntype'] = 2: gs 'underwear_bodysuits', 'wear'
	if $ARGS[1] = '':
		if dyneval('RESULT = <<$lastwornpantytype>>_pantiesS[<<lastwornpantynumber>>]') = 0 and $lastwornpantytype ! '':
			gs 'panties', 'wear2', $lastwornpantytype, lastwornpantynumber
		else
			$pantyworntype = 'none'
			pantywornnumber = 0
		end
	else
		if dyneval('RESULT = <<$ARGS[1]>>_pantiesS[<<ARGS[2]>>]') = 0:
			gs 'panties', 'wear2', $ARGS[1], ARGS[2]
		else
			$pantyworntype = 'none'
			pantywornnumber = 0
		end
	end
end

if $ARGS[0] = 'wear2':
	!! ARGS 0 - action
	!! ARGS 1 - panties type name
	!! ARGS 2 - panties index

!! removing panties or bodysuit if worn
	if underwear['type'] = 0:
		gs 'panties', 'remove'
	else
		gs 'underwear_bodysuits', 'remove'
	end
	underwear['type'] = 0

	$pantyworntype = $ARGS[1]
	pantywornnumber = ARGS[2]

	gs 'underwear_attributes', $ARGS[1], ARGS[2]

	dynamic '<<$ARGS[1]>>_pantiesS[<<ARGS[2]>>] = 0'

	PPanMaterial = PanMaterial
	PPantyFun = PantyFun
	PPanQuality = PanQuality
	PPanThinness = PanThinness
	PPanCoverFront = PanCoverFront
	PPanCoverBack = PanCoverBack

	gs 'clothing', 'exposure_calc'

end

if $ARGS[0] = 'wear_last_worn':
	!!contingency
	if $lastwornpantytype = '': $lastwornpantytype = 'none'
	gs 'panties', 'wear', $lastwornpantytype, lastwornpantynumber
end

if $ARGS[0] = 'filter_header':
!!Exclude filters
	$Headerstring = '<TD>'
	if clothingfilter['sport'] = 0:
		$Headerstring += '<a href="exec:clothingfilter[''sport''] = 1 & clothingfilter[''sport_only''] = 0 & gt ''panties'', ''view_panty_list'', $ward_list_store"><img src="images/system/icons/clothing/sport.png"></a></TD>'
	else
		$Headerstring += '<a href="exec:clothingfilter[''sport''] = 0 & gt ''panties'', ''view_panty_list'',  $ward_list_store"><img src="images/system/icons/clothing/sport_off.png"></a></TD>'
	end

!!sort by filters
	$Headerstring += '<TD>'
	if clothingfilter['number'] = 0:
		clothingfilter['quality'] = 1 & clothingfilter['inhibition'] = 1
		$Headerstring += '<img src="images/system/icons/clothing/number.png"></TD>'
	else
		$Headerstring += '<a href="exec:clothingfilter[''number''] = 0 & clothingfilter[''quality''] = 1 & clothingfilter[''inhibition''] = 1 & gt ''panties'', ''view_panty_list'',  $ward_list_store"><img src="images/system/icons/clothing/number_off.png"></a></TD>'
	end
	
	$Headerstring += '<TD>'
	if clothingfilter['quality'] = 0:
		$Headerstring += '<img src="images/system/icons/clothing/quality.png"></TD>'
	else
		$Headerstring += '<a href="exec:clothingfilter[''quality''] = 0 & clothingfilter[''number''] = 1 & clothingfilter[''inhibition''] = 1 & gt ''panties'', ''view_panty_list'',  $ward_list_store"><img src="images/system/icons/clothing/quality_off.png"></a></TD>'
	end
	
!! Show only filers
	$Headerstring[1] = '<TD>'
	if clothingfilter['sport_only'] = 0:
		$Headerstring[1] += '<a href="exec:clothingfilter[''sport_only''] = 1 & clothingfilter[''sport''] = 0 & gt ''panties'', ''view_panty_list'',  $ward_list_store"><img src="images/system/icons/clothing/sport_off.png"></a></TD>'
	else
		$Headerstring[1] += '<a href="exec:clothingfilter[''sport_only''] = 0 & gt ''panties'', ''view_panty_list'',  $ward_list_store"><img src="images/system/icons/clothing/sport.png"></a></TD>'
	end


	$Headerstring[2] = '<TH>Include</TH><TH>Sort by</TH><TH></TH>'

	$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>'
end

if $ARGS[0] = 'panty_filter':
!!Exclude filters
	clothingfilter['inc'] = 1
	!!filters, if inc set to 0 they will not display
	if clothingfilter['sport'] = 1 and PanFun = 2:
		clothingfilter['inc'] = 0
	end

!!only filters
	clothingfilter['only'] = 0
	!!filters, if only set to 1 they will only display those set
	if clothingfilter['sport_only'] = 1 and PanFun = 2:
		clothingfilter['only'] = 1
	end
	if clothingfilter['only'] = clothingfilter['sport_only']:
		clothingfilter['only'] = 1
	else
		clothingfilter['only'] = 0
	end

end

if $ARGS[0] = 'shop_filter_header':
!! sort by filters
	$Headerstring = '<TD>'
	if clothingfilter['number'] = 0:
		clothingfilter['quality'] = 1
		$Headerstring += '<img src="images/system/icons/clothing/number.png"></TD>'
	else
		$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>'
	end
	
	$Headerstring += '<TD>'
	if clothingfilter['quality'] = 0:
		$Headerstring += '<img src="images/system/icons/clothing/quality.png"></TD>'
	else
		$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>'
	end


	$Headerstring[2] = '<TH>Sort by</TH>'

	'<center><table><<$Headerstring[2]>>'
	'<TR><border=1><<$Headerstring>>'

	'</table></center>'
end

if $ARGS[0] = 'shop_filter':

end

--- panties ---------------------------------

