different approach to walkie talkie.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
(ns advent.screens.rooms.inside-castle
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.actions :as actions]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.screens.items :as items]
|
||||
[advent.utils :as utils]
|
||||
[advent.tween :as tween]
|
||||
@@ -354,6 +355,16 @@
|
||||
:x 22
|
||||
:y 110
|
||||
:baseline 95)
|
||||
:walkie-talkie (assoc (texture "inside-castle/walkie-talkie.png")
|
||||
:x 257
|
||||
:y 135
|
||||
:baseline 0
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ego "Let's give it a listen.")
|
||||
(actions/walk-to entities :ego [272 136] :face :left)
|
||||
(actions/play-animation entities :ego :start-squat-2 :stop? false)
|
||||
(common/listen-to-frankie entities)
|
||||
(actions/play-animation entities :ego :end-squat)))
|
||||
|
||||
:trophy (assoc (animation->texture screen trophy)
|
||||
:x 253 :y 69 :baseline 191
|
||||
@@ -455,6 +466,10 @@
|
||||
(if (actions/has-item? entities :sword)
|
||||
(update-in entities [:room :entities] #(dissoc % :sword))
|
||||
entities)
|
||||
(if (and (not (actions/has-item? entities :walkie-talkies))
|
||||
(actions/has-obtained? entities :walkie-talkies))
|
||||
entities
|
||||
(update-in entities [:room :entities] dissoc :walkie-talkie))
|
||||
(if (#{:night :sunrise} (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)))
|
||||
|
||||
Reference in New Issue
Block a user