# pav_factory
!2021/05/08

CLOSE ALL
$location_type = 'public_indoors'

if $ARGS[0] = 'tailor':
	*clr & cla
	$loc_arg = 'tailor'
	$loc = 'pav_factory'
	$menu_loc = 'pav_factory'
	$menu_arg = 'tailor'
	menu_off = 0
	gs'stat'
	'There is a small wooden counter and above that a sign that says "If you can''t wear it we''ll adjust it"'
	'Behind the counter an elderly man is inspecting some repaired clothes, he stops and smiles gently, greeting you.'
	'"Hello there young lady, do you want to adjust some of your clothing? It''ll cost you 500 <b>₽</b> per item."'

	act 'Leave': gt 'pav_industrial'

	if money >= 500:
		act 'Resize the clothes you''re wearing (500 <b>₽</b>)':
			*clr & cla
			minut += 15
			if CloStyle = 5 or $clothingworntype = 'danilovich':
				'The tailor is looking irritatingly at you, "Why are you wasting my time with exercise clothing? That type of clothing does not need to be resized..."'
			else
				money -= 500
				dynamic '<<$clothingworntype>>_b[<<clothingwornnumber>>] = pcs_hips'
				'You are handed a t-shirt and shorts as you undress and give the clothes to the tailor for adjustment. The tailor is fast and only takes fifteen minutes until your clothes are ready.'
				'You are handed your clothes back and quickly get dressed. You''re pleased with the job that the tailor has done.'
			end

			act 'Leave': minut += 5 & gt 'pav_industrial'
		end

		act 'Resize your other clothes':gt 'clothing', 'view_clothing_list', 'resize'
		act 'Resize all your clothes':gt 'portnoi2'
	end
end

if $ARGS[0] = 'enter':
	*clr & cla
	$loc_arg = 'tailor'
	$loc = 'pav_factory'
	$menu_loc = 'pav_factory'
	$menu_arg = 'enter'
	menu_off = 0
	gs'stat'
	'<center><B>TEXTILE FACTORY, PARIS COMMUNE</B></center>'
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/factory/pav_factory.jpg" ></center>'
	'You''re standing inside the building that is accommodating the biggest employer in Pavlovsk, the local textile factory.'
	'There is a work schedule hanging on the wall:'
	'First shift - 08:00 to 16:00.'
	'Second shift - 16:00 to 20:00.'
	*nl
	if workFabrika = 0 and age < 18:'You can apply for a <a href="exec:minut += 15 & gt ''pav_factory'', ''job_start''">part-time job</a> here.'
	if work = 0 and workFabrika = 0 and age >= 18:'You can apply for a <a href="exec:minut += 15 & gt ''pav_factory'', ''job_start''">full-time job</a> here.'

	act 'Leave': minut += 5 & gt 'pav_industrial'

	if workFabrika = 1 and week >= 1 and week <= 5 and hour >= 8 and hour < 9 and age >= 18:
		'Your shift is starting now.'
		act 'Start shift': gt'pav_factory','job'
	end
	if workFabrika = 1 and week >= 1 and week <= 5 and hour >= 16 and hour < 17 and age < 18:
		'Your shift is starting now.'
		act 'Start shift': gt'pav_factory','job'
	end
	if workFabrika = 1:
		'You can quit your job, but quitting will lead to a deducted wage.'
		act 'Quit job':
			menu_off = 1
			if age < 18:
				smenaFabrika -= 1
			elseif age >= 18:
				smenaFabrika -= 2
			end
			if smenaFabrika < 0:
				smenaFabrika = 0
			end
			pay = smenaFabrika * 600
			karta += pay
			smenaFabrika = 0
			workFabrika = 0
			work = 0
			minut += 5
			gt 'pav_factory','enter'
		end
	end
end

if $ARGS[0] = 'job_start':
	*clr & cla
	$loc_arg = 'tailor'
	$loc = 'pav_factory'
	$menu_loc = 'pav_factory'
	$menu_arg = 'job_start'
	menu_off = 0
	gs'stat'
	'<center><B>FOREMAN''S OFFICE</B></center>'
	'<center><img <<$set_imgh>> src="images/characters/pavlovsk/resident/stepan/nachalnik.jpg" ></center>'
	'You head into the factory foreman, Stepan Sergeyevich office, and ask him if there''s an available job.'

	act 'Leave': gt'pav_factory', 'enter'

	if age < 18 and workFabrika = 0:
		'"Sure, have a seat," he says. "Now, the work is difficult and meticulous, but doesn''t require any special knowledge. You should catch on pretty quick. Since you are not an adult yet, you can only work half-time, and the pay is 150 <b>₽</b> per hour. Once you become an adult, we can transfer you to full-time. Naturally, as this is a state-recognized company, we do require all the appropriate documentation. The main shift is on weekdays from 08:00 to 16:00, but you will be working the second shift, from 16:00 to 20:00.'
		'But beware, if you miss more than three days of work in a single month, you will be fired. You will be paid at the end of the month and getting fired before then will forfeit any pay not yet received. So, is that okay?"'

		act 'Accept the job':
			cla
			menu_off = 1
			minut += 10
			work = 1
			workFabrika = 1
			smenaFabrika = 0
			FabrikaProgul = 0
			'You hand him over your documents, which he takes and then reminds you to come in on every weekday, at 16:00.'

			act 'Leave': gt'pav_factory', 'enter'
		end

	elseif age >= 18 and workFabrika = 0:
		'"Sure, have a seat," he says. "Now, the work is difficult and meticulous, but doesn''t require any special knowledge. You should catch on pretty quick. Naturally, as this is a state-recognized company, we do require all the appropriate documentation. The main shift is on weekdays from 08:00 to 16:00, and the pay is 105 <b>₽</b> per hour.'
		'But beware, if you miss more than three days of work in a single month, you will be fired. You will be paid at the end of the month, and getting fired before then will forfeit any pay not yet received. So, is that okay?"'

		act 'Accept the job':
			cla
			menu_off = 1
			minut += 10
			work = 1
			workFabrika = 1
			smenaFabrika = 0
			FabrikaProgul = 0
			'You hand him your documents, which he takes and then reminds you to come in on every weekday, at 08:00.'

			act 'Leave': gt'pav_factory', 'enter'
		end
	end
end

if $ARGS[0] = 'job':
	*clr & cla
	menu_off = 1
	FabrikaProgul -= 1
	if FabrikaProgul < 0: FabrikaProgul = 0
	if age < 18:
		minut += 240
		smenaFabrika += 1
	end
	if age >= 18:
		minut += 480
		smenaFabrika += 2
	end
	gs'stat'
	'<center><B>TEXTILE FACTORY, PARIS COMMUNE</B></center>'
	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/factory/pav_factory.jpg" ></center>'
	'You work hard throughout your shift at the factory. The foreman has you running all over the factory performing all type of tasks. You barely even have time to rest during the shift.'

	act 'Leave': minut += 5 & gt 'pav_industrial'
end

--- pav_factory ---------------------------------

