:: city_mansion_entrance
<<set $here = 'city_mansion_entrance'>>
<<set $ARGS = $location_var[$here]>>
<<if !$location_var[$here][0]>>
	<<set $loc_arg = ''>>
	<<set $loc = 'city_mansion_entrance'>>
	<<set $menu_loc = 'city_mansion_entrance'>>
	<<set $menu_arg = ''>>
	<<set $menu_off = 0>>
	<<set $property_construction_status = setup.func('homes_properties', 'get_property_construction_status')>>
	<<set $property_owned = setup.func('homes_properties', 'is_property_of_status', 'owned', 'matryona_mansion')>>
	<<if getvar("$property_construction_status") == 0>>
		<center><h4>Your Land</h4></center>
		<<image "locations/city/suburb/mansion/o_empty_field.jpg">>
		<center>An empty plot of land you own, suitable for building a large residence.</center>
	<<elseif getvar("$property_construction_status") == 1>>
		<center><h4>Your Mansion</h4></center>
		<<image "locations/city/suburb/mansion/o_foundation.jpg">>
		<center>The framework for your mansion stands here. It still needs more work.</center>
	<<elseif getvar("$property_construction_status") == 2>>
		<center><h4>Matryona Mansion</h4></center>
		<<image "locations/city/suburb/mansion/matryona_mansion.jpg">>
		<center>Your fully built mansion stands here. </center>
	<</if>>
	<<if getvar("$car") > 0 and getvar("$cardrive") == 18>>
		<<set $cardrive = 18>>
		<!-- FAILED TO CONVERT
			'<a href="exec:gs ''carF'', ''start''">Your <<$car>></a> is parked here.'
		-----
			<<set ERROR: FAILED TO CONVERT LITERAL: """'<a href""" = ERROR: FAILED TO CONVERT LITERAL: """"exec:gs ''carF''""" , ERROR: FAILED TO CONVERT LITERAL: """''start''">Your $car<""" / ERROR: FAILED TO CONVERT LITERAL: """a> is parked here.'""">>

		-->
		<<warn "CONVERSION ERROR 960a3dbc96902abccdb2d006df66130f">>
	<</if>>
	<<if setup.func('homes_properties', 'is_current_home')>>
		<<if $vladimirday == $time.daystart and getvar("$vladimirQW") == 30 and $time.hour >= 16 and $time.weekday == 6>>
			<<link "There''s an Audi parked in front of your mansion, and standing beside it, you notice Vladimir">><<gt 'qwmeet' '2'>><</link>>.

		<</if>>
		<<if $vladimirday == $time.daystart and getvar("$vladimirQW") == 40 and $time.hour >= 16 and $time.weekday == 6>>
			<<link "There''s an Audi parked in front of your mansion, and standing beside it, you notice Vladimir">><<gt 'qwmeet' '3'>><</link>>.

		<</if>>
		<<if $time.hour == $meethour[0]>>
			<<if $svidanie[0] == 1>>
				<b><a href="exec:lover_number = 0 & gt ''lover_meet'', ''start''"><<$loverdesc[0]>></a> is waiting at the entrance to your mansion.</b>

			<</if>>
		<</if>>
		<<if $time.hour == $meethour[1]>>
			<<if $svidanie[1] == 1>>
				<b><a href="exec:lover_number = 1 & gt ''lover_meet'', ''start''"><<$loverdesc[1]>></a> is waiting at the entrance to your mansion.</b>

			<</if>>
		<</if>>
		<<if $time.hour == $meethour[2]>>
			<<if $svidanie[2] == 1>>
				<b><a href="exec:lover_number = 2 & gt ''lover_meet'', ''start''"><<$loverdesc[2]>></a> is waiting at the entrance to your mansion.</b>

			<</if>>
		<</if>>
	<</if>>
	<<actCLA 'Go to the suburbs'>>
		<<set $time.minutes += 10>>
		<<gt 'city_suburbs' 'start'>>
	<</actCLA>>
	<<if $property_owned>>
		<<if getvar("$property_construction_status") == 2>>
			<<actCLA 'Walk inside the mansion'>>
	<<setn $time.minutes += 4>> <<gt 'city_mansion_residence_1' 'yfoyer'>>
