Forráskód Böngészése

[added] Gadukino Farmers market. Mostly still a skeleton, and still needs images and more text. But it's there

anjuna krokus 4 hónapja
szülő
commit
ee83f6e3c4

+ 1 - 0
glife.qproj

@@ -1168,6 +1168,7 @@
 		<Location name="gad_forest_lost"/>
 		<Location name="gad_meadow"/>
 		<Location name="gad_church"/>
+		<Location name="gad_market"/>
 		<Location name="gad_swamp"/>
 		<Location name="gad_swamp_yard"/>
 		<Location name="gad_swamphouse"/>

+ 49 - 12
locations/gad_gpyard.qsrc

@@ -146,9 +146,30 @@ if $ARGS[0] = 'root_cellar':
 		'Your grandparents'' root cellar is empty.'
 	end
 	'Even though your grandparents allow you to store extra mushrooms and berries you pick, they reserve the right to use them, too, so you aren''t surprised if any go missing.'
-	if boletus_stored > 0: 'You currently are storing <b><<boletus_stored>></b> kg of raw mushrooms.'
-	if bilberry_stored > 0: 'You currently are storing <b><<bilberry_stored>></b> kg of raw berries.'
+	if boletus_stored + bilberry_stored > 0:
+		$temp_text = 'You currently are storing '
+		if boletus_stored > 0:
+			$temp_text += '<b><<boletus_stored>></b> kg of raw mushrooms'
+			if bilberry_stored > 0: $temp_text += ' and '
+		end
+		if bilberry_stored > 0: $temp_text += '<b><<bilberry_stored>></b> kg of raw berries'
+		$temp_text += '.'
+		'<<$temp_text>>'
+		killvar '$temp_text'
+	end
+	if boletus_stored + bilberry_stored >= 20:
+		'You can''t store anymore mushrooms and berries.'
+	else
+		'You can still store <b><<20 - boletus_stored - bilberry_stored>></b> kg of mushrooms and berries.'
+	end
+	if fish_stored > 0: 'You currently are storing <b><<fish_stored>></b> kg of preserved fish.'
+	if fish_stored >= 10:
+		'You can''t store anymore preserved fish.'
+	else
+		'You can still store <b><<10 - fish_stored>></b> kg of preserved fish.'
+	end
 	*nl
+
 	if boletus + boletus_cooked + bilberry >= 5:
 		'Your basket is full and you cannot carry more.'
 	elseif boletus + boletus_cooked + bilberry > 0:
@@ -156,6 +177,7 @@ if $ARGS[0] = 'root_cellar':
 	else
 		'Your basket is empty.'
 	end
+
 	if boletus > 0: 'You currently are carrying <b><<boletus>></b> kg of raw mushrooms.'
 	if boletus_cooked > 0: 'You currently are carrying <b><<boletus_cooked>></b> kg of cooked mushrooms.'
 	if bilberry > 0: 'You currently are carrying <b><<bilberry>></b> kg of raw berries.'
@@ -164,16 +186,15 @@ if $ARGS[0] = 'root_cellar':
 	if (boletus_stored + bilberry_stored < 20) and (boletus > 0 or bilberry > 0):
 		act 'Store as many raw mushrooms and berries that will fit (Max 20 kgs):':
 			:store_bb_loop
-			if boletus > 0:
-				boletus_stored += 1
-				boletus -= 1
-				if boletus_stored + bilberry_stored < 20: jump 'store_bb_loop'
-			end
-			if bilberry > 0:
-				bilberry_stored += 1
-				bilberry -= 1
-				if boletus_stored + bilberry_stored < 20: jump 'store_bb_loop'
-			end
+				if boletus > 0 and boletus_stored + bilberry_stored < 20:
+					boletus_stored += 1
+					boletus -= 1
+				end
+				if bilberry > 0 and boletus_stored + bilberry_stored < 20:
+					bilberry_stored += 1
+					bilberry -= 1
+				end
+			if boletus_stored + bilberry_stored < 20 and boletus + bilberry > 0: jump 'store_bb_loop'
 			gt 'gad_gpyard', 'root_cellar'
 		end
 		if boletus > 0:
@@ -191,6 +212,22 @@ if $ARGS[0] = 'root_cellar':
 			end
 		end
 	end
