Parcourir la source

[fixed/changed] fixed a bug where studying for exams will do nothing, and added a check to make sure you are a student before you can study and removed some old study acts.

bgkjdgbizgblzdgbr il y a 2 ans
Parent
commit
baff503f99
3 fichiers modifiés avec 55 ajouts et 96 suppressions
  1. 51 48
      locations/stol.qsrc
  2. 0 46
      locations/uni_dorm.qsrc
  3. 4 2
      locations/uni_library.qsrc

+ 51 - 48
locations/stol.qsrc

@@ -102,33 +102,34 @@ if $ARGS[0] = 'start':
 		end
 	end
 
-	if university['semester_week'] > 0:
-		i = 0
-		:study_loop
-		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
-			if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
-				dynamic '	act ''Study for your <<$class_list_name[i]>> class (30 minuts)'': gt ''stol'', ''studying'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''start'' '
-			else
-				*nl
-				'You don''t need to study more this week for you <<$class_list_name[i]>> class'
+	if university['enrolled_in_semester'] > university['semester_passed']:
+		if university['semester_week'] > 0:
+			i = 0
+			:study_loop
+			if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
+				if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
+					dynamic '	act ''Study for your <<$class_list_name[i]>> class (30 minuts)'': gt ''stol'', ''studying'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''start'' '
+				else
+					*nl
+					'You don''t need to study more this week for you <<$class_list_name[i]>> class'
+				end
 			end
+
+			i += 1
+			if ARRSIZE('class_list_institution') >= i: jump 'study_loop'
+			killvar 'i'
+		elseif university['exam_week'] > 0:
+			i = 0
+			:exam_loop
+			if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>' and func('uni_programs', 'exam', 'is_over', $class_list_name[i]) = 0:
+				dynamic '	act ''Study intensely for your <<$class_list_name[i]>> exam (30 minuts)'': gt ''stol'', ''studying_exam'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''start'' '
+			end
+
+			i += 1
+			if ARRSIZE('class_list_institution') >= i: jump 'exam_loop'
+			killvar 'i'
 		end
-		
-		i += 1
-		if ARRSIZE('class_list_institution') >= i: jump 'study_loop'
-		killvar 'i'
-	elseif university['exam_week'] > 0:
-		i = 0
-		:exam_loop
-		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>' and func('uni_programs', 'exam', 'is_over', $class_list_name[i]) = 0:
-			dynamic '	act ''Study intensely for your <<$class_list_name[i]>> exam (30 minuts)'': gt ''stol'', ''studying_exam'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''start'' '
-		end
-		
-		i += 1
-		if ARRSIZE('class_list_institution') >= i: jump 'exam_loop'
-		killvar 'i'
 	end
-
 end
 
 if $ARGS[0] = 'stolPar':
@@ -202,31 +203,33 @@ if $ARGS[0] = 'stolPar':
 		act 'Finish all of your homework (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 	end
 
-	if university['semester_week'] > 0:
-		i = 0
-		:study_loop
-		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
-			if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
-				dynamic '	act ''Study for your <<$class_list_name[i]>> class (30 minuts)'': gt ''stol'', ''studying'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''stolPar'' '
-			else
-				*nl
-				'You don''t need to study more this week for you <<$class_list_name[i]>> class'
+	if university['enrolled_in_semester'] > university['semester_passed']:
+		if university['semester_week'] > 0:
+			i = 0
+			:study_loop
+			if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
+				if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
+					dynamic '	act ''Study for your <<$class_list_name[i]>> class (30 minuts)'': gt ''stol'', ''studying'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''stolPar'' '
+				else
+					*nl
+					'You don''t need to study more this week for you <<$class_list_name[i]>> class'
+				end
 			end
+
+			i += 1
+			if ARRSIZE('class_list_institution') >= i: jump 'study_loop'
+			killvar 'i'
+		elseif university['exam_week'] > 0:
+			i = 0
+			:exam_loop
+			if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>' and func('uni_programs', 'exam', 'is_over', $class_list_name[i]) = 0:
+				dynamic '	act ''Study intensely for your <<$class_list_name[i]>> exam (30 minuts)'': gt ''stol'', ''studying_exam'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''stolPar'' '
+			end
+
+			i += 1
+			if ARRSIZE('class_list_institution') >= i: jump 'exam_loop'
+			killvar 'i'
 		end
-		
-		i += 1
-		if ARRSIZE('class_list_institution') >= i: jump 'study_loop'
-		killvar 'i'
-	elseif university['exam_week'] > 0:
-		i = 0
-		:exam_loop
-		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>' and func('uni_programs', 'exam', 'is_over', $class_list_name[i]) = 0:
-			dynamic '	act ''Study intensely for your <<$class_list_name[i]>> exam (30 minuts)'': gt ''stol'', ''studying_exam'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'', ''stolPar'' '
-		end
-		
-		i += 1
-		if ARRSIZE('class_list_institution') >= i: jump 'exam_loop'
-		killvar 'i'
 	end
 
 	killvar '$stol_loc_temp'