<</actCLA>>

		<</if>>
		<<if $finances.bankAvailable >= 500000 and getvar("$property_construction_status") == 0>>
			<<actCLA 'Pay for running utilities and the building foundation (500,000 <b>₽</b>)'>>
				<<set $finances.bank -= 500000>>
				<<gs 'homes_properties' 'progress_construction_status' 'matryona_mansion'>>
				<<set $time.minutes += 5>>
				<<set $menu_off = 1>>
				You've paid for the utilities. You now have running water, sewage, electric power, and telephone lines. There''s even a foundation built on the land lot.
				<<actCLA 'Leave'>>
					<<gt $curloc>>
				<</actCLA>>
			<</actCLA>>
		<</if>>
		<<if $finances.bankAvailable >= 1500000 and getvar("$property_construction_status") == 1>>
			<<actCLA 'Pay for the finishing touches on the mansion (1,500,000 <b>₽</b>)'>>
				<<set $finances.bank -= 1500000>>
				<<gs 'homes_properties' 'progress_construction_status' 'matryona_mansion'>>
				<<set $time.minutes += 5>>
				<<set $menu_off = 1>>
				You've paid for the construction of the mansion.
				<<actCLA 'Leave'>>
					<<gt $curloc>>
				<</actCLA>>
			<</actCLA>>
		<</if>>
		<<if $finances.bankAvailable >= 500000 and getvar("$property_construction_status") == 2 and $ymanrem[3] == 0>>
			<<actCLA 'Pay for the construction of the rooms (500,000 <b>₽</b>)'>>
				<<set $finances.bank -= 500000>>
				<<setinit $ymanrem[3] = 1>>
				<<set $time.minutes += 5>>
				<<set $menu_off = 1>>
				You paid for the construction of the rooms. You can finally begin designing the interior of the mansion.
				<<actCLA 'Leave'>>
					<<gt $curloc>>
				<</actCLA>>
			<</actCLA>>
		<</if>>
		<<if getvar("$property_construction_status") > 0>>
			<<if $finances.bankAvailable >= 800000 and getvar("$banaMansion") == 0>>
				<<actCLA 'Pay for the construction of the sauna (800,000 <b>₽</b>)'>>
					<<set $finances.bank -= 800000>>
					<<set $banaMansion = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					You paid for the construction of the sauna. You finally have a place where you can relax.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 500000 and getvar("$bassMansion") == 0>>
				<<actCLA 'Pay for the construction of the pool area (500,000 <b>₽</b>)'>>
					<<set $finances.bank -= 500000>>
					<<set $bassMansion = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					You paid for the construction of the pool area. You can finally take relaxing swims in private.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
		<</if>>
		<<if getvar("$property_construction_status") == 2>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[3] == 1>>
				<<actCLA 'Pay for the renovations of the main hall (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[3] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the main hall is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 150000 and $ymanrem[3] == 2>>
				<<actCLA 'Decorate the main hall (150,000 <b>₽</b>)'>>
					<<set $finances.bank -= 150000>>
					<<setinit $ymanrem[3] = 3>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the main hall is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[4] == 0>>
				<<actCLA 'Pay for the renovations of the bedroom (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[4] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the bedroom is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 300000 and $ymanrem[4] == 1>>
				<<actCLA 'Decorate the bedroom (300,000 <b>₽</b>)'>>
					<<set $finances.bank -= 300000>>
					<<setinit $ymanrem[4] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the bedroom is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[5] == 0>>
				<<actCLA 'Pay for the renovations of the bathroom (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[5] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the bathroom is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 250000 and $ymanrem[5] == 1>>
				<<actCLA 'Decorate the bathroom (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[5] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the bathroom is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[6] == 0>>
				<<actCLA 'Pay for the renovations of the kitchen (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[6] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the kitchen is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 350000 and $ymanrem[6] == 1>>
				<<actCLA 'Decorate the kitchen (350,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[6] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the kitchen is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[7] == 0>>
				<<actCLA 'Pay for the renovations of the living room (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[7] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the living room is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 250000 and $ymanrem[7] == 1>>
				<<actCLA 'Decorate the living room (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[7] = 2>>
					<<if getvar("$TV") < 2>>
						<<set $TV = 2>>

					<</if>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the living room is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[8] == 0>>
				<<actCLA 'Pay for the renovations of the fireplace room (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[8] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the fireplace room is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 250000 and $ymanrem[8] == 1>>
				<<actCLA 'Decorate the fireplace room (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[8] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the fireplace room is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[9] == 0>>
				<<actCLA 'Pay for the renovations of the nursery room (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[9] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the nursery is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 250000 and $ymanrem[9] == 1>>
				<<actCLA 'Decorate the nursery (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[9] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the nursery is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[10] == 0>>
				<<actCLA 'Pay for the renovations of the library (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[10] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the library is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 250000 and $ymanrem[10] == 1>>
				<<actCLA 'Decorate the library (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[10] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the library is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[11] == 0>>
				<<actCLA 'Pay for the renovations of the gym (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[11] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the gym is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 250000 and $ymanrem[11] == 1>>
				<<actCLA 'Decorate the gym (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[11] = 2>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the gym is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
			<<if $finances.bankAvailable >= 250000 and $ymanrem[12] == 0>>
				<<actCLA 'Pay for the renovations of the office (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[12] = 1>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the office is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<<elseif $finances.bankAvailable >= 250000 and $ymanrem[12] == 1>>
				<<actCLA 'Decorate the office (250,000 <b>₽</b>)'>>
					<<set $finances.bank -= 250000>>
					<<setinit $ymanrem[12] = 2>>
					<<if $inventory.get("computer") < 1>>
						<<run $inventory.set('computer',1)>>

					<</if>>
					<<set $time.minutes += 5>>
					<<set $menu_off = 1>>
					The work on the office is finished.
					<<actCLA 'Leave'>>
						<<gt $curloc>>
					<</actCLA>>
				<</actCLA>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
