mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 00:57:44 -04:00
jak2 pckernel: save pc-settings
on cheat progress and regular auto-saves (#3396)
Fixes #3392
This commit is contained in:
parent
258fd75cd6
commit
7b926b5283
|
@ -2304,6 +2304,8 @@ auto-save-post
|
|||
(defun auto-save-user ()
|
||||
(case *kernel-boot-message*
|
||||
(('play 'preview)
|
||||
(#when PC_PORT
|
||||
(pc-settings-save))
|
||||
(auto-save-command 'auto-save 0 0 *default-pool* #f)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -640,6 +640,11 @@
|
|||
|
||||
;; check unlocked cheats
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(let ((old (-> *pc-settings* cheats))
|
||||
(old-unlocked (-> *pc-settings* cheats-unlocked))
|
||||
(old-purchased (-> *pc-settings* cheats-purchased))
|
||||
(old-revealed (-> *pc-settings* cheats-revealed)))
|
||||
|
||||
(dotimes (i (-> *pc-cheats-list* length))
|
||||
|
||||
;; reveals cheats if they have been purchased, purchases cheats if they have been unlocked, unlocks cheats if they have been enabled.
|
||||
|
@ -669,6 +674,13 @@
|
|||
)
|
||||
)))
|
||||
|
||||
(when (or (!= old (-> *pc-settings* cheats))
|
||||
(!= old-unlocked (-> *pc-settings* cheats-unlocked))
|
||||
(!= old-purchased (-> *pc-settings* cheats-purchased))
|
||||
(!= old-revealed (-> *pc-settings* cheats-revealed)))
|
||||
;; save pc-settings if we made new progress
|
||||
(pc-settings-save)))
|
||||
|
||||
0)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue