1
0
Эх сурвалжийг харах

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

f95Lok 2 долоо хоног өмнө
parent
commit
10a89c628c
1 өөрчлөгдсөн 34 нэмэгдсэн , 322 устгасан
  1. 34 322
      locations/shop_gm.qsrc

+ 34 - 322
locations/shop_gm.qsrc

@@ -35,6 +35,11 @@ if $ARGS[0] = 'start':
 		act 'View server uniforms': minut += 5 & gt 'shop_gm', 'gm_server'
 		act 'View school uniforms': minut += 5 & gt 'shop_gm', 'school'
 	end
+	act 'View shoes': minut += 5 & gt 'shop_gm', 'shoes'
+	act 'View coats': minut += 5 & gt 'shop_gm', 'coats'
+	act 'View purses': minut += 5 & gt 'shop_gm', 'purses'
+	act 'View panties': minut += 5 & gt 'shop_gm', 'panties'
+	act 'View bras': minut += 5 & gt 'shop_gm', 'bras'
 end
 
 if $ARGS[0] = 'clothes':
@@ -45,46 +50,9 @@ if $ARGS[0] = 'clothes':
 	'<center><b><font color="maroon">Viewing G&M 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_gm', 'start'
-		step = 3
-	end
+	gs 'shop_utils', 'display_clothes', 'gm_outfits', 3, 'gm/outfits', 'shop', Clothingstock mod 3
 
-	gs 'clothing_QV', 'shop_filter_header'
-	gs 'clothing', 'totals', 'gm_outfits'
-
-	!!To filter just this set
-	clo_i = 0
-	:loopgm_outfits_filter
-		i = 1 + Clothingstock mod 3
-		:loopgm_outfits
-			if gm_outfits[i] = 0:
-				gs 'clothing_attributes', 'gm_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_gm'', ''gm_outfits''"><img src="images/pc/items/gm/outfits/<<i>>.jpg"	 height="250" /></a>'
-				end
-			end
-			i += step
-		if i <= total: jump 'loopgm_outfits'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
-		jump 'loopgm_outfits_filter'
-	end
-end
-
-if $ARGS[0] = 'gm_outfits':
-	if gm_outfits[i] ! 0:
-		msg 'You already own these clothes.'
-		gt 'shop_gm', 'clothes'
-	end
-
-	gt 'clothing', 'view_clothing_item', 'gm_outfits', i, 1000, 'shop'
+	act 'Return': minut += 1 & gt 'shop_gm', 'start'
 end
 
 if $ARGS[0] = 'dresses':
@@ -95,46 +63,9 @@ if $ARGS[0] = 'dresses':
 	'<center><b><font color="maroon">Viewing G&M 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_gm', 'start'
-		step = 3
-	end
-
-	gs 'clothing_QV', 'shop_filter_header'
-	gs 'clothing', 'totals', 'gm_dress'
-
-	!!To filter just this set
-	clo_i = 0
-	:loopgm_dress_filter
-		i = 1 + (Clothingstock / 3) mod 4
-		:loopgm_dress
-			if gm_dress[i] = 0:
-				gs 'clothing_attributes', 'gm_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_gm'', ''gm_dress''"><img src="images/pc/items/gm/dress/<<i>>.jpg"	 height="250" /></a>'
-				end
-			end
-			i += step
-		if i <= total: jump 'loopgm_dress'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
-		jump 'loopgm_dress_filter'
-	end
-end
+	gs 'shop_utils', 'display_clothes', 'gm_dress', 4, 'gm/dress', 'shop', (Clothingstock / 3) mod 4
 
-if $ARGS[0] = 'gm_dress':
-	if gm_dress[i] ! 0:
-		msg 'You already own this dress.'
-		gt 'shop_gm', 'dresses'
-	end
-
-	gt 'clothing', 'view_clothing_item', 'gm_dress', i, 1000, 'shop'
+	act 'Return': minut += 1 & gt 'shop_gm', 'start'
 end
 
 if $ARGS[0] = 'office':
@@ -181,15 +112,6 @@ if $ARGS[0] = 'office':
 	end
 end
 