+	if boletus_stored + bilberry_stored <= 10:
+		if mc_inventory['mushrooms'] > 0 and boletus_stored + bilberry_stored <= 10:
+			act 'Store 10 kg of bought mushrooms':
+				mc_inventory['mushrooms'] -= 1
+				boletus_stored += 10
+				gt 'gad_gpyard', 'root_cellar'
+			end
+		end
+		if mc_inventory['berries'] > 0 and boletus_stored + bilberry_stored <= 10:
+			act 'Store 10 kg of bought berries':
+				mc_inventory['berries'] -= 1
+				bilberry_stored += 10
+				gt 'gad_gpyard', 'root_cellar'
+			end
+		end
+	end
 	if (boletus_stored > 0 or bilberry_stored > 0) and (boletus + boletus_cooked + bilberry < 5):
 		act 'Retrieve as many raw mushrooms and berries as you can carry (Max 5 kgs)':
 			:retrieve_bb_loop

+ 485 - 0
locations/gad_market.qsrc

@@ -0,0 +1,485 @@
+# gad_market
+
+if $ARGS[0] = 'start':
+	$region = 'gad'
+	menu_off = 0
+	gs 'shortgs', 'setloc', 'gad_market', 'start'
+	$location_type = 'public_outdoors'
+	CLOSE ALL
+	if sound = 0:
+		if month >=11 and month <= 12 or month >=1 and month <=3:
+			PLAY 'sound/street2.mp3',30 & PLAY 'sound/zima.mp3',30
+		else
+			PLAY 'sound/street2.mp3',30 & PLAY 'sound/street_leto.mp3',30
+		end
+	end
+	gs 'stat'
+
+	'<center><h2>Farmers Market</h2></center>'
+	'<center><img <<$set_imgh>> src="images/locations/gadukino/market/farmersmarket.jpg"></center>'
+	'A small and modest farmers market, a few small shops fill the space.'
+	*nl
+
+	if hour < 8 or hour > 20:
+		gs 'gad_market', 'close'
+		exit
+	end
+
+	'On one side you spot a stand where' + iif(hunters_were_met = 1, ' the hunters are ', ' ') + 'selling <a href="exec:minut += 1 & gt ''gad_market'', ''hunter_stand''">dried goods</a>.'
+	act 'Browse the <<iif(hunters_were_met = 1, ''hunters'', ''dried food'')>> stand': minut += 1 & gt 'gad_market', 'hunter_stand'
+
+	'You spot a stand filled with <a href="exec:minut += 1 & gt ''gad_market'', ''clothing_stand''">cheap clothing</a>.'
+	act 'Browse the clothing stand': minut += 1 & gt 'gad_market', 'clothing_stand'
+
+	if gad_stand = 1:
+		if hour <= 20:
+			act 'Go to your own stand (0:01)': minut += 1 & gt 'gad_market', 'your_stand'
+		end
+
+		act 'Breakdown your stand (0:30)': gt 'gad_market', 'breakdown_stand'
+		act '<font color="red">Return</font>': *nl '<font color="red">You can''t leave while your stand is still open.</font>'
+	else
+		if hour < 18 and (boletus_stored + bilberry_stored + fish_stored) > 0:
+			act 'Setup your own stand (1:00)': gt 'gad_market', 'build_stand'
+		elseif hour >= 18:
+			*nl
+			'It''s too late to build your stand'
+		else
+			*nl
+			'You have nothing to sell.'
+		end
+		act 'Return': gt 'gad_market', 'leave'
+	end
+end
+
+
+!----- Shops -----
+
+if $ARGS[0] = 'hunter_stand':
+	menu_off = 0
+	gs 'shortgs', 'setloc', 'gad_market', 'hunter_stand'
+	$loc_s = 'gad_market'
+	$args_s = 'hunter_stand'
+	gs 'stat'
+
+	if hour < 8 or hour > 20:
+		'The shop is currently closed.'
+
+		act 'Leave': gt 'gad_market', 'clothing_stand'
+		exit
+	end
+
+
+	'A small stand selling dried meat'
+
+	if hunters_were_met = 1: act 'Talk to one of the hunters': gt 'gad_market', 'hunter_talk'
+
+	act 'Browse the stand': gt 'gad_market', 'hunter_cart'
+	act 'Stop browsing': gt 'gad_market', 'start'
+end
+
+if $ARGS[0] = 'hunter_cart':
+	menu_off = 1
+	gs 'shortgs', 'setloc', 'gad_market', 'hunter_cart'
+	$loc_s = 'gad_market'
+	$args_s = 'hunter_cart'
+	gs 'stat'
+
+	if hour < 8 or hour > 20:
+		'The shop is currently closed.'
+
+		act 'Leave': gt 'gad_market', 'hunter_stand'
+		exit
+	end
+
+	gs 'item_cart', 'shoppping_aisle', 'gad_market_hunter'
+	gs 'stat'
+	gs 'themes', 'outdoors'
+
+	act 'Exit shopping cart': $backimage = '' & gt 'gad_market', 'hunter_stand'
+	act 'Leave the stand': minut += 1 & gt 'gad_market', 'start'
+end
+
+if $ARGS[0] = 'clothing_stand':
+	menu_off = 0
+	gs 'shortgs', 'setloc', 'gad_market', 'clothing_stand'
+	$loc_s = 'gad_market'
+	$args_s = 'clothing_stand'
+
+	'A small stand selling cheap clothes'
+
+	if hour < 8 or hour > 20:
+		'The shop is currently closed.'
+
+		act 'Leave': gt 'gad_market', 'clothing_stand'
+		exit
+	end
+
+
+	act 'Browse the clothes': gt 'gad_market', 'clothing_cart'
+	act 'Browse the swimsuits': gt 'gad_market', 'swimsuit_cart'
+	act 'Stop browsing': gt 'gad_market', 'start'
+end
+
+if $ARGS[0] = 'clothing_cart':
+	menu_off = 0
+	gs 'shortgs', 'setloc', 'gad_market', 'clothing_cart'
+	$loc_s = 'gad_market'
+	$args_s = 'clothing_cart'
+	gs 'stat'
+
+	'<center><b><font color="maroon">Clothes</font></b></center>'
+	'You inspect what cheap clothing the stall has to offer.'
+
+	if hour < 8 or hour > 20:
+		'The shop is currently closed.'
+
+		act 'Leave': gt 'gad_market', 'clothing_stand'
+		exit
+	end
+
+	act 'Return': minut += 5 & gt 'gad_market', 'clothing_stand'
+
+	gs 'clothing_QV', 'shop_filter_header'
+	gs 'clothing', 'totals', 'market_outfits'
+
+	!!To filter just this set
+	clo_i = 0
+	:loopmarket_outfits_filter
+		i = 1 + clothingstock mod 4
+		:loopmarket_outfits
+			if market_outfits[i] = 0:
+				gs 'clothing_attributes', 'market_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 ''gad_market'', ''marketclo''"><img <<$set_imgh>> src="images/pc/items/market/clothes/<<i>>.jpg" 	height="250" /></a>'
+				end
+			end
+			!! Only half of the market outfits are ever sold here.
+			i += 8
+		if i <= total: jump 'loopmarket_outfits'
+		clo_i += 1
+	if (clothingfilter['quality'] = 0 and clo_i <= 7) or (clothingfilter['inhibition'] = 0 and clo_i <= 50):
+		jump 'loopmarket_outfits_filter'
+	end
+end
+
+if $ARGS[0] = 'marketclo':
+	if market_outfits[i] ! 0:
+		msg 'You already own these clothes.'
+		gt 'gad_market', 'clothing_cart'
+	end
+
+	gt 'clothing', 'view_clothing_item', 'market_outfits', i, 750, 'shop'
+end
+
+if $ARGS[0] = 'swimsuit_cart':
+	menu_off = 0
+	gs 'shortgs', 'setloc', 'gad_market', 'swimsuit_cart'
+	$loc_s = 'gad_market'
+	$args_s = 'swimsuit_cart'
+	gs 'stat'
+
+	'<center><b><font color="maroon">Swimsuits</font></b></center>'
+	'You inspect what cheap swimsuits the stall has to offer.'
+
+	if hour < 8 or hour > 20:
+		'The shop is currently closed.'
+
+		act 'Leave': gt 'gad_market', 'clothing_stand'
+		exit
+	end
+
+	act 'Return': minut += 5 & gt 'gad_market', 'clothing_stand'
+
+	gs 'clothing_QV', 'shop_filter_header'
+
+	!!To filter just this set
+	clo_i = 0
+	:loopgad_swim_filter
+		if (Clothingstock / 4) mod 2 = 0:
+			i = 4
+			if scandalicious_swimsuit[i] = 0:
+				gs 'clothing_attributes', 'scandalicious_swimsuit', 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 ''gad_market'', ''swim1''"><img src="images/pc/items/scandalicious/swim/one/<<i>>.jpg"	 height="250" /></a>'
+				end
+			end
+			i = 6
+			if scandalicious_bikinis[i] = 0:
+				gs 'clothing_attributes', 'scandalicious_bikinis', 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 ''gad_market'', ''bikini1''"><img src="images/pc/items/scandalicious/swim/two/<<i>>.jpg"	 height="250" /></a>'
+				end
+			end
+			i = 7
+			if scandalicious_bikinis[i] = 0:
+				gs 'clothing_attributes', 'scandalicious_bikinis', 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 ''gad_market'', ''bikini1''"><img src="images/pc/items/scandalicious/swim/two/<<i>>.jpg"	 height="250" /></a>'
+				end
+			end
+		else
+			i = 15
+			if scandalicious_swimsuit[i] = 0:
+				gs 'clothing_attributes', 'scandalicious_swimsuit', 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 ''gad_market'', ''swim1''"><img src="images/pc/items/scandalicious/swim/one/<<i>>.jpg"	 height="250" /></a>'
+				end
+			end
+			i = 22
+			if scandalicious_swimsuit[i] = 0:
+				gs 'clothing_attributes', 'scandalicious_swimsuit', 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 ''gad_market'', ''swim1''"><img src="images/pc/items/scandalicious/swim/one/<<i>>.jpg"	 height="250" /></a>'
+				end
+			end
+			i = 60
+			if scandalicious_bikinis[i] = 0:
+				gs 'clothing_attributes', 'scandalicious_bikinis', 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 ''gad_market'', ''bikini1''"><img src="images/pc/items/scandalicious/swim/two/<<i>>.jpg"	 height="250" /></a>'
+				end
+			end
+		end
+		clo_i += 1
+	if clothingfilter['quality'] = 0 and clo_i <= 7 or clothingfilter['inhibition'] = 0 and clo_i <= 50:
+		jump 'loopgad_swim_filter'
+	end
+end
+
+if $ARGS[0] = 'bikini1': gt 'clothing', 'view_clothing_item', 'scandalicious_bikinis', i, 1750, 'shop'
+if $ARGS[0] = 'swim1': gt 'clothing', 'view_clothing_item', 'scandalicious_swimsuit', i, 1750, 'shop'
+
+
+
+if $ARGS[0] = 'build_stand':
+	menu_off = 1
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+	'It takes you roughly an hour to setup your stand.'
+
+	act 'Continue':
+		minut += rand(40, 60)
+		gad_stand = 1
+		gt 'gad_market', 'your_stand'
+	end
+end
+
+if $ARGS[0] = 'breakdown_stand':
+	menu_off = 1
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+	'It takes you roughly half an hour to break down your stand.'
+
+	act 'Continue':
+		minut += rand(20, 30)
+		gad_stand = 0
+		gt 'gad_market', 'start'
+	end
+end
+
+
+if $ARGS[0] = 'your_stand':
+	gs 'shortgs', 'setloc', 'gad_market', 'your_stand'
+	gs 'stat'
+
+	'<center><b><font color="maroon">Your Stand</font></b></center>'
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+	gs 'gad_market', 'see_stored'
+
+	act 'Try and sell your wares': gt 'gad_market', 'sell_wares'
+	act 'Go back': gt 'gad_market', 'start'
+end
+
+if $ARGS[0] = 'sell_wares':
+	menu_off = 1
+	gs 'stat'
+
+	if hour < 8 or hour > 20:
+		'The market is closed, you should break down your stand.'
+		act 'Break down your stand': gt 'gad_market', 'breakdown_stand'
+		exit
+	end
+
+
+	temp_rand = rand(0, 249)
+	if temp_rand >= pcs_chrsm + pcs_persuas:
+		if rand(0, 2) > 0:
+			gt 'gad_market', 'sell_talk'
+		else
+			gt 'gad_market', 'sell_nobody'
+		end
+	else
+		temp_rand = rand(0, 6)
+		if temp_rand < 2 and boletus_stored > 0:
+			gt 'gad_market', 'sell_mushrooms'
+		elseif temp_rand >= 2 and temp_rand < 4 and bilberry_stored > 0:
+			gt 'gad_market', 'sell_berries'
+		elseif temp_rand >= 4 and temp_rand < 6 and fish_stored > 0:
+			gt 'gad_market', 'sell_fish'
+		else
+			gt 'gad_market', 'sell_talk'
+		end
+	end
+end
+
+if $ARGS[0] = 'sell_nobody':
+	minut += 10
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+	gs 'gad_market', 'see_stored'
+
+
+	'You wait 10 minutes, but nobody seems interested in what you have to sell'
+	act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
+	act 'Stop selling  your wares': gt 'gad_market', 'your_stand'
+
+
+elseif $ARGS[0] = 'sell_mushrooms':
+	minut += 10
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+	gs 'gad_market', 'see_stored'
+	'Somebody wants to buy a kg of mushrooms!'
+
+	act 'Sell them 1 kg of stored mushrooms':
+		*clr & cla
+		money += 20
+		boletus_stored -= 1
+		gs 'stat'
+
+		'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+		gs 'gad_market', 'see_stored'
+		'You sell 1 kg of stored mushrooms'
+
+		act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
+		act 'Stop selling  your wares': gt 'gad_market', 'your_stand'
+	end
+
+
+elseif $ARGS[0] = 'sell_berries':
+	minut += 10
+	gs 'stat'
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+
+	gs 'gad_market', 'see_stored'
+
+
+	'Somebody wants to buy a kg of berries!'
+	act 'Sell them 1 kg of stored berries':
+		*clr & cla
+		money += 20
+		bilberry_stored -= 1
+		gs 'stat'
+
+		'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+		gs 'gad_market', 'see_stored'
+		'You sell 1 kg of stored berries'
+
+		act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
+		act 'Stop selling  your wares': gt 'gad_market', 'your_stand'
+	end
+
+elseif $ARGS[0] = 'sell_fish':
+	minut += 10
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+	gs 'gad_market', 'see_stored'
+	'Somebody wants to buy a kg of preserved fish!'
+
+	act 'Sell them 1 kg of preserved fish':
+		*clr & cla
+		money += 20
+		fish_stored -= 1
+		gs 'stat'
+
+		'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+		gs 'gad_market', 'see_stored'
+		'You sell 1 kg of preserved fish'
+
+		act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
+		act 'Stop selling  your wares': gt 'gad_market', 'your_stand'
+	end
+
+elseif $ARGS[0] = 'sell_talk':
+	minut += 10
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> src="images/system/image_needed.png"></center>'
+	gs 'gad_market', 'see_stored'
+	'A couple of people walk up to your stand and you spend tem minutes making some small-talk.'
+
+	act 'Continue trying to sell your wares': gt 'gad_market', 'sell_wares'
+	act 'Stop selling  your wares': gt 'gad_market', 'your_stand'
+end
+
+if $ARGS[0] = 'see_stored':
+	if boletus_stored > 0:	'You currently are storing <b><<boletus_stored>></b> kg of raw mushrooms.'
+	if bilberry_stored > 0:	'You currently are storing <b><<bilberry_stored>></b> kg of raw berries.'
+	if fish_stored > 0:		'You currently are storing <b><<fish_stored>></b> kg of preserved fish.'
+	if boletus_stored + bilberry_stored + fish_stored = 0: 'You currently have nothing that you can sell'
+end
+
+
+
+
+
+if $ARGS[0] = 'hunter_talk':
+	menu_off = 1
+	minut += 5
+	gs 'stat'
+
+	'<center><img <<$set_imgh>> scr="images/system/image_needed.png"></center>'
+	'You talk to the hunters.'
+
+	act 'Return': gt 'gad_market', 'hunter_stand'
+end
+
+
+
+if $ARGS[0] = 'close':
+	menu_off = 1
+	gs 'stat'
+
+	if gad_stand = 1:
+		'The market is closing, you should break down your stand.'
+		act 'Break down your stand': gt 'gad_market', 'breakdown_stand'
+	else
+		'The market is closing and so you head back to the main street.'
+		act 'Return': gt 'gad_market', 'leave'
+	end
+end
+
+if $ARGS[0] = 'leave':
+	minut += 5
+	killvar 'temp_rand'
+	gt 'gadukino'
+end
+
+--- gad_market ---------------------------------

