wrong interaction tweak.
This commit is contained in:
@@ -21,6 +21,16 @@
|
|||||||
(actions/update-state entities #(assoc % :broke-lock? true))
|
(actions/update-state entities #(assoc % :broke-lock? true))
|
||||||
(actions/talk entities :ego "Got it!"))))
|
(actions/talk entities :ego "Got it!"))))
|
||||||
|
|
||||||
|
(defn unlock-chest [entities]
|
||||||
|
(if (get-in @entities [:state :broke-lock?])
|
||||||
|
(do
|
||||||
|
(actions/talk entities :ego "I already bust it open."))
|
||||||
|
(do
|
||||||
|
(actions/talk entities :ego "It's worth a shot...")
|
||||||
|
(actions/walk-straight-to entities :ego [152 95] :face :right)
|
||||||
|
(actions/play-animation entities :ego :reach)
|
||||||
|
(actions/do-dialogue entities :ego "Nope."))))
|
||||||
|
|
||||||
(defn explore-chest [entities]
|
(defn explore-chest [entities]
|
||||||
(cond
|
(cond
|
||||||
(actions/has-item? entities :slingshot)
|
(actions/has-item? entities :slingshot)
|
||||||
@@ -78,7 +88,9 @@
|
|||||||
:script (actions/get-script entities (explore-chest entities))
|
:script (actions/get-script entities (explore-chest entities))
|
||||||
:scripts {:sword (actions/get-script entities (actions/talk entities :ego "There's not enough room to swing my sword here."))
|
:scripts {:sword (actions/get-script entities (actions/talk entities :ego "There's not enough room to swing my sword here."))
|
||||||
:crowbar (actions/get-script entities
|
:crowbar (actions/get-script entities
|
||||||
(bust-chest entities))}}}
|
(bust-chest entities))
|
||||||
|
:key (actions/get-script entities
|
||||||
|
(unlock-chest entities))}}}
|
||||||
:layers [(assoc (utils/get-texture "inside-stash/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)]
|
:layers [(assoc (utils/get-texture "inside-stash/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)]
|
||||||
:entities {:lid (assoc (utils/get-texture "inside-stash/lid.png")
|
:entities {:lid (assoc (utils/get-texture "inside-stash/lid.png")
|
||||||
:x 156 :y 116 :baseline 125 :night-profile :none)
|
:x 156 :y 116 :baseline 125 :night-profile :none)
|
||||||
|
|||||||
Reference in New Issue
Block a user