-if $ARGS[0] = 'officeclo':
-	if gm_office[i] ! 0:
-		msg 'You already own these clothes.'
-		gt 'shop_gm', 'office'
-	end
-
-	gt 'clothing', 'view_clothing_item', 'gm_office', i, 2000, 'shop'
-end
-
 if $ARGS[0] = 'gm_maid':
 	gs 'shortgs', 'setloc', 'shop_gm', 'gm_maid'
 	menu_off = 0
@@ -198,41 +120,11 @@ if $ARGS[0] = 'gm_maid':
 	'<center><b><font color="maroon">Viewing G&M maid 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_gm', 'start'
-		step = 2
-	end
-
-	gs 'clothing_QV', 'shop_filter_header'
-	gs 'clothing', 'totals', 'gm_maid'
-
-	!!To filter just this set
-	clo_i = 0
-	:loopgm_maid_filter
-		i = 1 + (Clothingstock / 12) mod 2
-		:loopgm_maid
-			if gm_maid[i] = 0:
-				gs 'clothing_attributes', 'gm_maid', i
-				gs 'clothing_QV', 'shop_filter'
+	gs 'shop_utils', 'display_clothes', 'gm_maid', 2, 'gm/maid', 'shop', (Clothingstock / 12) mod 2
 
-				!!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_gm'', ''gm_maidclo''"><img src="images/pc/items/gm/maid/<<i>>.jpg"	 height="250" /></a>'
-				end
-			end
-			i += step
-		if i <= total: jump 'loopgm_maid'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
-		jump 'loopgm_maid_filter'
-	end
+	act 'Return': minut += 1 & gt 'shop_gm', 'start'
 end
 
-if $ARGS[0] = 'gm_maidclo': gt 'clothing', 'view_clothing_item', 'gm_maid', i, 2000, 'shop'
-
 if $ARGS[0] = 'gm_server':
 	gs 'shortgs', 'setloc', 'shop_gm', 'gm_server'
 	menu_off = 0
@@ -240,43 +132,12 @@ if $ARGS[0] = 'gm_server':
 
 	'<center><b><font color="maroon">Viewing G&M server uniforms</font></b></center>'
 	*nl
+	
+	gs 'shop_utils', 'display_clothes', 'gm_server', 2, 'gm/server', 'shop', (Clothingstock / 6) mod 2
 
-	if intro_custom_shop_return = 1:
-		act 'Return': gt 'intro_customization', 'modclo'
-		step = intro_custom_step
-	else
-		act 'Return': minut += 1 & gt 'shop_gm', 'start'
-		step = 2
-	end
-
-	gs 'clothing_QV', 'shop_filter_header'
-	gs 'clothing', 'totals', 'gm_server'
-
-	!!To filter just this set
-	clo_i = 0
-	:loopgm_server_filter
-		i = 1 + (Clothingstock / 6) mod 2
-
-		:loopgm_server
-			if gm_server[i] = 0:
-				gs 'clothing_attributes', 'gm_server', 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_gm'', ''gm_serverclo''"><img src="images/pc/items/gm/server/<<i>>.jpg"	 height="250" /></a>'
-				end
-			end
-			i += step
-		if i <= total: jump 'loopgm_server'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
-		jump 'loopgm_server_filter'
-	end
+	act 'Return': minut += 1 & gt 'shop_gm', 'start'
 end
 
-if $ARGS[0] = 'gm_serverclo': gt 'clothing', 'view_clothing_item', 'gm_server', i, 2000, 'shop'
-
 if $ARGS[0] = 'school':
 	gs 'shortgs', 'setloc', 'shop_gm', 'school'
 	menu_off = 0
@@ -285,49 +146,10 @@ if $ARGS[0] = 'school':
 	'<center><b><font color="maroon">Viewing G&M school uniforms</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_gm', 'start'
