a hacky way to make talking automatically stop after a certain amount of time.
This commit is contained in:
@@ -32,11 +32,14 @@
|
||||
(case cursor
|
||||
:walk (assoc-in entities [:ego :actions] (actions/from-path screen entities :ego [x y]))
|
||||
:look (assoc-in entities [:ego :actions] [(actions/stop :ego)
|
||||
(actions/talk :ego "Looks pretty uninteresting to me.")])
|
||||
(actions/talk :ego "Looks pretty uninteresting to me.")
|
||||
(actions/stop :ego)])
|
||||
:touch (assoc-in entities [:ego :actions] [(actions/stop :ego)
|
||||
(actions/talk :ego "Can't do anything with it.")])
|
||||
(actions/talk :ego "Can't do anything with it.")
|
||||
(actions/stop :ego)])
|
||||
:talk (assoc-in entities [:ego :actions] [(actions/stop :ego)
|
||||
(actions/talk :ego "It's not much of a conversationalist.")])))))
|
||||
(actions/talk :ego "It's not much of a conversationalist.")
|
||||
(actions/stop :ego)])))))
|
||||
|
||||
|
||||
(def +next-cursor+ (into {} (map vector [:walk :touch :look :talk] (drop 1 (cycle [:walk :touch :look :talk])))))
|
||||
@@ -165,11 +168,13 @@
|
||||
:look
|
||||
(assoc-in entities [:ego :actions]
|
||||
[(actions/stop :ego)
|
||||
(actions/talk :ego (str "The last time I went through that door, Fangald turned me into a frog."))])
|
||||
(actions/talk :ego (str "The last time I went through that door, Fangald turned me into a frog."))
|
||||
(actions/stop :ego)])
|
||||
:touch
|
||||
(assoc-in entities [:ego :actions] (concat
|
||||
(actions/from-path screen entities :ego [262 88])
|
||||
[(actions/talk :ego (str "Anyone home?"))]))
|
||||
[(actions/talk :ego (str "Anyone home?"))
|
||||
(actions/stop :ego)]))
|
||||
nil)))
|
||||
(reify
|
||||
IMouseIn
|
||||
@@ -180,11 +185,13 @@
|
||||
(case cursor
|
||||
:look
|
||||
(assoc-in entities [:ego :actions] [(actions/stop :ego)
|
||||
(actions/talk :ego (str "It's the coolest sword I've ever seen!"))])
|
||||
(actions/talk :ego (str "It's the coolest sword I've ever seen!"))
|
||||
(actions/stop :ego)])
|
||||
:touch
|
||||
(assoc-in entities [:ego :actions] (concat
|
||||
(actions/from-path screen entities :ego [290 66])
|
||||
[(actions/talk :ego (str "Maybe I can pull it out."))]))
|
||||
[(actions/talk :ego (str "Maybe I can pull it out."))
|
||||
(actions/stop :ego)]))
|
||||
nil)))]
|
||||
:scale-fn (scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:layers [(assoc background :x 0 :y 0 :baseline 0)
|
||||
|
||||
Reference in New Issue
Block a user