Allow configuration of starting ease
John Smith

John Smith commited on 2022-206 08:38:31
Showing 2 changed files, with 2 additions and 2 deletions.

... ...
@@ -205,7 +205,7 @@ if action == "a" then
205 205
             local nc = {}
206 206
             -- these Prompts will just be converted to Rec, so we don't need to exclude answers from prompt-text
207 207
             for _re in pt:gmatch("%{[^%}]+%}") do
208
-                table.insert(nc, Prompt:new(pt, "", os.time(), 30, 0, 0, os.time()))
208
+                table.insert(nc, Prompt:new(pt, "", os.time(), 30, 0, 0, os.time(), conf:get("StartingEase") or 2.5))
209 209
                 prctr = prctr + 1
210 210
             end
211 211
             table.insert(deck, nc)
... ...
@@ -62,7 +62,7 @@ function Prompt:fromrecs(recs)
62 62
                     (rec.Successes or {})[ctr],
63 63
                     (rec.Failures or {})[ctr],
64 64
                     (rec.Created or {})[1],
65
-                    (rec.Ease or {})[ctr] or "2.5"
65
+                    (rec.Ease or {})[ctr] or conf:get("StartingEase") or "2.5"
66 66
                 ))
67 67
                 m, n = opt:find("%{[^%}]+%}", n)
68 68
                 ctr = ctr + 1
69 69