+ 105 - 50
locations/gad_river.qsrc

@@ -159,10 +159,11 @@ if $ARGS[0] = 'fishers':
 
 	'<center><img <<$set_imgh>> src="images/locations/gadukino/river/gadriverfishers.jpg"></center>'
 
-	if fishersday ! daystart:
+	if fishersday = daystart:
+		act 'Leave': gt 'gad_river', 'start'
+	else
 		act 'Greet':
-			cla
-			*clr
+			*clr & cla
 			fishersday = daystart
 			minut += 3
 			if fishersQW < 3:fishersQW += 1
@@ -173,8 +174,7 @@ if $ARGS[0] = 'fishers':
 
 			if fishersQW >= 3:
 				act 'Chat':
-					cla
-					*clr
+					*clr & cla
 					minut += 10
 					if fishersQW = 3:fishersQW = 4
 					gs 'stat'
@@ -187,8 +187,7 @@ if $ARGS[0] = 'fishers':
 			end
 			if fishersQW = 4:
 				act 'Ask to borrow a fishing rod':
-					cla
-					*clr
+					*clr & cla
 					minut += 10
 					fishersQW = 5
 					gs 'stat'
@@ -198,11 +197,9 @@ if $ARGS[0] = 'fishers':
 
 					act 'Fishing': gt 'gad_river', 'fishing'
 				end
