# uni_admin

!!This is the file containing the university administartion office.
!!It is important to include an option to enroll in university, and therefore set the variable regarding the choice of study.

!!The following variables will be set in this file.
!! university['prep_enrolled'] is set to 1 if the player enrolls in the university preparation program. 
!! university['student'] is set to 1 if the player enrolls in a university program.
!! $university['enrolled_in'] is set to the name of the university program the player enrols in. There is the following progams: teaching_studies
!! university['enrolled_in_semester'] is set to the semester the player enrolls in starting at 1 for the first semester and ending with 8 for the last.



if $ARGS[0] = 'start':
	$sexloc = 'uni_admin'
    $location_type = 'public_indoors'
	cla & *clr
	minut += 5
	$menu_loc = 'uni_admin'
	$menu_arg = 'start'
	$loc = 'uni_admin'
	$loc_arg = 'start'
	menu_off = 0
	gs 'stat'
	gs 'themes', 'indoors'
	'<center><b><font color="maroon">The University Administration Building</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/uni_admin.jpg"></center>'
	'The main lobby is large with several pillars spread across the room. At each end of the room is a large set of stairs that go up to the next level. Several hallways going off in all directions stand opposite you.'
    if university['diploma'] > 0:
		'You have graduated from the university.'
	elseif university['expelled_for_missing_exam'] = 0 and university['expelled'] = 1:
		'You have been expelled from the university for failing your exams.'
	elseif university['expelled_for_missing_exam'] = 1:
		'You have been expelled from the university for skipping your exams.'
	elseif func('uniutil', 'student', 'expelled_for_other_reason'):
		'You have been expelled from the university for reasons unrelated to your exam results.'
	elseif university['student'] = 0:
		if university['prep_enrolled'] = 1 and month = 8:
			'You''ve enrolled in the preparatory classes.'
		elseif university['prep_enrolled'] = 1:
			'You''ve enrolled in the preparatory classes. They will start in August'
		else
			'You can take preparatory classes at the university on weekdays for 15000<b>₽</b>.'
		end
		'Admission exams for the university are held in August.'
	end
	act 'Leave':
		minut += 2
		gt 'uni_grounds', 'main'
	end

	if university['prep_enrolled'] = 1 and university['entrance_exam_passed'] = 0 and month = 8:
		act 'Attend preparatory class (1:00)': gt 'uni_admin', 'take_prep'
	end
	!!if graduated school with good grade or 
	if university['entrance_exam_passed'] = 0 and university['prep_enrolled'] = 1 and month = 8: 
		act 'Take the entrance exam (1:00)': gt 'uni_admin', 'take_test'
	end
	if (university['entrance_exam_passed'] = 1 or university['prep_enrolled'] = 0) and university['student'] = 0 and university['diploma'] = 0 and age >= 17 and (storyline ! 1 or SchoolAtestat = 1) and month < 9:
		act 'Enroll at the university': gt 'uni_admin', 'enrollment'
	end
	if university['enrolled_in_semester'] > 0 and university['enrolled_in_semester'] = university['semester_passed'] and university['semeter_passed'] < 8:
		act 'Enroll in your next semester': gt 'uni_admin', 'enrollment_semester'
	end
	!!the if below should only show up if Sveta tried to enroll and didn''t or couldn''t pay for the classes before
	if university['entrance_information'] = 1 and university['prep_enrolled'] = 0 and university['student'] = 0 and month < 9: gs 'uni_admin', 'prep_pay'
end

