# city_house_res_misc


!!Small frontyard
if $ARGS[0] = 'fronty':
	$loc = 'city_house_res_misc'
	$loc_arg = 'fronty'
	$menu_loc = 'city_house_res_misc'
	$menu_arg = 'fronty'
	$location_type = 'public_outdoors'
	killvar '$locclass'
	
	menu_off = 0
	minut += 1
	gs 'stat'

	if sound = 0:
		if month >=11 and month <= 12 or month >=1 and month <=3:
			if hour >= 8 and hour <= 23: PLAY 'sound/street2.mp3',30 & PLAY 'sound/street7.mp3',30 & PLAY 'sound/zima.mp3',30
			if hour >= 0 and hour <= 7: PLAY 'sound/street_night.mp3',30 & PLAY 'sound/zima.mp3',30
		else
			if hour >= 8 and hour <= 23: PLAY 'sound/street2.mp3',30 & PLAY 'sound/street7.mp3',30 & PLAY 'sound/street_leto.mp3',30
			if hour >= 0 and hour <= 7: PLAY 'sound/street_night_leto.mp3' & PLAY 'sound/street_night.mp3',30
		end
	end

	*clr & cla
	'<center><b><font color="maroon">Your city residential house</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/residential/house/crh_fronty.jpg"></center>'
	'Your small two story house sits on the edge of the residential area. Despite that, your neighbors are pretty close and the sounds of the street fill the air.'
	*nl
	if car > 0 and cardrive = 8: '<a href="exec:GS ''carF'', ''start''">Your <<$car>></a> is in the driveway.'

	act 'Go inside': gt 'city_house_res_misc', 'hallw'
	act 'Go to the city':
		minut += 10
		gt 'city_residential'
	end
	if func('homes_properties', 'is_current_home', $loc) = 0:
		act 'Set this house as your main home':gs 'homes_properties', 'set_home' & gt 'city_house_res_misc', 'fronty'
	end

end

if $ARGS[0] = 'hallw':
	CLOSE ALL
	$loc = 'city_house_res_misc'
	$loc_arg = 'hallw'
	$menu_loc = 'city_house_res_misc'
	$menu_arg = 'hallw'
	$locM = 'city_house_res_misc'
	$locM_arg = 'hallw'
	$location_type = 'private'
	killvar '$locclass'

	menu_off = 0
	minut += 1
	gs 'stat'
	gs 'themes', 'indoors'
	if frost > 0: frost = 0

	*clr & cla
	'<center><b><font color="maroon">Hallway</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/residential/house/crh_hallway.jpg"></center>'
	
	gs 'courtletter'

	act 'Go out front':
		if $clothingworntype ! 'nude':
			minut += 1
			gt 'city_house_res_misc', 'fronty'
		else
			msg'<b><font color = red>You need to get dressed.</font></b>'
			gt 'city_house_res_misc', 'hallw'
		end
	end

	'The main hallway of your house. You can visit the different rooms from here.'
	'There''s a <a href="exec:gt ''mirror'', ''start''">mirror</a> hanging on the wall.'
	
	if mc_inventory['umbrella'] > 0:'There''s an umbrella hanging on a hook by the door.'
	
	act 'Go to your bedroom': gt 'city_house_res_bedr', 'bedro'
	act 'Go to your bathroom': gt 'city_house_res_bathr', 'bathr'
	act 'Go to your kitchen': gt 'city_house_res_kitch', 'kitch'
	act 'Go to your living room': gt 'city_house_res_misc', 'livroom'
	act 'Go to your backyard': gt 'city_house_res_misc', 'backy'
	
end