-			end
-			if fishersQW = 5:
+			elseif fishersQW = 5:
 				act 'Fishing with them':
-					cla
-					*clr
+					*clr & cla
 					minut += 10
 					gs 'stat'
 
@@ -215,8 +212,6 @@ if $ARGS[0] = 'fishers':
 
 			act 'Leave': gt 'gad_river', 'start'
 		end
-	else
-		act 'Leave': gt 'gad_river', 'start'
 	end
 end
 
@@ -244,8 +239,7 @@ if $ARGS[0] = 'fishing':
 			'You throw out the lure and watch the bobber for signs of a nibble.'
 
 			if temp_rand < rand(1, 5):
-				cla
-				*clr
+				*clr & cla
 				minut += 1
 				gs 'stat'
 
@@ -285,17 +279,17 @@ if $ARGS[0] = 'fishing':
 			killvar 'temp_rand'
 		end
 		act 'Finish':
-			cla
-			*clr
+			*clr & cla
 			minut += 5
 			gs 'stat'
 
 			'<center><img <<$set_imgh>> src="images/locations/gadukino/river/talkfishers.jpg"></center>'
 			'You''re tired, so you return the fishing rod to uncle Stepan.'
-			if fish > 0:
+			if fish = 0:
+				act 'Leave': gt $loc, $loc_arg
+			else
 				act 'Release your catch':