if $ARGS[0] = 'enrollment':
	$sexloc = 'uni_admin'
	cla & *clr
	minut += 15
	gs 'stat'
	'<center><b><font color="maroon">Enrollment Office</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/enrollment1.jpg"></center>'
	'You enter the enrollment office, where there are several desks with women working behind them and a fair number of people around your age waiting in a side room. You inform them that you wish to enrol at the university. They take down your name and ask you to wait in the waiting room until your name is called. You walk into the other room and nod at the other prospective students before taking a seat.'
	act 'Wait your turn':
		cla & *clr
		'<center><b><font color="maroon">Enrollment office</font></b></center>'
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/enrollment2.jpg"></center>'
		'You wait until until your name is called by one of the women, who leads you down a side hall to one of the offices. You take a seat and introduce yourself, and after a brief discussion the woman takes your information and enters it into the computer.'
		if class['school_grade_average'] >= 70 or university['entrance_exam_passed'] = 1:
			minut += 15
			'She looks over your information and fills in some data. Several minutes later, she turns to you and smiles, telling you that you are eligible to enrol at the university. She gives you a lot of paperwork and you spend some time filling it all out. Once done, she asks you to stand up so she can take your picture. As she works on your university ID card she tells you about the different degrees, giving you time to decide which one you want to choose.'
			act 'Teaching degree':
				cla
				'You inform her you wish to acquire a teaching degree. She hands you a packet of information about the classes you will be attending and about dorm life. She then inquires if you will be signing up for any elective classes at this time.'
				act 'Not right now':
					cla
					'You shake your head and tell her you don''t intend to sign up for any elective classes right now. She nods and makes a few more notes before handing over your finished paperwork, welcoming you to Saint Petersburg University. You get up and leave, looking forward to when you can come back and start your classes.'
					act 'Leave':gt 'uni_admin', 'start'
				end
				act 'Enrol':
					!!This sets the variables such that the player is enrolled in the first semester of the teaching program.
					university['prep_counter'] = 0
					university['prep_enrolled'] = 0
					university['student'] = 1
					$university['enrolled_in']= 'teaching_studies'
					university['enrolled_in_semester'] = 1
					home_owned[11] = 1
					!!This creates the classes for the first semester of the teaching program to be used by the grade system, and gives the player a starting grade value (which is a failing grade, the player have to study if they want to pass)
					gs 'grades', 'createclass', 'uni_teaching_studies_semester_1', 'general education 101', 3, 2, 'no', 'no', 1, 12
					gs 'grades', 'createclass', 'uni_teaching_studies_semester_1', 'teaching methods 101', 3, 2, 'no', 'no', 1, 12
					gs 'grades', 'createclass', 'uni_teaching_studies_semester_1', 'learning theories 101', 3, 2, 'no', 'no', 1, 12
					gs 'grades', 'grade_award', 'uni_teaching_studies_semester_1', 'general education 101', 35
					gs 'grades', 'grade_award', 'uni_teaching_studies_semester_1', 'teaching methods 101', 35
					gs 'grades', 'grade_award', 'uni_teaching_studies_semester_1', 'learning theories 101', 35
					cla
					'You tell her you would like to pursue a teaching degree. She smiles and nods, then finishes filling out some more paperwork about the courses you can expect to take. Once your ID is done she hands it over, along with all of your paperwork. You are now officially enrolled as a student at the Saint Petersburg University.'
					if (day - week) >= 27 and month = 8:
						university['semester_week'] = 1
						*nl
						'She tells you that you enrolled at the last minute, and the classes have already started this week.'
					end
					act 'Leave':gt 'uni_admin', 'start'
                    !!Once we have the framework working, I will start working on some elective classes and add them here.
					!!act 'Take some elective classes':
				end
			end
		else
			university['entrance_information'] = 1
			minut += 5
			'She looks over the information, filling in some data. Several minutes later she turns to you and frowns, telling you that you''re not eligible to enrol at the university at this time. Your grades from secondary school were not good enough. She informs you that with so many students applying, they can only take those with better grades, but you can still get in if you take the preparatory classes and pass them with a high enough grade. You do have to pay for them though.'
			act 'You don''t want to sign up':
				cla
				'You shake your head and thank her, telling her you will think about it. She smiles at you and tells you she understands before you leave.'
				act 'Leave class':gt 'uni_admin', 'start'
			end
			act 'You don''t have enough money':
				cla
				'You tell her you don''t have enough money to pay for the classes. She nods in understanding and tells you to come back and sign up later if you get the money. You thank her for the information and leave.'
				act 'Leave class':gt 'uni_admin', 'start'
			end
			gs 'uni_admin', 'prep_pay'
		end
	end
end

