# Gshveyfab
$metka = $ARGS[0]
$loc = $CURLOC

if $ARGS[0] = 'start':
	cla
	*clr
	minut += 10
	gs'stat'
	
	'<center><B>Garment factory named."Paris Commune"</B></center>'
	'<center><img src="images/pic/Gshveyfab.jpg"></center>'
	'Local garment factory, one of the few companies in Pavlovsk. It makes clothing for G & M stores and there is a branch opposite, which is open from 8:00-20:00 Monday - Friday.'
	if hour => 8 and hour =< 20 and week => 1 and week <= 5:
		'Near <a href="exec:minut += 15 & GT ''Gshveyfab'', ''enter''">the front door</a> is communicating factory which sits protection.'
	elseif hour < 8 or hour > 20 or week > 5:
		'Checkpoint factory is now closed.' 
		'Working days Mon-Fri:'
		'First change - with 8 to 16 hours.'
		'Second shift - with 16 to 20 hours.'
	end
	if week < 6 and hour >= 8 and hour <= 20:
		*p '<a href="exec:torg = 0 & GT ''budgetclothes'',''start''">G&M Store</a>'
	else
		*p 'G&M Store is currently closed.'
	end
	
	if hour >= 8 and hour <= 15:
		'A small room near the entrance is being used as a tailor shop.'
		act 'Go to the tailor':
			cla
			*clr
			'An elderly man is inspecting finished garments fresh from the factory floor, he pulls his glasses down a little and looking over the top of them walks up to the desk.'
			
			'"Hello there, come to get some clothes adjusted? It''ll cost you 500 <b>₽</b> per item."'

			if money >= 500:
				act 'Take in the clothes you are wearing (500 <b>₽</b>)':
					cla
					*clr
					minut += 15
					if CloStyle = 5 or $clothingworntype = 'exercise':
						'What are you wasting my time for? This type of clothing does not need to be resized.'
					else
						money -= 500
						dynamic '<<$clothingworntype>>B[<<clothingwornnumber>>] = bedra'
						'You undress and give the clothes you need adjusting to the tailor, it is fifteen minutes until your clothes are ready. you redress.'
					end

					act 'Leave':gt 'Gshveyfab', 'start'
				end

				act 'Take in different clothes':gt 'clothing', 'view_clothing_list', 'resize'
				act 'Take in all the clothes':gt 'portnoi2'
			end
			act 'Leave':gt 'Gshveyfab', 'start'
	
		end
	end

	act 'Go to the residential area':gt'pavResidential'
	act 'Go to the high street':gt'pavCommercial'
end

if $ARGS[0] = 'enter':
CLOSE ALL
	cla
	*clr
	minut += 2
	gs'stat'
	'<center><B>Garment factory named."Paris Commune"</B></center>'
	'<center><img src="images/qwest/alter/fabrika/pusto.jpg" ></center>'
	'Local garment factory, one of the core enterprises of your Pavlovsk.'
	'On the wall hangs a work schedule:'
	'First change - with 8 to 16 hours.'
	'Second shift - with 16 to 20 hours.'
	''
	if workFabrika = 0 and age => 16 and age < 18:'You can get a floor on rates <a href="exec:minut += 15 & GT ''Gshveyfab'', ''job_start''">work</a>.'
	if work = 0 and workFabrika = 0 and age => 18:'You can get a <a href="exec:minut += 15 & GT ''Gshveyfab'', ''job_start''">work</a>.'
	if workFabrika = 1 and week => 1 and week <= 5 and hour = 8 or workFabrika = 1 and week => 1 and week <= 5 and hour = 16 and age => 16 and age < 18:
		'You can go to change.'
		act 'Exit replaced': gt'Gshveyfab','job'
	end
	if workFabrika = 1 and week => 1 and week <= 5 and hour = 8 or workFabrika = 1 and week => 1 and week <= 5 and hour = 16 and age => 18: 
		'You can go to change.'
		act 'Exit replaced': gt'Gshveyfab','job'
	end
	if workFabrika = 1:
		'You can retire from work without pay waste changes'
		act 'Dismissed':workFabrika = 0 & work = 0 & gt 'Gshveyfab','enter'
	end
	act '<B>Escape</B>':gt'Gshveyfab','start'
end

if $ARGS[0] = 'job_start':
	cla
	*clr
	minut += 2
	gs'stat'
	'<center><B>Cabinet chief of department</B></center>'
	'<center><img src="images/qwest/alter/fabrika/nachalnik.jpg" ></center>'
	''
	'You go to Stepan Sergeevich, Chief shop and ask for a job.'
	if age => 16 and age < 18 and workFabrika = 0:
		'- Of course, sit down. The work is not easy and meticulously. No special knowledge is not necessary, in place will deal with all. Because you are not yet an adult, it can work only half of the day for half rate, this 200 <b>₽</b> per shift. Pozvrosleesh - Translated to the full. Naturally, we only official trudoustrostvo, all documents. Usual we change on weekdays 8 to 16, but you will part with 16 to 20. If you rack up more than three absences in a month, then you get fired. Well, suits?'
			act 'Apply for job':
				cla
				work = 1
				workFabrika = 1
				smenaFabrika = 0
				FabrikaProgul = 0

				'You gave Stepan Sergeyevich work book. He took it and remind you: - Come in on weekdays 16 hours.'

				act 'Move away':gt'Gshveyfab', 'enter'
			end	
	elseif age => 18 and workFabrika = 0:
		'- Of course, sit down. The work is not easy and meticulously. No special knowledge is not necessary, in place will deal with all. Naturally, we only official trudoustrostvo, all documents. Usual we change on weekdays 8 to 16, 400 <b>₽</b> per shift. If you rack up more than three absences in a month, then you get fired. Well, suits?'
			act 'Apply for job':
				cla
				work = 1
				workFabrika = 1
				smenaFabrika = 0
				FabrikaProgul = 0

				'You gave Stepan Sergeyevich work book. He took it and remind you: - Come in on weekdays 8 hours.'

				act 'Move away':gt'Gshveyfab', 'enter'
			end  
	end
	act 'Move away':gt'Gshveyfab', 'enter'
end

if $ARGS[0] = 'job':
	cla
	*clr
	FabrikaProgul -= 1
	if FabrikaProgul < 0: FabrikaProgul = 0
	if age => 16 and age < 18:
		smenaFabrika += 1
		hour = 20
	end 
	if age => 18: 
		smenaFabrika += 2
		hour = 16
	end 
	gs'stat'
	'<center><B>Garment factory named."Paris Commune"</B></center>'
	'<center><img src="images/qwest/alter/fabrika/smena.jpg" ></center>'
	''
	'You practice his shift at the factory.'

	act 'Go to the residential area':gt'pavResidential'
	act 'Go to the high street':gt'pavCommercial'
end

--- Gshveyfab ---------------------------------

