first step at dialogue trees.

This commit is contained in:
2014-09-24 13:25:07 -07:00
parent 4c2da6acd5
commit f90ae6b7c3
14 changed files with 113 additions and 200 deletions

View File

@@ -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]