!!Small backyard for outdoor working out or maybe gardening?
if $ARGS[0] = 'backy':
	$loc = 'city_house_res_misc'
	$loc_arg = 'backy'
	$menu_loc = 'city_house_res_misc'
	$menu_arg = 'backy'
	$location_type = 'secluded'
	
	menu_off = 0
	minut += 1
	gs 'stat'
	
	*clr & cla
	'<center><b><font color="maroon">Living Room</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/residential/house/crh_backy.jpg"></center>'
	'Your small backyard is fenced in, with a few plots intended for gardening.'

	act 'Go inside': gt 'city_house_res_misc', 'hallw'

	if sunWeather = 1:
		if pcs_stam >=15 or (pcs_stam >= 10 and mc_inventory['book_yoga'] + mc_inventory['hula_hoop'] > 0):
			if $clothingworntype = 'danilovich_outfits' and $shoeworntype = 'danilovich':
				*nl
				'You can do some exercises here.'

				gs 'wardrobe', 'default_clothing_options'

				act 'Exercise': gt 'exercise', 'workout'
			else
				*nl
				'You could do some exercises here if you were wearing exercise clothes.'
			end
		end
	end

end

if $ARGS[0] = 'livroom':
	$loc = 'city_house_res_misc'
	$loc_arg = 'livroom'
	$menu_loc = 'city_house_res_misc'
	$menu_arg = 'livroom'
	$location_type = 'private'
	$locclass = 'livingr'
	
	menu_off = 0
	minut += 1
	gs 'stat'
	
	*clr & cla
	'<center><b><font color="maroon">Living Room</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/residential/house/crh_living.jpg"></center>'

	act 'Leave the room': gt 'city_house_res_misc', 'hallw'

	'A place where you can watch <a href="exec:gt ''TV'',''start''">TV</a>, or relax on your <a href="exec:gt ''divan'', ''start''">sofa</a>.'
	if $ml_guitar['location'] = $loc: 'Your guitar rests on its stand next to the sofa.'
	!! Computer and internet use.
	if mc_inventory['tech_computer'] = 1:
		gs 'internet_mobile', 'get_access'
		!!TODO: Need to build a check for husband being at home or something.			
		'There''s a <a href="exec:gt ''Komp'', ''start''">computer</a> sitting on your <a href="exec:gt ''stol'', ''start''">desk</a>.'
	else
		'A small <a href="exec:gt ''stol'', ''start''">desk</a> is against the wall.'
	end

	'There is enough space to workout.'
	gs 'exercise', 'start'

	gs 'subkid'

	!! IMPORTANT: if there is anything added later that could mean that others are in the room, gs 'music_actions', 'not_alone' should be added with the correct conditions.
	gs 'music_actions', 'music_icon'

	if mc_inventory['sewing_kit'] = 1:
		'Your <a href="exec:gt ''sewing'',''start''">sewing kit</a> is stored next to your favorite chair.'
		*nl
		if gobelen > 0:
			'You have completed <<gobelen>> tapestries.'
			*nl
		end
		if mc_inventory['sewing_fabric'] <= 0:
			'You do not have any fabric.'
		else
			if pcs_sewng < 40:
				'You have <<mc_inventory[''sewing_fabric'']>> pieces of sewing fabric left.'
			elseif pcs_sewng < 80:
				'You have enough fabric for <<mc_inventory[''sewing_fabric'']>> lessons.'
			else
				if newgobelen = 0:
					act'Start a new tapestry (00:15)':
						*clr & cla
						menu_off = 1
						mc_inventory['sewing_fabric'] -= 1
						newgobelen = 1
						minut += 15
						gs'stat'
						'You spend 15 minutes at the embroidery frame, preparing the fabric and outlining the pattern for the tapestry.'
						act'Set the tapestry aside':gt 'city_house_res_misc', 'livroom'
					end
				end
			end
		end	
		if newgobelen >= 1:
			'Your tapestry is <<newgobelen/10>> percent finished.'
			act'Work on the tapestry (01:00)':
				*clr & cla
				menu_off = 1
				minut += 60
				gs 'exp_gain', 'sewng', rand(pcs_intel/10, pcs_intel/5)
				gobramax = (pcs_sewng - 70) * 6
				gobramin = (pcs_sewng - 70) * 2
				newgobelen += rand(gobramin,gobramax)
				gs'stat'
				if newgobelen < 1000:'You spend an hour working on your tapestry, which is now <<newgobelen/10>> percent finished.'
					if newgobelen >= 1000:
					newgobelen = 0
					gobelen += 1
					'Your work on the tapestry is done.'
				end
				act'Set the tapestry aside':gt 'city_house_res_misc', 'livroom'
			end
		end
	end

end

--- city_house_res_misc ---------------------------------

