only when you interact with something is it saveable again.

This commit is contained in:
Bryce Covert
2015-11-11 18:39:36 -08:00
parent 190db3dcd6
commit 6c5db9b061

View File

@@ -243,11 +243,13 @@ void main ()
(= (get-in entities [:cursor :down-target])
(or (:id interacting-entity) (:id interaction) nil)))
((or (when interacting-entity
((:get-script interacting-entity) (get-in entities [:cursor :current]) [x y]))
(do (screen! hud :on-start-script)
((:get-script interacting-entity) (get-in entities [:cursor :current]) [x y])))
(when interaction
((:get-script interaction) (or (when (:cursor interaction) :main)
(get-in entities [:cursor :current]))
[x y]))
(do (screen! hud :on-start-script)
((:get-script interaction) (or (when (:cursor interaction) :main)
(get-in entities [:cursor :current]))
[x y])))
((:get-script default-interaction) (get-in entities [:cursor :current]) [x y])) entities))
(assoc-in entities [:cursor :down-target] nil)))
@@ -754,7 +756,7 @@ void main ()
(do
(next-script entities)
(println "starting script")
(screen! hud :on-start-script)
(assoc-in entities [:actions :script-running?] true))
entities))))
@@ -1406,7 +1408,7 @@ void main ()
hovered-close?
(grow-hud screen entities :close true)
(and hovered-save? (hud-interactable?))
(and hovered-save? (hud-interactable?) (not (:already-saved? entities)))
(grow-hud screen entities :save true)
:else