uniutil.qsrc 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. # uniutil
  2. if $ARGS[0] = 'eligible_for_university':
  3. RESULT = func('uniutil', 'student', 'status') = 0 and func('uniutil', 'diploma', 'obtained') = 0 and (age >= 17 or fakepassport = 1)
  4. end
  5. if $ARGS[0] = 'prepclass':
  6. if $ARGS[1] = 'cost':
  7. RESULT = 15000
  8. end
  9. if $ARGS[1] = 'closing_hour':
  10. RESULT = 21
  11. end
  12. if $ARGS[1] = 'is_enrolled':
  13. RESULT = prepclassstats['enrolled'] = 1
  14. end
  15. if $ARGS[1] = 'set_enrolled':
  16. prepclassstats['enrolled'] = ARGS[2]
  17. end
  18. if $ARGS[1] = 'count':
  19. RESULT = prepclassstats['count']
  20. end
  21. if $ARGS[1] = 'set_count':
  22. prepclassstats['count'] = ARGS[2]
  23. end
  24. if $ARGS[1] = 'update_count':
  25. gs 'uniutil', 'prepclass', 'set_count', func('uniutil', 'prepclass', 'count') + 1
  26. end
  27. if $ARGS[1] = 'enroll':
  28. money -= func('uniutil', 'prepclass', 'cost')
  29. gs 'uniutil', 'prepclass', 'set_enrolled', 1
  30. gs 'uniutil', 'prepclass', 'set_count', 0
  31. end
  32. if $ARGS[1] = 'unenroll':
  33. killvar 'prepclassstats'
  34. end
  35. if $ARGS[1] = 'offered_this_month':
  36. RESULT = month <= func('uniutil', 'entrance_exam', 'month')
  37. end
  38. if $ARGS[1] = 'offered_today':
  39. RESULT = func('uniutil', 'entrance_exam', 'offered_this_month') and week < 6
  40. end
  41. if $ARGS[1] = 'in_session':
  42. RESULT = func('uniutil', 'prepclass', 'offered_today') and hour < func('uniutil', 'prepclass', 'closing_hour')
  43. end
  44. end
  45. if $ARGS[0] = 'entrance_exam':
  46. if $ARGS[1] = 'month':
  47. RESULT = 8
  48. end
  49. if $ARGS[1] = 'offered_today':
  50. RESULT = month = func('uniutil', 'entrance_exam', 'month')
  51. end
  52. if $ARGS[1] = 'is_passed':
  53. RESULT = pcs_intel + func('uniutil', 'prepclass', 'count') >= 60
  54. end
  55. if $ARGS[1] = 'print_month':
  56. $RESULT = $monthName[func('uniutil', 'entrance_exam', 'month')]
  57. end
  58. end
  59. !! The legacy vars are the vars used by the university before the vars were largely consolidated into
  60. !! arrays with string indices. This function exists to avoid breaking old save files with this change,
  61. !! which was made in September 2020. It can be removed whenever it is felt enough time has passed.
  62. if $ARGS[0] = 'transfer_legacy_vars':
  63. if abiturient > 0:
  64. gs 'uniutil', 'prepclass', 'set_enrolled', 1
  65. gs 'uniutil', 'prepclass', 'set_count', abiturient - 1
  66. end
  67. killvar 'abiturient'
  68. if kurs > 0:
  69. if (semestr = 1 and month < func('uniutil', 'entrance_exam', 'month')) or (semestr = 2 and month > func('uniutil', 'exam', 'month', 2)):
  70. !! under the old system, the semestr variable was advanced when the exam was passed, so if the
  71. !! variable is set to a value that does not match the current month, the player skipped the exam
  72. !! and is expelled
  73. gs 'uniutil', 'student', 'set_status', -2
  74. killvar 'unisemestrstats'
  75. elseif semestr = 2 and month = func('uniutil', 'exam', 'month', 1):
  76. !! semestr = 2 in first semester exam month in the old system indicates that its still the first
  77. !! semester (time-wise) but the exam has been passed, so we set the new variables accordingly.
  78. gs 'uniutil', 'semester', 'set', 1
  79. gs 'uniutil', 'attendance', 'reset'
  80. gs 'uniutil', 'assignment_progress', 'reset'
  81. gs 'uniutil', 'assignments_done', 'reset'
  82. gs 'uniutil', 'semester_result', 'set_passed'
  83. gs 'uniutil', 'passed_semesters', 'set', 0
  84. else
  85. gs 'uniutil', 'semester', 'set', semestr
  86. gs 'uniutil', 'attendance', 'set', lektor
  87. gs 'uniutil', 'assignment_progress', 'set', kursovik
  88. gs 'uniutil', 'assignments_done', 'set', kursovikD
  89. gs 'uniutil', 'semester_result', 'reset'
  90. gs 'uniutil', 'passed_semesters', 'set', iif(semestr = 2, 1, 0)
  91. end
  92. gs 'uniutil', 'semester', 'update_year'
  93. gs 'uniutil', 'scholarship', 'set', iif(stipuha = 1, func('uniutil', 'scholarship', 'honors_value'), 0)
  94. end
  95. killvar 'kurs'
  96. killvar 'semestr'
  97. killvar 'stipuha'
  98. killvar 'lektor'
  99. killvar 'kursovik'
  100. killvar 'kursovikD'
  101. killvar 'examen'
  102. end
  103. if $ARGS[0] = 'check_semester_vs_date':
  104. if year > func('uniutil', 'semester', 'get_year') + 1:
  105. !! if year has advanced by more than one since a semester was finished, semesters were skipped.
  106. RESULT = -1
  107. exit
  108. end
  109. unilect_sm = func('uniutil', 'lecture', 'start_month', func('uniutil', 'semester', 'get'))
  110. uniexam_m = func('uniutil', 'exam', 'month', func('uniutil', 'semester', 'get'))
  111. uniexam_mns = func('uniutil', 'exam', 'month', func('uniutil','semester', 'next'))
  112. if year = func('uniutil', 'semester', 'get_year') + 1:
  113. if month > uniexam_m mod 12 and func('uniutil', 'semester_passed') and month <= uniexam_mns:
  114. !! the semester was passed and the next one is not over
  115. RESULT = 1
  116. elseif month <= uniexam_m:
  117. !! the semester is still in progress
  118. RESULT = 0
  119. else
  120. !! expelled
  121. RESULT = -1
  122. end
  123. else
  124. if unilect_sm > uniexam_m or month <= uniexam_m:
  125. !! The semester is still in progress
  126. RESULT = 0
  127. elseif func('uniutil', 'semester_result', 'is_passed') and (uniexam_m > uniexam_mns or month <= uniexam_mns):
  128. !! the semester was passed and the next one is not over
  129. RESULT = 1
  130. else
  131. !! expelled
  132. RESULT = -1
  133. end
  134. end
  135. killvar 'unilect_sm'
  136. killvar 'uniexam_m'
  137. killvar 'uniexam_mns'
  138. end
  139. if $ARGS[0] = 'student':
  140. if $ARGS[1] = 'status':
  141. if student >= 0:
  142. gs 'uniutil', 'transfer_legacy_vars'
  143. end
  144. if student > 0:
  145. uni_semvdateres = func('uniutil', 'check_semester_vs_date')
  146. if uni_semvdateres < 0:
  147. !! date indicates semester exam skipped
  148. gs 'uniutil', 'student', 'expel'
  149. elseif uni_semvdateres > 0:
  150. !! date indicates semester exam passed and next semester started
  151. gs 'uniutil', 'semester', 'update'
  152. gs 'uniutil', 'semester', 'update_year'
  153. gs 'uniutil', 'semester_result', 'reset'
  154. gs 'uniutil', 'passed_semesters', 'update'
  155. else
  156. !! date indicates semester is still in progress
  157. gs 'uniutil', 'semester', 'update_year'
  158. end
  159. killvar 'uni_semvdateres'
  160. end
  161. RESULT = student
  162. end
  163. if $ARGS[1] = 'set_status':
  164. student = ARGS[2]
  165. end
  166. if $ARGS[1] = 'enroll':
  167. gs 'uniutil', 'prepclass', 'unenroll'
  168. gs 'uniutil', 'student', 'set_status', 1
  169. gs 'uniutil', 'semester', 'set', 1
  170. gs 'uniutil', 'semester', 'update_year'
  171. gs 'uniutil', 'scholarship', 'reset'
  172. gs 'uniutil', 'attendance', 'reset'
  173. gs 'uniutil', 'assignment_progress', 'reset'
  174. gs 'uniutil', 'assignments_done', 'reset'
  175. gs 'uniutil', 'semester_result', 'reset'
  176. end
  177. if $ARGS[1] = 'unenroll':
  178. gs 'uniutil', 'prepclass', 'unenroll'
  179. if student > 0:
  180. killvar 'student'
  181. killvar 'unisemestrstats'
  182. end
  183. end
  184. if $ARGS[1] = 'expel':
  185. if func('uniutil', 'semester_result', 'is_failed'):
  186. gs 'uniutil', 'student', 'unenroll'
  187. gs 'uniutil', 'student', 'set_status', -1
  188. elseif func('uniutil', 'check_semester_vs_date') < 0:
  189. gs 'uniutil', 'student', 'unenroll'
  190. gs 'uniutil', 'student', 'set_status', -2
  191. else
  192. gs 'uniutil', 'student', 'unenroll'
  193. gs 'uniutil', 'student', 'set_status', -3
  194. end
  195. end
  196. if $ARGS[1] = 'graduate':
  197. gs 'uniutil', 'student', 'unenroll'
  198. gs 'uniutil', 'diploma', 'set_obtained'
  199. end
  200. if $ARGS[1] = 'expelled_for_failing':
  201. RESULT = func('uniutil', 'student', 'status') = -1
  202. end
  203. if $ARGS[1] = 'expelled_for_skipping':
  204. RESULT = func('uniutil', 'student', 'status') = -2
  205. end
  206. if $ARGS[1] = 'expelled_for_other_reason':
  207. RESULT = func('uniutil', 'student', 'status') = -3
  208. end
  209. if $ARGS[1] = 'enrolled':
  210. RESULT = func('uniutil', 'student', 'status') > 0
  211. end
  212. if $ARGS[1] = 'not_enrolled':
  213. RESULT = func('uniutil', 'student', 'enrolled') = 0
  214. end
  215. if $ARGS[1] = 'semesters_to_graduate':
  216. RESULT = 2
  217. end
  218. end
  219. if $ARGS[0] = 'diploma':
  220. if $ARGS[1] = 'get':
  221. RESULT = diplom
  222. end
  223. if $ARGS[1] = 'set':
  224. diplom = ARGS[2]
  225. end
  226. if $ARGS[1] = 'set_obtained':
  227. gs 'uniutil', 'diploma', 'set', 1
  228. if func('uniutil', 'fake_diploma', 'aware_needed'):
  229. gs 'uniutil', 'fake_diploma', 'reset'
  230. end
  231. end
  232. if $ARGS[1] = 'obtained':
  233. RESULT = func('uniutil', 'diploma', 'get') > 0
  234. end
  235. end
  236. if $ARGS[0] = 'fake_diploma':
  237. if $ARGS[1] = 'get':
  238. RESULT = fakediplom
  239. end
  240. if $ARGS[1] = 'set':
  241. fakediplom = ARGS[2]
  242. end
  243. if $ARGS[1] = 'set_aware_needed':
  244. gs 'uniutil', 'fake_diploma', 'set', 2
  245. end
  246. if $ARGS[1] = 'set_obtained':
  247. gs 'uniutil', 'fake_diploma', 'set', 1
  248. end
  249. if $ARGS[1] = 'reset':
  250. gs 'uniutil', 'fake_diploma', 'set', 0
  251. end
  252. if $ARGS[1] = 'aware_needed':
  253. RESULT = func('uniutil', 'fake_diploma', 'get') = 2
  254. end
  255. if $ARGS[1] = 'obtained':
  256. RESULT = func('uniutil', 'fake_diploma', 'get') = 1
  257. end
  258. end
  259. if $ARGS[0] = 'appear_to_have_graduated':
  260. RESULT = func('uniutil', 'diploma', 'obtained') or func('uniutil', 'fake_diploma', 'obtained')
  261. end
  262. if $ARGS[0] = 'attendance':
  263. if $ARGS[1] = 'get':
  264. RESULT = unisemestrstats['lectures_attendad']
  265. end
  266. if $ARGS[1] = 'set':
  267. unisemestrstats['lectures_attendad'] = ARGS[2]
  268. end
  269. if $ARGS[1] = 'update':
  270. gs 'uniutil', 'attendance', 'set', func('uniutil', 'attendance', 'get') + 1
  271. end
  272. if $ARGS[1] = 'reset':
  273. gs 'uniutil', 'attendance', 'set', 0
  274. end
  275. if $ARGS[1] = 'is_great':
  276. RESULT = func('uniutil', 'attendance', 'get') > 55
  277. end
  278. if $ARGS[1] = 'is_ok':
  279. RESULT = func('uniutil', 'attendance', 'get') > 40
  280. end
  281. if $ARGS[1] = 'is_bad':
  282. RESULT = func('uniutil', 'attendance', 'is_ok') = 0
  283. end
  284. end
  285. if $ARGS[0] = 'assignment_progress':
  286. if $ARGS[1] = 'get':
  287. RESULT = unisemestrstats['assignment_progress']
  288. end
  289. if $ARGS[1] = 'set':
  290. unisemestrstats['assignment_progress'] = iif(ARGS[2] <= 100, ARGS[2], 100)
  291. end
  292. if $ARGS[1] = 'update':
  293. gs 'uniutil', 'assignment_progress', 'set', func('uniutil', 'assignment_progress', 'get') + rand(pcs_intel / 20, pcs_intel / 10)
  294. end
  295. if $ARGS[1] = 'reset':
  296. gs 'uniutil', 'assignment_progress', 'set', 0
  297. end
  298. if $ARGS[1] = 'is_finished':
  299. RESULT = func('uniutil', 'assignment_progress', 'get') >= 100
  300. end
  301. if $ARGS[1] = 'is_not_finished':
  302. RESULT = func('uniutil', 'assignment_progress', 'is_finished') = 0
  303. end
  304. end
  305. if $ARGS[0] = 'assignments_done':
  306. if $ARGS[1] = 'get':
  307. RESULT = unisemestrstats['assignments_done']
  308. end
  309. if $ARGS[1] = 'set':
  310. unisemestrstats['assignments_done'] = ARGS[2]
  311. end
  312. if $ARGS[1] = 'update':
  313. gs 'uniutil', 'assignment_progress', 'reset'
  314. gs 'uniutil', 'assignments_done', 'set', func('uniutil', 'assignments_done', 'get') + 1
  315. end
  316. if $ARGS[1] = 'reset':
  317. gs 'uniutil', 'assignments_done', 'set', 0
  318. end
  319. if $ARGS[1] = 'great_num':
  320. RESULT = 11
  321. end
  322. if $ARGS[1] = 'min_num':
  323. RESULT = 1
  324. end
  325. if $ARGS[1] = 'did_great_num':
  326. RESULT = func('uniutil', 'assignments_done', 'get') >= func('uniutil', 'assignments_done', 'great_num')
  327. end
  328. if $ARGS[1] = 'did_min_num':
  329. RESULT = func('uniutil', 'assignments_done', 'get') >= func('uniutil', 'assignments_done', 'min_num')
  330. end
  331. end
  332. if $ARGS[0] = 'scholarship':
  333. if $ARGS[1] = 'get':
  334. RESULT = unisemestrstats['scholarship']
  335. end
  336. if $ARGS[1] = 'set':
  337. unisemestrstats['scholarship'] = ARGS[2]
  338. end
  339. if $ARGS[1] = 'reset':
  340. gs 'uniutil', 'scholarship', 'set', 0
  341. end
  342. if $ARGS[1] = 'is_active':
  343. RESULT = unisemestrstats['scholarship'] > 0 and func('uniutil', 'semester', 'is_active')
  344. end
  345. if $ARGS[1] = 'honors_value':
  346. RESULT = 1200
  347. end
  348. end
  349. if $ARGS[0] = 'lecture':
  350. if $ARGS[1] = 'start_hour':
  351. RESULT = 8
  352. end
  353. if $ARGS[1] = 'length':
  354. RESULT = 6
  355. end
  356. if $ARGS[1] = 'start_month':
  357. if ARGS[2] = 1:
  358. RESULT = 9
  359. elseif ARGS[2] = 2:
  360. RESULT = 2
  361. else
  362. !! Set to impossible month if it is not semester 1 or 2
  363. RESULT = 13
  364. end
  365. end
  366. if $ARGS[1] = 'end_month':
  367. if ARGS[2] = 1:
  368. RESULT = 11
  369. elseif ARGS[2] = 2:
  370. RESULT = 4
  371. else
  372. !! Set to impossible month if it is not semester 1 or 2
  373. RESULT = 0
  374. end
  375. end
  376. if $ARGS[1] = 'offered_this_month':
  377. unilect_sm = func('uniutil', 'lecture', 'start_month', func('uniutil', 'semester', 'get'))
  378. unilect_em = func('uniutil', 'lecture', 'end_month', func('uniutil', 'semester', 'get'))
  379. if unilect_sm <= unilect_em:
  380. !! if semester is in one calendar year
  381. RESULT = month >= unilect_sm and month <= unilect_em
  382. else
  383. !! if semester continues through New Years
  384. RESULT = month >= unilect_sm or month <= unilect_em
  385. end
  386. killvar 'unilect_sm'
  387. killvar 'unilect_em'
  388. end
  389. if $ARGS[1] = 'offered_today':
  390. RESULT = func('uniutil', 'lecture', 'offered_this_month') and week < 6
  391. end
  392. if $ARGS[1] = 'in_session':
  393. RESULT = func('uniutil', 'lecture', 'offered_today') and hour < func('uniutil', 'lecture', 'start_hour')
  394. end
  395. if $ARGS[1] = 'print_start_month':
  396. $RESULT = $monthName[func('uniutil', 'lecture', 'start_month', ARGS[2])]
  397. end
  398. if $ARGS[1] = 'print_months':
  399. unilect_idx = func('uniutil', 'lecture', 'start_month', ARGS[2])
  400. unilect_end = func('uniutil', 'lecture', 'end_month', ARGS[2])
  401. :lectureprintmonthsloop
  402. $RESULT += $monthname[unilect_idx]
  403. if unilect_idx ! unilect_end:
  404. $RESULT += ', '
  405. unilect_idx = (unilect_idx mod 12) + 1
  406. jump 'lectureprintmonthsloop'
  407. end
  408. killvar 'unilect_idx'
  409. killvar 'unilect_end'
  410. end
  411. end
  412. if $ARGS[0] = 'exam':
  413. if $ARGS[1] = 'month':
  414. if ARGS[2] = 1:
  415. RESULT = 12
  416. elseif ARGS[2] = 2:
  417. RESULT = 5
  418. else
  419. !! Set to impossible month if it is not semester 1 or 2
  420. RESULT = 0
  421. end
  422. end
  423. if $ARGS[1] = 'offered_this_month':
  424. RESULT = month = func('uniutil', 'exam', 'month', func('uniutil', 'semester', 'get'))
  425. end
  426. if $ARGS[1] = 'offered_today':
  427. RESULT = func('uniutil', 'exam', 'offered_this_month') and week < 6
  428. end
  429. if $ARGS[1] = 'print_month':
  430. $RESULT = $monthname[func('uniutil', 'exam', 'month', ARGS[2])]
  431. end
  432. end
  433. if $ARGS[0] = 'semester':
  434. if $ARGS[1] = 'get':
  435. RESULT = unisemestrstats['num']
  436. end
  437. if $ARGS[1] = 'set':
  438. unisemestrstats['num'] = ARGS[2]
  439. end
  440. if $ARGS[1] = 'next':
  441. RESULT = (func('uniutil', 'semester', 'get') mod func('uniutil', 'semester', 'total')) + 1
  442. end
  443. if $ARGS[1] = 'total':
  444. RESULT = 2
  445. end
  446. if $ARGS[1] = 'update':
  447. gs 'uniutil', 'semester', 'set', func('uniutil', 'semester', 'next')
  448. end
  449. if $ARGS[1] = 'get_year':
  450. RESULT = unisemestrstats['year']
  451. end
  452. if $ARGS[1] = 'update_year':
  453. unisemestrstats['year'] = year
  454. end
  455. if $ARGS[1] = 'is_active':
  456. RESULT = func('uniutil', 'lecture', 'offered_this_month') or func('uniutil', 'exam', 'offered_this_month')
  457. end
  458. if $ARGS[1] = 'print_months':
  459. $RESULT = 'Semester ' + ARGS[2] + ' lectures: ' + func('uniutil', 'lecture', 'print_months', ARGS[2]) + '.
  460. '
  461. $RESULT += 'Semester ' + ARGS[2] + ' exams: ' + func('uniutil', 'exam', 'print_month', ARGS[2]) + '.
  462. '
  463. end
  464. if $ARGS[1] = 'print_all_months':
  465. unisemester_idx = 1
  466. :semesterprintmonthsloop
  467. $RESULT += func('uniutil', 'semester', 'print_months', unisemester_idx)
  468. if unisemester_idx < func('uniutil', 'semester', 'total'):
  469. unisemester_idx += 1
  470. jump 'semesterprintmonthsloop'
  471. end
  472. killvar 'unisemester_idx'
  473. end
  474. end
  475. if $ARGS[0] = 'semester_result':
  476. if $ARGS[1] = 'get':
  477. RESULT = unisemestrstats['is_passed']
  478. end
  479. if $ARGS[1] = 'set':
  480. unisemestrstats['is_passed'] = ARGS[2]
  481. end
  482. if $ARGS[1] = 'set_passed':
  483. gs 'uniutil', 'semester_result', 'set', 1
  484. end
  485. if $ARGS[1] = 'set_failed':
  486. gs 'uniutil', 'semester_result', 'set', -1
  487. end
  488. if $ARGS[1] = 'reset':
  489. gs 'uniutil', 'semester_result', 'set', 0
  490. end
  491. if $ARGS[1] = 'is_passed':
  492. RESULT = func('uniutil', 'semester_result', 'get') > 0
  493. end
  494. if $ARGS[1] = 'is_failed':
  495. RESULT = func('uniutil', 'semester_result', 'get') < 0
  496. end
  497. end
  498. if $ARGS[0] = 'exam_outcome':
  499. gs 'uniutil', 'assignment_progress', 'reset'
  500. gs 'uniutil', 'assignments_done', 'reset'
  501. gs 'uniutil', 'attendance', 'reset'
  502. if $ARGS[1] = 'passed_honors':
  503. gs 'uniutil', 'semester_result', 'set_passed'
  504. gs 'uniutil', 'scholarship', 'set', func('uniutil', 'scholarship', 'honors_value')
  505. elseif $ARGS[1] = 'passed':
  506. gs 'uniutil', 'semester_result', 'set_passed'
  507. gs 'uniutil', 'scholarship', 'reset'
  508. else
  509. gs 'uniutil', 'semester_result', 'set_failed'
  510. gs 'uniutil', 'scholarship', 'reset'
  511. end
  512. end
  513. if $ARGS[0] = 'passed_semesters':
  514. if $ARGS[1] = 'get':
  515. RESULT = unisemestrstats['prev_passed_count'] + iif(func('uniutil', 'semester_result', 'is_passed'), 1, 0)
  516. end
  517. if $ARGS[1] = 'set':
  518. unisemestrstats['prev_passed_count'] = ARGS[2]
  519. end
  520. if $ARGS[1] = 'update':
  521. gs 'uniutil', 'passed_semesters', 'set', func('uniutil', 'passed_semesters', 'get')
  522. end
  523. end
  524. --- uniutil ---------------------------------