creates saves order list.
This commit is contained in:
@@ -58,9 +58,17 @@
|
||||
atlas (texture-atlas "packed/pack.atlas")]
|
||||
(texture (texture-atlas! atlas :find-region atlas-name))))
|
||||
|
||||
|
||||
(defn snapshot-list []
|
||||
(let [prefs (.getPreferences (Gdx/app) "ticks-tales-saves")]
|
||||
(if (.contains prefs "snapshot-list")
|
||||
(edn/read-string (.getString prefs "snapshot-list"))
|
||||
[])))
|
||||
|
||||
(defn snapshot-state [entities name]
|
||||
(doto (.getPreferences (Gdx/app) "ticks-tales-saves")
|
||||
(.putString (saves/saves name) (pr-str (entities :state)))
|
||||
(.putString "snapshot-list" (pr-str (cons (saves/saves name) (filter (complement #{(saves/saves name)}) (snapshot-list)))))
|
||||
.flush))
|
||||
|
||||
(defn save [entities]
|
||||
|
||||
Reference in New Issue
Block a user