# sitrPar
!! Date refactored: 31st March, 2024
!! Author: Myles
!!
!! Version: .01 - initial refactoring
!! 
!! Desc: Family living room and Kolka''s bedroom links to family corridor

if $ARGS[0] = '' or $ARGS[0] = 'start':
	!! Call in location default actions
	gs 'home_family_init', 'init'
	!! Start location initialisation

	!! Set location header - img path is set in init
	$setloc['StageTitle'] = 'Parents Living Room'
	if locat['Mother'] = 19 and locat['Stepdad'] = 10:
		$setloc['StageImage'] = '<<$default_img_path>>/momvladtv.jpg'
	else
		$setloc['StageImage'] = '<<$default_img_path>>/sitrpar.jpg'
	end
	!! Sitting room variables:
	$locclass = 'livingr'
	locat['Fam_livingroom'] = 0

	!! Set location vars:



	
	!! Check if anyone is in the room
	gs 'sitrPar', 'occupied'


	!! Set up game location data
	gs 'shortgs', 'setloc', 'sitrPar', $ARGS[0]
	!! End location initialisation

	!! Begin location content
	!! Display header and banner image
	gs 'core_library', 'stage_title'

	!! Location default description:
	'The living room has a <a href="exec:gt ''TV'',''pav''">TV</a> near the window. In front of the TV is a <a href="exec:gt ''sitrPar'',''sofa''">sofa bed</a> on which your brother sleeps at night. A large tapestry covers one wall, while the other wall has several shelves on it, stocked with books and other things.'
	*nl
	!! End default Description
	if locat['Fam_livingroom'] = 0 and locat['Mother'] ! 24 and locat['Mother'] ! 19:
		'No one else is here right now, so you''re free to use the room how you like.'
		gs 'exercise','start'
	end

	act 'Leave the room': minut += 1 & gt 'korrPar'
	act 'Sit on the sofa': gt 'sitrPar', 'sofa'

	if locat['Kolka'] = 2 and brothermorningsex = daystart:
		'<a href="exec:gt ''brother'', ''start''">Kolka</a> is getting ready for school.'
	elseif locat['Kolka'] = 1:
		'<a href="exec:gt ''brother'', ''start''">Kolka</a> is sleeping on the sofa.'
	elseif locat['Kolka'] = 7:
		'<a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting by the table and doing his homework.'
	elseif locat['Kolka'] = 11:
		if locat['Mother'] = 19 or locat['Stepdad'] = 10:
			'<a href="exec:npc_rel[''A34''] += 1 & gt ''brother'', ''start''">Kolka</a> is sitting in the armchair playing on his phone.'
		else
			'<a href="exec:gt ''brother'', ''start''">Kolka</a> is sitting on the sofa playing video games.'
		end
	end
	*nl
	if month = 12 and day >= 20: 'A Christmas tree stands next to the TV, decorated with tinsel garlands and other ornaments.'
	if month = 12 and day = 31 and hour >= 20:
		act 'Celebrate the New Year with your family.':
			cla
			gs 'npc_relationship', 'modify', 'A29', 10
			gs 'npc_relationship', 'modify', 'A28', 10
			gs 'npc_relationship', 'modify', 'A33', 10
			gs 'npc_relationship', 'modify', 'A34', 10
			money += 5000
			hour = 23
			minut = 0
			minut += 120
			pcs_sleep = 0
			pcs_mood += 100
			gs 'food', 'l_meal'
			gs 'stat'
			'You sit at the festive table laid in front of the TV and celebrate the New Year with your family, the TV providing some background noise. At the table, people strike up a conversation and common problems are forgotten as everyone is has fun talking to each other. At midnight, everyone wishes one another a happy New Year and enjoys the champagne and fireworks outside as your mother gives you an envelope with a greeting card and 5000 <b>₽</b>.' 
			'You continue to watch TV and enjoy the champagne and company of your family, but everyone eventually grows tired and they go to bed, one by one.'

			act 'Leave': 	minut += 1 & gt 'korrPar'
		end
	elseif month = 1 and day = 1:
		act 'Eat some leftovers at the festive table':
			frost = 0
			minut += 10
			pcs_health += 10
			pcs_mood += 20
			fat += 8
			pcs_energy += 60
			if pcs_hydra >= 100:
				pcs_hydra += 30
			else
				pcs_hydra += 60
			end
			cumspclnt = 2
			gs 'cum_cleanup'
			pcs_breath = 0
			gs 'stat'
			*clr & cla
			'<center><img <<$set_imgh>> src="images/shared/food/leftovers.jpg"></center>'
			'You finish the leftovers remaining on the table from the holidays.'

			act 'Get up from the table': gt 'sitrPar'
		end
	elseif locat['Mother'] = 24:
		*clr & cla
		'<center><img <<$set_imgh>> src="<<$mother_img_path>>uborka1.jpg"></center>'
		if kanikuli = 0 and mid($start_type,1,2) = 'sg' and SchoolAtestat = 0 and SchoolBlock = 0 and week < 6:
			if CloStyle2 = 4:
				'As you walk into the living room, you see your mother sweeping the floor. She looks up and gives you a disappointed look. "What are you still doing here? Go to school, now!" She practically pushes you out of the apartment and closes the door.' 
				act 'Continue': gt 'pod_ezd','etaj_2'
			else
				gs 'wardrobe', 'school_outfit'
				'As you walk into the living room, you see your mother sweeping the floor. She looks up and gives you a disappointed look. "What are you still doing here and ehy are you not wearing your uniform? Get changed and go to school, now!" She follows you back to your room and watches as you change into your uniform. After that, she practically pushes you out of the apartment and closes the door.' 
				act 'Continue': gt 'pod_ezd','etaj_2'
			end
		else
			'As you walk into the living room, you see your mother sweeping the floor. She hasn''t noticed you because she''s intent on cleaning.'
			act 'Leave': gt 'korrPar'
		end
		exit
	elseif locat['Mother'] = 19 and locat['Stepdad'] = 10:
		!! Watches TV with Vladimir
		!!'<center><img <<$set_imgh>> src="<<$default_img_path>>/momvladtv.jpg"></center>'
		'As you walk into the living room, you see your mother and Vladimir sitting on the couch watching TV.'
		act 'Leave':gt 'korrPar'
		
		act 'Join them':
			cla & *clr
			pcs_mood += 10
			minut += 30
			npc_rel['A28'] += 1
			npc_rel['A29'] += 1
			npc_rel['A34'] += 1
			gs 'stat'
			!!'<center><img <<$set_imgh>> src="<<$default_img_path>>/familytv.jpg"></center>'
			'You move over to join them, and your mother scoots away from Vladimir and pats the spot between her and him. You take a seat between them and Vlad barely even glances at you with a brief smile before he goes back to watching TV. Your mother pats you on the shoulder before returning her attention to the TV, apparently happy the family is spending time together.'
			act 'Leave':gt 'korrPar'
			
			act 'Keep watching':gt 'sitrPar', 'TVfam'
			act 'Finish watching':gt 'sitrPar', 'TVend'
		end
	elseif locat['Mother'] = 19:
		!!Mom by herself watching TV
		'As you walk into the living room, you see your <a href="exec:gt''mother''">mother</a> sitting on the couch watching TV.'
	elseif locat['Stepdad'] = 10:
		!!Dad watching TV by himself
		'Your <a href="exec:gt ''father''">stepfather</a> is sitting on the sofa, watching TV.'
	end

	if SchoolAtestat = 0:
		gs 'subkid'
		if kid >= 1:
			if mc_inventory['breast_pump'] = 1 and bp_unbox = 1 and pcs_inhib > 30:
				'<a href="exec: gt ''lact_bp'', ''bp_unbox_event''">Try out</a> your breast pump'
			elseif mc_inventory['breast_pump'] = 1 and bp_unbox <= 0:
				'<a href="exec: gt ''lact_bp'', ''bp_unbox_event''">Unbox</a> your breast pump'
			end
		elseif locat['Fam_livingroom'] = 0:
			if mc_inventory['breast_pump'] = 1 and bp_unbox = 1:
				'<a href="exec: gt ''lact_bp'', ''bp_unbox_event''">Try out</a> your breast pump'
			elseif mc_inventory['breast_pump'] = 1 and bp_unbox <= 0:
				'<a href="exec: gt ''lact_bp'', ''bp_unbox_event''">Unbox</a> your breast pump'
			end
		end
	end
end

if $ARGS[0]= 'sofa':
	$menu_loc = 'sitrPar'
	$menu_arg = 'sofa'
	menu_off = 0
	$loc_arg = 'sofa'
	$loc = 'sitrPar'
	gs 'family_schedule'
	gs 'sitrPar', 'occupied'
	*clr & cla
	'<center><img <<$set_imgh>> src="<<$default_img_path>>/sofa.jpg"></center>'
	*nl
	'<center>A small sofa bed, when not folded out into a bed, is just big enough for you to curl up on and take a nap.</center>'

	act 'Get up': gt 'sitrPar'
	act 'Watch TV': gt 'TV','pav'

	if locat['Fam_livingroom'] = 0 and mc_inventory['mag_porn'] > 0:
		'<br>There is a porn magazine under the sofa cushions.'
		gs 'events', 'read_porn'
		if pcs_horny >= 50:
			act 'Masturbate': gt 'selfplay', 'start'
		end
	end

	gs 'events', 'read'

	if locat['Fam_livingroom'] = 0:
		act 'Take a nap (1:00)':
			if pcs_sleep < 90:
				pcs_sleep += 10
				pcs_health += 5
				minut += 60
				gs 'stat'
				'You sleep for about an hour.'
			else
				minut += 5
				gs 'stat'
				'You''re not tired enough to sleep, even for a short nap.'
			end
		end
	end