if $ARGS[0] = 'enrollment_semester':
	$sexloc = 'uni_admin'
	cla & *clr
	minut += 15
	gs 'stat'
	'<center><b><font color="maroon">Enrollment Office</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/enrollment1.jpg"></center>'
	'You enter the enrollment office, where there are several desks with women working behind them and a fair number of people around your age waiting in a side room. You inform them that you wish to enrol at the university. They take down your name and ask you to wait in the waiting room until your name is called. You walk into the other room and nod at the other prospective students before taking a seat.'
	act 'Wait your turn':
		cla & *clr
		'<center><b><font color="maroon">Enrollment office</font></b></center>'
		'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/enrollment2.jpg"></center>'
		'You wait until until your name is called by one of the women, who leads you down a side hall to one of the offices. You take a seat and introduce yourself, and after a brief discussion the woman takes your information and enters it into the computer.'
		if 	$university['enrolled_in']= 'teaching_studies':
			minut += 15
			'She looks over your information and fills in some data. Several minutes later she turns to you and smiles, telling you that you since you passed your last semester you can enrol in the '+trim(MID('  first, second, third, fourth, fifth, sixth, seventh, eighth,  ninth,  tenth', (university['enrolled_in_semester']+1)*8,7))+' of the Teaching Studies Program. She gives you the paperwork and you spend some time filling it all out.'
			act 'Enrol':
				!!This sets the variables such that the player is enrolled in next semester of the teaching program.
				university['enrolled_in_semester'] += 1
				if university['enrolled_in_semester'] = 2:
					!!This creates the classes for the first semester of the teaching program to be used by the grade system, and gives the player a starting grade value (which is a failing grade, the player have to study if they want to pass)
					gs 'grades', 'createclass', 'uni_teaching_studies_semester_2', 'general education 102', 3, 2, 'no', 'no', 1, 12
					gs 'grades', 'createclass', 'uni_teaching_studies_semester_2', 'teaching methods 102', 3, 2, 'no', 'no', 1, 12
					gs 'grades', 'createclass', 'uni_teaching_studies_semester_2', 'psychology of a student 101', 3, 2, 'no', 'no', 1, 12
					gs 'grades', 'grade_award', 'uni_teaching_studies_semester_2', 'general education 102', (class['uni_teaching_studies_semester_1_general education 101_grade']/3+10)
					gs 'grades', 'grade_award', 'uni_teaching_studies_semester_2', 'teaching methods 102', (class['uni_teaching_studies_semester_1_teaching methods 101_grade']/3+10)
					gs 'grades', 'grade_award', 'uni_teaching_studies_semester_2', 'psychology of a student 101', 35
				end
				cla
				'You tell her you would like to continue pursuing a teaching degree. She smiles and nods, then finishes filling out some more paperwork about the courses you can expect to take.'
				if (day - week) >= 27 and month = 8:
					university['semester_week'] = 1
					*nl
					'She tells you that you enrolled at the last minute, and the classes have already started this week.'
				end
				act 'Leave':gt 'uni_admin', 'start'
                    !!Once we have the framework working, I will start working on some elective classes and add them here.
					!!act 'Take some elective classes':
			end
		end
	end
end


if $ARGS[0] = 'prep_pay':
	if money >= 15000:
		act 'Pay for the preparatory classes (15000<b>₽</b>) (Cash)':
			cla & *clr
			minut += 10
			money -= 15000
			gs 'stat'
			university['prep_enrolled'] = 1
			'<center><b><font color="maroon">Enrollment Office</font></b></center>'
			'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/payment.jpg"></center>'
			'You go back to the enrollment office and pay 15000<b>₽</b> for the preparatory classes. They are held every weekday until <b>21:00</b>.'
			act 'Leave':gt 'uni_admin', 'start'
		end
	end
	if karta >= 15000:
		act 'Pay for the preparatory classes (15000<b>₽</b>) (Card)':
			cla & *clr
			minut += 10
			karta -= 15000
			gs 'stat'
			university['prep_enrolled'] = 1
			'<center><b><font color="maroon">Enrollment Office</font></b></center>'
			'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/payment.jpg"></center>'
			'You go back to the enrollment office and pay 15000<b>₽</b> for the preparatory classes. They are held every weekday until <b>21:00</b>.'
			act 'Leave':gt 'uni_admin', 'start'
		end
	end
end

if $ARGS[0] = 'take_prep':
	$sexloc = 'uni_admin'
	cla & *clr
	minut += 60
	university['prep_counter'] += 1
	intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
	gs 'stat'
	'<center><b><font color="maroon">Preparatory Class</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/prepcourse1.jpg"></center>'
	'You attend the preparatory class for an hour. You pay close attention to what is being said and take notes for the entrance examination later on.'
	act 'Leave class':gt 'uni_admin', 'start'
end

if $ARGS[0] = 'take_test':
	$sexloc = 'uni_admin'
	cla & *clr
	minut += 60
	intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
	gs 'stat'
	'<center><b><font color="maroon">Entrance Exam</font></b></center>'
	'<center><img <<$set_imgh>> src="images/locations/city/island/university/admin/prepcourse1.jpg"></center>'
	'You enter the exam room and take your seat. A professor comes out and talks about the different parts of the exam you will be taking and what is required to pass. Once he''s finished, he passes out the papers and starts the clock. You have one hour to complete the test.'
    if pcs_intel +university['prep_counter'] >= 100:
		university['entrance_exam_passed'] = 1
		'You completed the entrance examination and passed it with a perfect score.'
	elseif pcs_intel + university['prep_counter'] >= 80:
		university['entrance_exam_passed'] = 1
		'You completed the entrance examination and passed it.'
	else
		university['entrance_exam_passed'] = -1
		'You completed the entrance exam, but failed to pass.'
	end
	act 'Leave the exam room':gt 'uni_admin', 'start'
end

--- uni_admin ---------------------------------

