Browse Source

fix school errors

Stephan Fuchs 5 months ago
parent
commit
c4560d3b46

+ 2 - 2
sugarcube/src/activities/school/events/class.tw

@@ -1,13 +1,13 @@
 :: class_events_scripts[script]
 setup.schoolEventPriority = function(eventId,factor=10){
 	const daystart = State.variables.time.daystart;
-	const eventDay = State.variables.q.school.eventDays[eventId] ?? 0;
+	const eventDay = State.variables.quest("school").eventDays[eventId] ?? 0;
 	return Math.min(1,daystart - eventDay) * factor;
 }
 
 setup.schoolEventWeight = function(eventId,factor=10){
 	const daystart = State.variables.time.daystart;
-	const eventDay = State.variables.q.school.eventDays[eventId] ?? 0;
+	const eventDay = State.variables.quest("school").eventDays[eventId] ?? 0;
 	return Math.min(10,daystart - eventDay) * factor;
 }
 

+ 2 - 2
sugarcube/src/activities/school/quest_school.tw

@@ -218,8 +218,8 @@
 					<<run $quest('school').func('grade_cap',100)>>
 				<<case 'attend_class'>>
 					<!-- !!This adds the point for attending a class. Also the first time it is called in a given day it register that there will be classes that day.-->
-					<<setinit $quest('school').classes[$location_var[$here][2]].class_day[$time.weekday] = 1>>
-					<<setinit $quest('school').classes[$location_var[$here][2]].weekly_grade_gain += 10>>
+					/*<<setinit $quest('school').classes[$location_var[$here][2]].class_day[$time.weekday] = 1>>
+					<<setinit $quest('school').classes[$location_var[$here][2]].weekly_grade_gain += 10>>*/
 				<<case 'class_activity'>>
 					<!-- !!This adds the point for doing an in class activity that is not modified.-->
 					<<if $pc.pcs_stam <= 0>>