123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- :: school_schedule[include]
- <<set _schoolDay = $time.weekday - 1>>
- <<if _schoolDay > 4>>
- <!-- It's Saturday or Sunday. Most likely because you are debugging. Let's just pretend as if it's Tuesday then. -->
- <<set _schoolDay = 1>>
- <</if>>
- <<set _schoolTimetable = $q.school.get('timetable')>>
- <<set _schoolPeriodStartTimes = $q.school.get('startTimes')>>
- /*<<set _schoolClasses = {
- computer: {
- label:'Computer',
- varname:'sci',
- teacherId:'A138',
- endPassage:'gschool_lessons',
- endArgument: 'short_break',
- flags: {
- skills:{
- intelligence: 0.5
- }
- }
- },
- music: {
- label:'Music',
- varname:'sci',
- teacherId:'A138',
- endPassage:'gschool_lessons',
- endArgument: 'short_break',
- flags: {
- skills:{
- intelligence: 0.5
- }
- }
- },
- }>>*/
- <<run $time.advanceTo(...(_schoolPeriodStartTimes[$q.school.period]))>>
- <<if _schoolTimetable[_schoolDay].length > $q.school.period>>
- <<set _curClassId = _schoolTimetable[_schoolDay][$q.school.period]>>
- <<else>>
- <<set _curClassId = 'END'>>
- <</if>>
- <<switch _curClassId>>
- <<case 'END'>>
- <<gt 'school_schedule_end'>>
- <<case 'break'>>
- <<set $q.school.period += 1>>
- <<gt 'school_break' 'break'>>
- <<case 'breakLunch'>>
- <<set $q.school.period += 1>>
- <<gt 'school_break_lunch'>>
- <<default>>
- <<if $q.school.period == 0>>
- <<gs 'school_schedule_before_class' _curClassId>><!-- Avoid doubled gt... which is annoying -->
- <<else>>
- <<gt 'school_schedule_before_class' _curClassId>>
- <</if>>
- <</switch>>
- :: school_schedule_end[quest]
- <<image 'locations/pavlovsk/school/building/gschool_hall0#.jpg' 0 2>>
- <p>School is over for today.</p>
- <<actCLA 'Leave the building'>>
- <<gt 'school_grounds'>>
- <</actCLA>>
- :: school_schedule_before_class[event]
- <!-- For stupid reasons, this is included in the first period instead of gone to... this means you can't interrupt it in the first period -->
- <<set _curClassId = $location_var[$here][0]>>
- <h2>School Hallway</h2>
- <<if $q.school.period == 0>>
- <<gs 'gschool_gossip' 'morning'>>
- <<else>>
- <<image 'locations/pavlovsk/school/building/gschool_hall0#.jpg' 0 2>>
- <<gs 'gschool_gossip' 'gossip'>>
- <</if>>
- <<if Story.has('school_lesson_'+_curClassId)>>
- <<set _curClass = func('school_lesson_'+_curClassId,'getData')>>
- <<act `'Go to next class ('+_curClass.label+')'`>>
- <<gt 'school_lesson' _curClassId>>
- <<set $q.school.period += 1>>
- <</act>>
- <<act 'Skip next class'>>
- <<set $q.school.period += 1>>
- <<run $q.school.inc('missedClasses',1)>>
- <<gs 'school_schedule'>>
- <</act>>
- <<act 'Leave school'>>
- <<set _schoolDay = $time.weekday - 1>>
- <<for _key, _classId range $q.school.get('timetable')[_schoolDay]>>
- <<if _classId != 'break' and _classId != 'breakLunch' and _key >= $q.school.period>>
- <<run $q.school.inc('missedClasses',1)>>
- <</if>>
- <</for>>
- <<gt 'school_grounds'>>
- <</act>>
- <<else>>
- <<notice>>The next class (_curClassId) currently does not exist. You can directly skip to the next one.<</notice>>
- <<act 'Skip next class'>>
- <<set $q.school.period += 1>>
- <<gs 'school_schedule'>>
- <</act>>
- <</if>>
|