steam shares should work.
This commit is contained in:
@@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
(defmacro steamify [steam-version & [regular-version]]
|
(defmacro steamify [steam-version & [regular-version]]
|
||||||
(if has-steam?
|
(if has-steam?
|
||||||
steam-version
|
`(if has-steam?
|
||||||
|
~steam-version
|
||||||
|
~regular-version)
|
||||||
regular-version))
|
regular-version))
|
||||||
|
|
||||||
(defn init []
|
(defn init []
|
||||||
@@ -71,7 +73,7 @@
|
|||||||
(-> bb (.put bytes) )
|
(-> bb (.put bytes) )
|
||||||
(.fileWrite rs filename bb (* 2 (count bytes))))
|
(.fileWrite rs filename bb (* 2 (count bytes))))
|
||||||
(let [f (files! :local filename)]
|
(let [f (files! :local filename)]
|
||||||
(.write f bytes false))))
|
(.writeBytes f bytes false))))
|
||||||
|
|
||||||
(defn list-edn-files []
|
(defn list-edn-files []
|
||||||
(steamify
|
(steamify
|
||||||
@@ -83,20 +85,6 @@
|
|||||||
(for [save-file (.list (files! :local ".") ".edn")]
|
(for [save-file (.list (files! :local ".") ".edn")]
|
||||||
(.name save-file))))
|
(.name save-file))))
|
||||||
|
|
||||||
(defn snapshot-list []
|
|
||||||
(steamify
|
|
||||||
(let [rs (SteamRemoteStorage. nil)]
|
|
||||||
(for [i (range (.getFileCount rs))
|
|
||||||
:let [len (* 1024 1024)
|
|
||||||
n (.getFileNameAndSize rs i (make-array Integer/TYPE 1))
|
|
||||||
bb (ByteBuffer/allocateDirect len)]
|
|
||||||
:when (.endsWith n ".edn")]
|
|
||||||
(do
|
|
||||||
(.fileRead rs n bb len)
|
|
||||||
(-> bb .asCharBuffer .toString edn/read-string))))
|
|
||||||
(for [save-file (.list (files! :local ".") ".edn")]
|
|
||||||
(edn/read-string (.readString save-file)))))
|
|
||||||
|
|
||||||
(defn save-screenshot [pm filename]
|
(defn save-screenshot [pm filename]
|
||||||
(steamify
|
(steamify
|
||||||
(let [rs (SteamRemoteStorage. nil)
|
(let [rs (SteamRemoteStorage. nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user