-					cla
-					*clr
+					*clr & cla
 					minut += 5
 					fish = 0
 					gs 'stat'
@@ -305,9 +299,9 @@ if $ARGS[0] = 'fishing':
 
 					act 'Leave': gt $loc, $loc_arg
 				end
+				!{
 				act 'Give the fish to Uncle Stepan':
-					cla
-					*clr
+					*clr & cla
 					minut += 5
 					fish = 0
 					gs 'stat'
@@ -317,36 +311,65 @@ if $ARGS[0] = 'fishing':
 
 					act 'Leave': gt $loc, $loc_arg
 				end
+				}
 				act 'Bring a fish to Boniface':
-					cla
-					*clr
+					*clr & cla
 					minut += 5
 					fish -= 1
-					pcs_mood += rand(15,40)
+					pcs_mood += rand(15, 40)
 					gs 'stat'
 
 					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/villcat2.jpg"></center>'
 					'As soon as you enter the house, Boniface immediately jumps to the floor and twines around your feet. Then, the furry beast starts loudly yowling and pawing at your legs. He has obviously detected the smell of fresh fish. You treat Boniface to a small fish, and within a few minutes, all that remains is a pile of fish bones.'
-					if fish >0: fish = 0 & 'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
-
+					!if fish > 0: fish = 0 & 'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
+					if fish > 0:
+						'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather.'
+						if fish_stored >= 10:
+							'He sighs heavily, then takes the fish outside to preserve them. Since you can''t store anymore fish in the root celler, your grandfather decide to give the remaining <<fish>> away.'
+						elseif fish_stored + fish > 10:
+							fish -= (10 - fish_stored)
+							'He sighs heavily, then takes the fish outside to preserve and store them, filling up the remaining space. He decides to give the remaining <<fish>> fish away.'
+						else
+							fish_stored += fish
+							'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to preserve and store them in the root celler.'
+							if fish_stored < 10:
+								'There''s still space for <<10 - fish_stored>> kg of preserved fish.'
+							else
+								'There''s no more space for preserved fish in the root celler.'
+							end
+						end
+						fish = 0
+					end
 					act 'Finish': gt 'gad_gphouse', 'start'
 				end
 				act 'Give the fish to your grandmother':
