add actual assocation between the statistics elements
This commit is contained in:
parent
cd5d87c4f5
commit
dd5ce5c86b
@ -69,12 +69,13 @@
|
|||||||
(sxql:where (:= :category_id (mito:object-id category)))))
|
(sxql:where (:= :category_id (mito:object-id category)))))
|
||||||
|
|
||||||
|
|
||||||
(defun statistics (category-splits)
|
(defun statistics (category)
|
||||||
`((SPLIT-PBS ,(mapcar (lambda (category) (getf (best-category-split category) :ELAPSED)) csplits))
|
(let ((csplits (category-splits category)))
|
||||||
(BEST-CATEGORY-RUN-SPLITS ,(or
|
`((SPLIT-PBS . ,(mapcar (lambda (csplit) (getf (best-category-split csplit) :ELAPSED)) csplits))
|
||||||
(mapcar (lambda (split)
|
(BEST-CATEGORY-RUN-SPLITS . ,(or
|
||||||
(millis-since-internal-timestamp 0 (run-split-elapsed-time split)))
|
(mapcar (lambda (split)
|
||||||
(ignore-errors
|
(millis-since-internal-timestamp 0 (run-split-elapsed-time split)))
|
||||||
(run-splits (mito:find-dao 'run :id (getf (best-category-run category) :RUN-ID)))))
|
(ignore-errors
|
||||||
(mapcar (lambda (csplit) nil) csplits)))))
|
(run-splits (mito:find-dao 'run :id (getf (best-category-run category) :RUN-ID)))))
|
||||||
|
(mapcar (lambda (csplit) nil) csplits))))))
|
||||||
|
|
||||||
|
@ -109,9 +109,9 @@
|
|||||||
(let ((choice (select-option '(("Help" . HELP)
|
(let ((choice (select-option '(("Help" . HELP)
|
||||||
("Import a category" . IMPORT-CATEGORY)
|
("Import a category" . IMPORT-CATEGORY)
|
||||||
("Make a new category" . NEW-CATEGORY)
|
("Make a new category" . NEW-CATEGORY)
|
||||||
("Delete a category" . DELETE-CATEGORY)
|
|
||||||
("Start a speedrun" . START-SPEEDRUN)
|
("Start a speedrun" . START-SPEEDRUN)
|
||||||
("View splits of a speedrun" . VIEW-SPEEDRUNS)
|
("View splits of a speedrun" . VIEW-SPEEDRUNS)
|
||||||
|
("Delete a category" . DELETE-CATEGORY)
|
||||||
("Delete a speedrun" . DELETE-SPEEDRUN)
|
("Delete a speedrun" . DELETE-SPEEDRUN)
|
||||||
("Exit" . EXIT)))))
|
("Exit" . EXIT)))))
|
||||||
(case choice
|
(case choice
|
||||||
|
2
ui.lisp
2
ui.lisp
@ -110,7 +110,7 @@
|
|||||||
(redraws '(title-instance))
|
(redraws '(title-instance))
|
||||||
(speedrun (make-speedrun category))
|
(speedrun (make-speedrun category))
|
||||||
(csplits (category-splits category))
|
(csplits (category-splits category))
|
||||||
(bests (statistics csplits))
|
(bests (statistics category))
|
||||||
(split-pbs (cdr (assoc 'SPLIT-PBS bests)))
|
(split-pbs (cdr (assoc 'SPLIT-PBS bests)))
|
||||||
(best-category-run-pbs (cdr (assoc 'BEST-CATEGORY-RUN-SPLITS bests))))
|
(best-category-run-pbs (cdr (assoc 'BEST-CATEGORY-RUN-SPLITS bests))))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user