end

if $ARGS[0] = 'TVfam':
	cla & *clr
	pcs_mood += 10
	minut += 30
	gs 'family_schedule'
	gs 'stat'
	'<center><img <<$set_imgh>> src="<<$default_img_path>>/familytv.jpg"></center>'
	'You continue to watch TV with the family. Everyone seems very engrossed in the program and almost never says anything, though Kolka occasionally makes a crack about what is happening, often getting shushed by Vlad or your mother.'
	if locat['Mother'] = 19: act 'Keep watching TV with your family': gt 'sitrPar', 'TVfam'
	act 'Finish watching':gt 'sitrPar', 'TVend'
end

if $ARGS[0] = 'TVend':
	cla & *clr
	gs 'family_schedule'
	gs 'stat'
	'<center><img <<$set_imgh>> src="<<$default_img_path>>/familytv.jpg"></center>'
	'Once the show is over, Vladimir picks up the remote and turns the TV off. He gets up and stretches before he turns and walks out of the room, likely heading to bed. Your mother also gets up. "You should go to bed or at least go to your room so your brother can get his rest." She then turns to Kolka. "Don''t stay up, go to bed." She then ushers you out of the room. As you walk out, you see Kolka putting his pillow and sheet on the couch.'
	act 'Leave': gt 'korrPar'
end

if $ARGS[0] = 'occupied':
	if (locat['Kolka'] = 2 and brothermorningsex = daystart) or locat['Kolka'] = 1 or locat['Kolka'] = 7 or locat['Kolka'] = 11 or locat['Stepdad'] = 10 or locat['Mother'] = 19 or locat['Mother'] = 24:
		locat['Fam_livingroom'] = 1
	end
end

--- sitrPar ---------------------------------