-					cla
-					*clr
+					*clr & cla
 					minut += 5
+					gs 'stat'
 					'<center><img <<$set_imgh>> src="images/locations/gadukino/grandparents/givefish.jpg"></center>'
-					'You try to give the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
-
+					!'You try to give the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
+					'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather.'
+					if fish_stored >= 10:
+						'He sighs heavily, then takes the fish outside to preserve them. Since you can''t store anymore fish in the root celler, your grandfather decide to give the remaining <<fish>> away.'
+					elseif fish_stored + fish > 10:
+						fish -= (10 - fish_stored)
+						'He sighs heavily, then takes the fish outside to preserve and store them, filling up the remaining space. He decides to give the remaining <<fish>> fish away.'
+					else
+						fish_stored += fish
+						'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to preserve and store them in the root celler.'
+						if fish_stored < 10:
+							'There''s still space for <<10 - fish_stored>> kg of preserved fish.'
+						else
+							'There''s no more space for preserved fish in the root celler.'
+						end
+					end
+					fish = 0
 					act 'Finish': gt 'gad_gphouse', 'start'
 				end
-			else
-				act 'Leave': gt $loc, $loc_arg
 			end
 		end
 	else
-		cla
-		*clr
+		*clr & cla
 		minut += 5
 		pcs_mood -= rand(5,10)
 		gs 'stat'
