Browse Source

[changed] edited 'shop_coco' to use the generalized display loops

f95Lok 2 weeks ago
parent
commit
79a4884542
1 changed files with 6 additions and 94 deletions
  1. 6 94
      locations/shop_coco_carmen.qsrc

+ 6 - 94
locations/shop_coco_carmen.qsrc

@@ -29,46 +29,9 @@ if $ARGS[0] = 'dress':
 	'<center><b><font color="maroon">Viewing Coco Carmen dresses</font></b></center>'
 	*nl
 
-	if intro_custom_shop_return = 1:
-		act 'Return': gt 'intro_customization', 'modclo'
-		step = intro_custom_step
-	else
-		act 'Return': minut += 1 & gt 'shop_coco_carmen', 'start'
-		step = 6
-	end
+	gs 'shop_utils', 'display_clothes', 'coco_dress', 6, 'coco/dress', 'shop', Clothingstock mod 6
 
-	gs 'clothing_QV', 'shop_filter_header'
-	gs 'clothing', 'totals', 'coco_dress'
-
-	!!To filter just this set
-	clo_i = 0
-	:loopcoco_dress_filter
-		i = 1 + Clothingstock mod 6
-		:loopcoco_dress
-			if coco_dress[i] = 0:
-				gs 'clothing_attributes', 'coco_dress', i
-				gs 'clothing_QV', 'shop_filter'
-
-				!!sort by filter
-				if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
-					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''shop_coco_carmen'', ''coco_dress''"><img src="images/pc/items/coco/dress/<<i>>.jpg"	 height="250" /></a>'
-				end
-			end
-			i += step
-		if i <= total: jump 'loopcoco_dress'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
-		jump 'loopcoco_dress_filter'
-	end
-end
-
-if $ARGS[0] = 'coco_dress':
-	if coco_dress[i] ! 0:
-		msg 'You already own this dress.'
-		gt 'shop_coco_carmen', 'dress'
-	end
-
-	gt 'clothing', 'view_clothing_item', 'coco_dress', i, 3000, 'shop'
+	act 'Return': minut += 1 & gt 'shop_coco_carmen', 'start'
 end
 
 if $ARGS[0] = 'outfits':
@@ -78,46 +41,9 @@ if $ARGS[0] = 'outfits':
 	'<center><b><font color="maroon">Viewing Coco Carmen outfits</font></b></center>'
 	*nl
 
-	if intro_custom_shop_return = 1:
-		act 'Return': gt 'intro_customization', 'modclo'
-		step = intro_custom_step
-	else
-		act 'Return': minut += 1 & gt 'shop_coco_carmen', 'start'
-		step = 4
-	end
-
-	gs 'clothing_QV', 'shop_filter_header'
-	gs 'clothing', 'totals', 'coco_outfits'
-	
-	!!To filter just this set
-	clo_i = 0
-	:loopcoco_outfits_filter
-		i = 1 + (Clothingstock / 6) mod 4
-		:loopcoco_outfits
-			if coco_outfits[i] = 0:
-				gs 'clothing_attributes', 'coco_outfits', i
-				gs 'clothing_QV', 'shop_filter'
-
-				!!sort by filter
-				if (clothingfilter['quality'] = 0 and CloQuality = clo_i) or (clothingfilter['inhibition'] = 0 and CloInhibit = clo_i) or clothingfilter['number'] = 0:
-					if clothingfilter['inc'] = 1 and clothingfilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''shop_coco_carmen'', ''coco_outfits''"><img src="images/pc/items/coco/outfits/<<i>>.jpg"	 height="250" /></a>'
-				end
-			end
-			i += step
-		if i <= total: jump 'loopcoco_outfits'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
-		jump 'loopcoco_outfits_filter'
-	end
-end
+	gs 'shop_utils', 'display_clothes', 'coco_outfits', 4, 'coco/outfits', 'shop', (Clothingstock / 6) mod 4
 
-if $ARGS[0] = 'coco_outfits':
-	if coco_outfits[i] ! 0:
-		msg 'You already own this outfit.'
-		gt 'shop_coco_carmen', 'outfits'
-	end
-
-	gt 'clothing', 'view_clothing_item', 'coco_outfits', i, 3000, 'shop'
+	act 'Return': minut += 1 & gt 'shop_coco_carmen', 'start'
 end
 
 if $ARGS[0] = 'purses':
@@ -125,24 +51,10 @@ if $ARGS[0] = 'purses':
 	menu_off = 0
 	gs 'stat'
 
-	if intro_custom_shop_return = 1:
-		act 'Return': gt 'intro_customization', 'modclo'
-		step = intro_custom_step
-	else
-		act 'Return': minut += 1 & gt 'shop_coco_carmen', 'start'
-		step = 1
-	end
+	gs 'shop_utils', 'display_purses', 'coco', 1, 'coco/purses', 'shop'
 
-	gs 'purses', 'totals', 'coco_purses'
-	
-	i = 1
-	:loopcoco_purses
-		if coco_purses[i] = 0: *p '<a href="exec: i = <<i>> & gt ''shop_coco_carmen'', ''purses2''"><img src="images/pc/items/coco/purses/<<i>>.jpg"	 height="150" /></a> '
-		i += step
-	if i <= total: jump 'loopcoco_purses'
+	act 'Return': minut += 1 & gt 'shop_coco_carmen', 'start'
 end
 
-if $ARGS[0] = 'purses2': gt 'purses', 'view_purse_item', 'shop', 'coco', i, 2000
-
 --- shop_coco_carmen ---------------------------------