first step at dialogue trees.
This commit is contained in:
@@ -147,6 +147,20 @@
|
||||
(stop screen entities target-id)
|
||||
entities)))))
|
||||
|
||||
(defn present-choices [entities & pairs]
|
||||
(let [pairs (partition 2 pairs)]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
(run! dialogue/choice-screen :on-present-choices :pairs pairs)
|
||||
entities)
|
||||
|
||||
(continue [this screen entities] entities)
|
||||
|
||||
(done? [this screen entities] true)
|
||||
|
||||
(terminate [this screen entities] entities))))
|
||||
|
||||
|
||||
(defn give [entities target-id item]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
|
||||
Reference in New Issue
Block a user