-		step = 3
-	end
-
-	gs 'clothing_QV', 'shop_filter_header'
-	gs 'clothing', 'totals', 'gm_school'
-
-	!!To filter just this set
-	clo_i = 0
-	:loopgm_school_filter
-		i = 1 + (Clothingstock / 8) mod 3
-		:loopschool
-			if gm_school[i] = 0:
-				gs 'clothing_attributes', 'gm_school', 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_gm'', ''schoolclo''"><img src="images/pc/items/gm/school/<<i>>.jpg"	 height="250" /></a>'
-				end
-			end
-			i += step
-			if intro_custom_noexcept = 0:
-				if i = 6: i = 9
-			end
-		if i <= total: jump 'loopschool'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
-		jump 'loopgm_school_filter'
-	end
-end
-
-if $ARGS[0] = 'schoolclo':
-	if gm_school[i] ! 0:
-		msg 'You already own these clothes.'
-		gt 'shop_gm', 'school'
-	end
+	shop_display_exceptions[0] = 6
+	gs 'shop_utils', 'display_clothes', 'gm_school', 3, 'gm/school', 'shop', (Clothingstock / 8) mod 3
 
-	gt 'clothing', 'view_clothing_item', 'gm_school', i, 1500, 'shop'
+	act 'Return': minut += 1 & killvar 'shop_display_exceptions' & gt 'shop_gm', 'start'
 end
 
 if $ARGS[0] = 'shoes':
@@ -338,87 +160,31 @@ if $ARGS[0] = 'shoes':
 	'<center><b><font color="maroon">Viewing G&M shoes</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_gm', 'start'
-		step = 1
-	end
-
-	gs 'shoes', 'shop_filter_header'
-	gs 'shoes', 'totals', 'gm_shoes'
+	gs 'shop_utils', 'display_shoes', 'gm', 1, 'gm/shoes', 'shop'
 
-	!!To filter just this set
-	clo_i = 0
-	:loopshoequality_filter
-		i = 1
-		:loopgm_shoes
-			if gm_shoe[i] = 0:
-				gs 'shoe_attributes', 'gm', i
-				gs 'shoes', 'shoe_filter'
-				if (Shofilter['quality'] = 0 and ShoQuality = clo_i) or Shofilter['number'] = 0:
-					if Shofilter['inc'] = 1 and Shofilter['only'] = 1: *p '<a href="exec: i = <<i>> & gt ''shop_gm'', ''shoes2''"><img src="images/pc/items/gm/shoes/<<i>>.jpg" height="250" /></a>'
-				end
-			end
-			i += step
-		if i <= total: jump 'loopgm_shoes'
-		clo_i += 1
-	if Shofilter['quality'] = 0 and clo_i <= 7:
-		jump 'loopshoequality_filter'
-	end
+	act 'Return': minut += 1 & gt 'shop_gm', 'start'
 end
 
-if $ARGS[0] = 'shoes2': gt 'shoes', 'view_shoe_item', 'shop', 'gm', i, 700
-
 if $ARGS[0] = 'coats':
 	gs 'shortgs', 'setloc', 'shop_gm', 'coats'
 	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_gm', 'start'
-		step = 1
-	end
-
-	gs 'coats', 'totals', 'gm_coats'
+	gs 'shop_utils', 'display_coats', 'gm', 1, 'gm/coats', 'shop'
 
-	i = 1
-	:loopcoats
-		if gm_coats[i] = 0:*p '<a href="exec: i = <<i>> & gt ''shop_gm'', ''coats2''"><img src="images/pc/items/gm/coats/<<i>>.jpg"	 height="250" /></a>'
-		i += step
-	if i <= total: jump 'loopcoats'
+	act 'Return': minut += 1 & gt 'shop_gm', 'start'
 end
 
-if $ARGS[0] = 'coats2': gt 'coats', 'view_coat_item', 'shop', 'gm', i, 1500
-
 if $ARGS[0] = 'purses':
 	gs 'shortgs', 'setloc', 'shop_gm', '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_gm', 'start'
-		step = 1
-	end
-
-	gs 'purses', 'totals', 'gm_purses'
+	gs 'shop_utils', 'display_purses', 'gm', 1, 'gm/purses', 'shop'
 
-	i = 1
-	:looppurses
-		if gm_purses[i] = 0:*p '<a href="exec: i = <<i>> & gt ''shop_gm'', ''purses2''"><img src="images/pc/items/gm/purses/<<i>>.jpg"	 height="250" /></a>'
-		i += step
-	if i <= total: jump 'looppurses'
+	act 'Return': minut += 1 & gt 'shop_gm', 'start'
 end
 