@@ -484,7 +487,7 @@ if $ARGS[0] = 'studying_exam':
 		else
 			'You study for half an hour, and think you are improving a lot.'
 		end		
-		gs 'grades', 'grade_award', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'yes', study_mod
+		gs 'grades', 'grade_award', '<<$ARGS[1]>>', '<<$ARGS[2]>>', study_mod
 	end
 	
 	gs 'stat'

+ 0 - 46
locations/uni_dorm.qsrc

@@ -373,34 +373,6 @@ if $ARGS[0] = 'dorm_room':
 	
 	act 'Relax on your bed': gt 'bed', 'start'
 
-	if university['semester_week'] > 0:
-		i = 0
-		:study_loop
-		if $class_list_institution[i] = 'uni_<<$university[''enrolled_in'']>>_semester_<<university[''enrolled_in_semester'']>>':
-			if dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$class_list_institution[i]>>_<<$class_list_name[i]>>_optional_weekly_max'']'):
-				dynamic '	act ''Study for your <<$class_list_name[i]>> class (0:30)'': gt ''uni_dorm'', ''studying'', ''<<$class_list_institution[i]>>'', ''<<$class_list_name[i]>>'' '
-			else
-				*nl
-				'You don''t need to study any more this week for your <<$class_list_name[i]>> class.'
-			end
-		end
-		
-		i += 1
-		if ARRSIZE('class_list_institution') >= i: jump 'study_loop'
-		killvar 'i'
-	end
-
-	act 'Read the course literature (2:00)':
-		cla
-		menu_off = 1
-		minut += 120
-		intel_exp += 1 + (mentats_dose - rand(0,mentats_dose))
-		gs 'stat'
-		'You spend two hours reading the course literature. You feel like you''ve picked up some stuff from the book that will come in handy for the exam.'
-
-		act 'Finish':gt 'uni_dorm', 'dorm_room'
-	end
-
 	dynamic $wearpan
 	dynamic $removepan
 
@@ -409,24 +381,6 @@ if $ARGS[0] = 'dorm_room':
 	end
 end
 
-if $args[0] = 'studying':
-	cla & *clr
-	'<center><img <<$set_imgh>> src="images/locations/shared/apartment/homework.jpg"></center>'
-	minut += 30
-	if komp = 1:
-		gs 'grades', 'optional_activity_attribute', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'yes', pcs_intel
-	else
-		gs 'grades', 'optional_activity_attribute', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'no', pcs_intel
-	end
-	gs 'stat'
-	if dyneval ('RESULT = class[''<<$ARGS[1]>>_<<$ARGS[2]>>_optional_weekly_grade_gain'']') < dyneval ('RESULT = class[''<<$ARGS[1]>>_<<$ARGS[2]>>_optional_weekly_max'']'):
-		'You study for half an hour and can tell that you will need to study more if you want to understand this week''s material.'
-	else
-		'You study for half an hour and believe that you now understand everything that is being covered this week.'
-	end
-	act 'Get up from your desk': gt 'uni_dorm', 'dorm_room'
-end
-
 if $args[0] = 'dorm_kitchen':
 	$loc_arg = 'dorm_kitchen'
 	$loc = 'uni_dorm'

+ 4 - 2
locations/uni_library.qsrc

@@ -16,7 +16,9 @@ if $ARGS[0] = 'start':
 	'<center><img <<$set_imgh>> src="images/locations/city/island/university/library/library.jpg"></center>'
 	'One of the medium sized buildings is the university''s library. It is three stories tall and filled with books, sections with tables scattered around to study or relax at and computer stations to help students with their studying.'
 	if (week < 6 or hour < 23) and hour > 7:
-		act 'Study': gt 'uni_library', 'study'
+		 if university['enrolled_in_semester'] > university['semester_passed']:
+			act 'Study': gt 'uni_library', 'study'
+		end
 		act 'Wander around': gt 'uni_library', 'wander'
 	else
 		'The library is closing'
@@ -176,7 +178,7 @@ if $ARGS[0] = 'studying_exam':
 		else
 			'You study for half an hour and believe that you''re improving a lot.'
 		end		
-		gs 'grades', 'grade_award', '<<$ARGS[1]>>', '<<$ARGS[2]>>', 'yes', study_mod
+		gs 'grades', 'grade_award', '<<$ARGS[1]>>', '<<$ARGS[2]>>', study_mod
 	end
 	
 	gs 'stat'