@@ -354,10 +377,11 @@ if $ARGS[0] = 'fishing':
 		'<center><img <<$set_imgh>> src="images/locations/gadukino/river/talkfishers.jpg"></center>'
 		'Uncle Stepan says, "It''s time to head home, young lady." You reluctantly return his fishing rod, knowing that''s it for today.'
 
-		if fish > 0:
+		if fish = 0:
+			act 'Leave': gt $loc, $loc_arg
+		else
 			act 'Release your catch':
-				cla
-				*clr
+				*clr & cla
 				minut += 5
 				fish = 0
 				gs 'stat'
@@ -367,9 +391,9 @@ if $ARGS[0] = 'fishing':
 
 				act 'Leave': gt $loc, $loc_arg
 			end
+			!{
 			act 'Give to Uncle Stepan':
-				cla
-				*clr
+				*clr & cla
 				minut += 5
 				fish = 0
 				gs 'stat'
@@ -379,10 +403,10 @@ if $ARGS[0] = 'fishing':
 
 				act 'Leave': gt $loc, $loc_arg
 			end
+			}
 			if grandmaQW['block'] = 0:
 				act 'Bring a fish to Boniface':
-					cla
-					*clr
+					*clr & cla
 					minut += 5
 					fish -= 1
 					pcs_mood += rand(15,40)
@@ -390,22 +414,53 @@ if $ARGS[0] = 'fishing':
 
 					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/villcat2.jpg"></center>'
 					'As soon as you enter the house, Boniface immediately jumps to the floor and twines around your feet. Then, the furry beast starts loudly yowling and pawing at your legs. He has obviously detected the smell of fresh fish. You treat Boniface to a small fish, and within a few minutes, all that remains is a pile of fish bones.'
-					if fish >0: fish = 0 & 'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
-
+					!if fish > 0: fish = 0 & 'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
+					if fish > 0:
+						'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather.'
+						if fish_stored >= 10:
+							'He sighs heavily, then takes the fish outside to preserve them. Since you can''t store anymore fish in the root celler, your grandfather decide to give the remaining <<fish>> away.'
+						elseif fish_stored + fish > 10:
+							fish -= (10 - fish_stored)
+							'He sighs heavily, then takes the fish outside to preserve and store them, filling up the remaining space. He decides to give the remaining <<fish>> fish away.'
+						else
+							fish_stored += fish
+							'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to preserve and store them in the root celler.'
+							if fish_stored < 10:
+								'There''s still space for <<10 - fish_stored>> kg of preserved fish.'
+							else
+								'There''s no more space for preserved fish in the root celler.'
+							end
+						end
+						fish = 0
+					end
 					act 'Finish': gt 'gad_gphouse', 'start'
 				end
 				act 'Give the fish to your grandmother':
-					cla
-					*clr
+					*clr & cla
 					minut += 5
-					'<center><img <<$set_imgh>> src="images/locations/gadukino/grandparents/givefish.jpg"></center>'
-					'You try to give the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
+					gs 'stat'
 
