# sewing

if $ARGS[0] = 'start':
	cla & *clr
	'<center><img <<$set_imgh>> src="images/pc/activities/sewing/kit.jpg"></center>'
	'You pull your sewing kit out from under your bed.'
	*nl
	if tkan > 1:
		'You have <<tkan>> pieces of sewing fabric left.'
	elseif tkan = 1:
		'You have 1 piece of sewing fabric left.'
	else
		'You have no fabric left to use as material.'
	end
	if pcs_sewng > 50 and tkan >= 1: 'You can resize your own clothing when viewing items in the wardrobe list <a href="exec:gt ''clothing'', ''view_clothing_list'', ''wardrobe''">here</a>.'
	act 'Leave':gt $loc, $loc_arg
	act 'Practice sewing (0:30)':
		minut += 30
		gs 'stat'
		cla & *clr
		'<center><img <<$set_imgh>> src="images/pc/activities/sewing/practice.jpg"></center>'
		if pcs_sewng < 40:
			gs 'exp_gain', 'sewng', 2
			'You practice your sewing skills.'
		else
			'You spend some time practicing stitches and other sewing techniques, but you don''t feel like you''re getting any better.'
			*nl
			'You think you need real projects to work on to increase your skill, either in a class or on your own.'
		end
		act'Finish':gt 'sewing', 'start'
	end		

	
	act 'Sew trinkets (0:30)':
		minut += 30
		gs 'stat'
		cla & *clr
		act 'Finish':gt 'sewing', 'start'
		if tkan < 1:
			'You do not have any material to sew anything. You should buy some from the supermarket.'
		elseif tovarL = 30 and (YouCanGar = 0 or GarTorgItem = 100):
			'You do not have any further storage space, you need to sell some trinkets to make room before sewing more of them.'
		else
			sew_trinket_success = rand(1,240)
			tkan -= 1
			if pcs_sewng >= 40:gs 'exp_gain', 'sewng', rand(pcs_intel/20, pcs_intel/10)
			if pcs_sewng < 40:gs 'exp_gain', 'sewng', rand(pcs_intel/25, pcs_intel/15)

			if sew_trinket_success > pcs_sewng*4:
				'<center><img <<$set_imgh>> src="images/pc/activities/sewing/practice.jpg"></center>'
				'You do your best trying to sew together a trinket at a quality you can sell, but somewhere along the way, you mess it up. The material is ruined, and you''re frustrated as hell, but at least you feel like you learned something.'
			else
				if tovarL >= 30 and (YouCanGar = 0 or GarTorgItem >= 100):
					'<center><img <<$set_imgh>> src="images/pc/activities/sewing/kit.jpg"></center>'
					'You put together another trinket but then realize you have too many trinkets already. ' + iif(YouCanGar > 0, 'Even the space in your stepfather''s garage is full. ', '') + 'With a deep sense of regret, you throw it away, having no place to store it. At least you learned more about sewing...'
				else
					'<center><img <<$set_imgh>> src="images/pc/activities/sewing/trinket.jpg"></center>'
					*p 'You spend some time trying to sew something together. After a half hour, you find yourself rewarded for your effort with a small trinket that''s actually of decently high quality. '
					if tovarL < 30:
						tovarL += 1
						'Storing it away, you figure you ' + iif(tovarL < 30, 'still have space for about <<30 - tovarL>>', 'probably don''t have room for any') + ' more of these in your room.' + iif(tovarL >= 30 and YouCanGar > 0, ' If you make any more of these, you''ll need to start storing them in your stepfather''s garage.', '')
						*nl
						'You wonder if you can sell them somewhere.'
					else
						GarTorgItem += 1
						'The storage space in your room is full, but you can still store it in your stepfather''s garage, ' + iif(GarTorgItem < 100, 'along with probably another <<100 - GarTorgItem>>.', 'though it doesn''t look like there''s space for any more beyond that there either.')
						*nl
						'You wonder how many you can sell at the train station.'
					end
				end
			end
		end
	end
end
			
--- sewing ---------------------------------