-if $ARGS[0] = 'purses2': gt 'purses', 'view_purse_item', 'shop', 'gm',i, 1500
-
 if $ARGS[0] = 'panties':
 	gs 'shortgs', 'setloc', 'shop_gm', 'panties'
 	menu_off = 0
@@ -426,41 +192,15 @@ if $ARGS[0] = 'panties':
 
 	'<center><b><font color="maroon">Viewing G&M panties</font></b></center>'
 
-	if intro_custom_shop_return = 1:
-		act 'Return': gt 'intro_customization', 'modclo'
-		step = intro_custom_step
-	else
-		act 'Return': minut += 1 & gt 'shop_gm', 'start'
-		step = 1
-	end
-
-	gs 'panties', 'shop_filter_header'
-	gs 'panties', 'totals', 'gm_panties'
+	shop_display_exceptions[0] = 7
+	shop_display_exceptions[1] = 9
+	shop_display_exceptions[2] = 21
+	shop_display_exceptions[3] = 37
+	gs 'shop_utils', 'display_panties', 'gm', 1, 'gm/panties', 'shop'
 
-	!!To filter just this set
-	clo_i = 0
-	:looppantyquality_filter
-		i = 1
-		:looppanties
-			if gm_panties[i] = 0:
-				gs 'underwear_attributes', 'gm_panties', i
-				if (clothingfilter['quality'] = 0 and PanQuality = clo_i) or clothingfilter['number'] = 0:
-					*p '<a href="exec: i = <<i>> & gt ''shop_gm'', ''panties2''"><img src="images/pc/items/gm/panties/<<i>>.jpg"	 height="150" /></a>'
-				end
-			end
-			i += step
-			if intro_custom_noexcept = 0:
-				if i = 7 or i = 9 or i = 21 or i = 37: i += 1
-			end
-		if i <= total: jump 'looppanties'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 6:
-		jump 'looppantyquality_filter'
-	end
+	act 'Return': minut += 1 & killvar 'shop_display_exceptions' & gt 'shop_gm', 'start'
 end
 
-if $ARGS[0] = 'panties2': gt 'panties', 'view_panty_item', 'shop', 'gm', i, 300
-
 if $ARGS[0] = 'bras':
 	gs 'shortgs', 'setloc', 'shop_gm', 'bras'
 	menu_off = 0
@@ -469,40 +209,12 @@ if $ARGS[0] = 'bras':
 	'<center><b><font color="maroon">Viewing G&M bras</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_gm', 'start'
-		step = 1
-	end
-
-	gs 'bras', 'shop_filter_header'
-	gs 'bras', 'totals', 'gm_bras'
+	shop_display_exceptions[0] = 11
+	shop_display_exceptions[1] = 16
+	shop_display_exceptions[2] = 18
+	gs 'shop_utils', 'display_bras', 'gm', 1, 'gm/bras', 'shop'
 
-	!!To filter just this set
-	clo_i = 0
-	:loopbraquality_filter
-		i = 1
-		:loopgm_bras
-			if gm_bras[i] = 0:
-				gs 'underwear_attributes', 'gm_bras', i
-				if (clothingfilter['quality'] = 0 and BraQuality = clo_i) or clothingfilter['number'] = 0:
-					*p '<a href="exec: i = <<i>> & gt ''shop_gm'', ''bras2''"><img src="images/pc/items/gm/bras/<<i>>.jpg"	 height="150" /></a>'
-				end
-			end
-			i += step
-			if intro_custom_noexcept = 0:
-				if i = 11 or i = 16 or i = 18: i += 1
-			end
-		if i <= total: jump 'loopgm_bras'
-		clo_i += 1
-	if clothingfilter['quality'] = 0 and clo_i <= 6:
-		jump 'loopbraquality_filter'
-	end
+	act 'Return': minut += 1 & killvar 'shop_display_exceptions' & gt 'shop_gm', 'start'
 end
 
-if $ARGS[0] = 'bras2': gt 'bras', 'view_bra_item', 'shop', 'gm', i, 300
-
-
 --- shop_gm ---------------------------------