disable once-only choices after the first time
This commit is contained in:
@@ -49,10 +49,16 @@
|
||||
(lambda (cc)
|
||||
(*handle-choices* choice-texts cc))))
|
||||
|
||||
(defun choice-available (choice)
|
||||
(and
|
||||
(or
|
||||
(not (choice-once-only choice))
|
||||
(= 0 (choice-chosen-count choice)))
|
||||
(eval (choice-condition choice))))
|
||||
|
||||
(defun choice-point (choice-ids on-gather)
|
||||
(let (choices // not to be confused with the global list
|
||||
(map choice-ids (bind nth *choices*))
|
||||
// TODO filter by conditions and chosen counts
|
||||
(filter (map choice-ids (bind nth *choices*)) choice-available)
|
||||
choice-outputs
|
||||
(map choices choice-output)
|
||||
choice-texts
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
(pop! divert-calls)
|
||||
(push! divert-calls 'final-divert)
|
||||
(zip divert-calls (map targets symbol-name))))))))
|
||||
//(print targets)))
|
||||
//`(funcall ,(read-symbol "" stream)))
|
||||
// TODO don't just funcall, check the scope tree of divert targets (split by .)
|
||||
// TODO diverts should quit when finished unless another -> starts a tunnel or tunnels back
|
||||
|
||||
(def-reader-macro "==" (start stream)
|
||||
(let (knot-name
|
||||
|
||||
Reference in New Issue
Block a user