+					'<center><img <<$set_imgh>> src="images/locations/gadukino/grandparents/givefish.jpg"></center>'
+					!'You try to give the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to clean them.'
+					'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather.'
+					if fish_stored >= 10:
+						'He sighs heavily, then takes the fish outside to preserve them. Since you can''t store anymore fish in the root celler, your grandfather decide to give the remaining <<fish>> away.'
+					elseif fish_stored + fish > 10:
+						fish -= (10 - fish_stored)
+						'He sighs heavily, then takes the fish outside to preserve and store them, filling up the remaining space. He decides to give the remaining <<fish>> fish away.'
+					else
+						fish_stored += fish
+						'You try to give the rest of the fish to your grandmother, but she takes one look at the intact fish and points at your grandfather. He sighs heavily, then takes the fish outside to preserve and store them in the root celler.'
+						if fish_stored < 10:
+							'There''s still space for <<10 - fish_stored>> kg of preserved fish.'
+						else
+							'There''s no more space for preserved fish in the root celler.'
+						end
+					end
+					fish = 0
 					act 'Finish': gt 'gad_gphouse', 'start'
 				end
 			end
-		else
-			act 'Leave': gt $loc, $loc_arg
 		end
 	end
 end

+ 1 - 1
locations/gadukino.qsrc

@@ -133,7 +133,7 @@ if $ARGS[0] = '':
 			'One of the buildings facing the square has a sign saying, General Store. A sign on the door proclaims it "CLOSED". It looks like the only place in the village to buy goods.'
 		end
 
-		if (week = 4 or week = 7) and hour >= 6 and hour <= 20: act 'Go to the nearby farmers market': gt 'gad_sundaymarket', 'start'
+		if (week = 4 or week = 7) and hour >= 6 and hour <= 20: act 'Go to the nearby farmers market': gt 'gad_market', 'start'
 
 		act 'Walk to the forest road (0:10)': minut += 10 & gt 'gad_road', 'start'
 		act 'Walk to the highway (0:15)': minut += 15 & nroad = 10 & gt 'road'

+ 34 - 0
locations/item_stock_db.qsrc

@@ -1257,6 +1257,40 @@ if $ARGS[0] = 'gad_store':
 	cost_curr_aisle['<<item_idx>>'] = 160
 	$img_curr_aisle['<<item_idx>>'] = ''
 end
+if $ARGS[0] = 'gad_market_hunter':
+	if hunters_were_met = 1:
+		$shop_title = 'Hunters stand'
+	else
+		$shop_title = 'Dried food stand'
+	end
+	item_idx = 1
+	$item_curr_aisle['<<item_idx>>'] = 'Regular food'
+	$var_curr_aisle['<<item_idx>>'] = 'food_basic'
+	$desc_curr_aisle['<<item_idx>>'] = 'Basic food, might be nourishing.'
+	quantity_curr_aisle['<<item_idx>>'] = 1
+	max_curr_aisle['<<item_idx>>'] = 0
+	cost_curr_aisle['<<item_idx>>'] = 80
+	$img_curr_aisle['<<item_idx>>'] = ''
+
+	item_idx = 2
+	$item_curr_aisle['<<item_idx>>'] = 'Mushrooms'
+	$var_curr_aisle['<<item_idx>>'] = 'mushrooms'
+	$desc_curr_aisle['<<item_idx>>'] = 'A collection of mushrooms, might be nourishing.'
+	quantity_curr_aisle['<<item_idx>>'] = 1
+	max_curr_aisle['<<item_idx>>'] = 0
+	cost_curr_aisle['<<item_idx>>'] = 500
+	$img_curr_aisle['<<item_idx>>'] = ''
+
+	item_idx = 3
+	$item_curr_aisle['<<item_idx>>'] = 'Berries'
+	$var_curr_aisle['<<item_idx>>'] = 'berries'
+	$desc_curr_aisle['<<item_idx>>'] = 'A collection of berries, might be nourishing.'
+	quantity_curr_aisle['<<item_idx>>'] = 1
+	max_curr_aisle['<<item_idx>>'] = 0
+	cost_curr_aisle['<<item_idx>>'] = 500
+	$img_curr_aisle['<<item_idx>>'] = ''
+end
+
 if $ARGS[0] = 'prost_shop':
 	$shop_title = 'Gas station'
 	item_idx = 1