# autoservisF
if $ARGS[0] = 'start':
	$loc_arg = $ARGS[0]
	$loc = 'autoservisF'
    $location_type = 'event'
	$menu_arg = 'start'
	$menu_loc = 'autoservisF'
	menu_off = 0
	cla
	*clr
	gs 'stat'
	gs 'avtonorm'
	'<center><b>Car Service Center</b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis1.jpg"></center>'

	if car > 0 and cardrive = 7:'Your <a href="exec:gs ''carF'', ''start''"><<$car>></a> is parked just inside.'

	if cardrive = 7:
		menu_off = 1
		if wrek = 0:
			if car['current_condition'] >= car['new_condition'] * 75 / 100:
				'The foreman inspects your car quickly but thoroughly.' 
				'After only a few minutes, he returns to you and announces that your car doesn''t need any repairs or maintenance.'
			end

			if car['current_condition'] < car['new_condition'] * 75 / 100:
				'The foreman inspects your car quickly but thoroughly.' 
				'Here and there, he seems to be murmuring to himself, maybe assessing a defect. After only a few minutes, he returns to you and points out what needs to be fixed.' 
				'It would cost you <<normrem>> <b>₽</b>.'

				if money >= normrem:
					act 'Pay and wait while they repair the car':
						cla
						*clr
						money -= normrem
						minut += 60
						car['current_condition'] = car['new_condition']
						wrek = 0
						'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis2.jpg"></center>'
						'Since he tells you that it''s not gonna take long, you go into a waiting room with couches and a TV. After about an hour of flipping through channels, the car is ready, and you pay <<normrem>> <b>₽</b>.'

						act 'Leave': minut += 5 & gt 'city_industrial'
					end
				end
			end
		elseif wrek = 1:
			'The foreman looks at your car, if this wreckage even qualifies as one, with a professional boredom that tells you he''s seen vehicles in similar or worse states a million times over.' 
			'He quickly but thoroughly inspects it, murmuring all the while to take mental notes on what needs to be done, and, when he returns to you, simply states that it would cost <<normrem>> <b>₽</b> to repair the damage.'

			if money >= normrem:
				act 'Pay and wait while they repair the car':
					cla
					*clr
					money -= normrem
					minut += 60
					car['new_condition'] = car['new_condition'] / 2
					car['current_condition'] = car['new_condition']
					wrek = 0
					'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis2.jpg"></center>'
					'Since he tells you that it''s not gonna take long - at first you think he is being sarcastic but then realize that his no-nonsense attitude doesn''t leave much room for humour - you go into a waiting room with couches and a TV. After about an hour of flipping through channels, you are called back to the garage and can hardly believe your eyes.'
					'The car looks brand new! Not a single dent, not one scratch, and when you start the engine to make sure it''s working, it sounds better than ever before. You ask the foreman how he and his crew managed to repair the car, and that quickly, but his only response is a shrug.'
					'Before he sends you back into the office to pay the <<normrem>> <b>₽</b>, he asks you to not bring them cars in this pitiable state anymore - you''re not sure whether he is joking or not.'

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

	if cardrive ! 7:'The foreman sighs. "Where is your car, girl? I need to look at your car to see if and what is wrong with it. Bring your car, and I''ll examine it."'

	if wrek = 1 and cardrive ! 7 and car > 0:
		'The garage offers a towing service for damaged cars to bring them to this service center. The price: 2500 <b>₽</b>'

		if money >= 2500:
			act 'Pay for the towing service (2,500 <b>₽</b>) (1:00)':
				cla
				*clr
				menu_off = 1
				money -= 2500
				cardrive = 7
				minut += 60
				'<center><img <<$set_imgh>> src="images/locations/city/industrial/CarServiceSta/autoservis2.jpg"></center>'
				'You sit down and wait at the service station. It takes about an hour until your car arrives, but when it does, it is almost immediately moved into the garage, and it looks like the foreman is about ready to inspect it.'

				act 'See what the foreman has to say':gt 'autoservisF', 'start'
			end
		end
	end

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

if $ARGS[0] = 'is_open':
	RESULT = hour >= 9 and hour <= 20 and week < 7
end

--- autoservisF ---------------------------------

