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)))))
|
||||
|
||||
|
||||
(defun statistics (category-splits)
|
||||
`((SPLIT-PBS ,(mapcar (lambda (category) (getf (best-category-split category) :ELAPSED)) csplits))
|
||||
(BEST-CATEGORY-RUN-SPLITS ,(or
|
||||
(mapcar (lambda (split)
|
||||
(millis-since-internal-timestamp 0 (run-split-elapsed-time split)))
|
||||
(ignore-errors
|
||||
(run-splits (mito:find-dao 'run :id (getf (best-category-run category) :RUN-ID)))))
|
||||
(mapcar (lambda (csplit) nil) csplits)))))
|
||||
(defun statistics (category)
|
||||
(let ((csplits (category-splits category)))
|
||||
`((SPLIT-PBS . ,(mapcar (lambda (csplit) (getf (best-category-split csplit) :ELAPSED)) csplits))
|
||||
(BEST-CATEGORY-RUN-SPLITS . ,(or
|
||||
(mapcar (lambda (split)
|
||||
(millis-since-internal-timestamp 0 (run-split-elapsed-time split)))
|
||||
(ignore-errors
|
||||
(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)
|
||||
("Import a category" . IMPORT-CATEGORY)
|
||||
("Make a new category" . NEW-CATEGORY)
|
||||
("Delete a category" . DELETE-CATEGORY)
|
||||
("Start a speedrun" . START-SPEEDRUN)
|
||||
("View splits of a speedrun" . VIEW-SPEEDRUNS)
|
||||
("Delete a category" . DELETE-CATEGORY)
|
||||
("Delete a speedrun" . DELETE-SPEEDRUN)
|
||||
("Exit" . EXIT)))))
|
||||
(case choice
|
||||
|
2
ui.lisp
2
ui.lisp
@ -110,7 +110,7 @@
|
||||
(redraws '(title-instance))
|
||||
(speedrun (make-speedrun category))
|
||||
(csplits (category-splits category))
|
||||
(bests (statistics csplits))
|
||||
(bests (statistics category))
|
||||
(split-pbs (cdr (assoc 'SPLIT-PBS bests)))
|
||||
(best-category-run-pbs (cdr (assoc 'BEST-CATEGORY-RUN-SPLITS bests))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user