Skip to content

Commit

Permalink
fix steppe on web
Browse files Browse the repository at this point in the history
  • Loading branch information
garbados committed Dec 17, 2023
1 parent f183298 commit 7e46461
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/the_longtime_game/web.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -665,15 +665,18 @@
(defn- handle-next-location []
[:div.box>div.content
[:h3 "Choose your next location"]
(let [stage (second (:path @herd))]
(let [location (core/current-location @herd)
steppe? (= :steppe (:terrain location))
stage (second (:path @herd))]
(doall
(for [i (range (count stage))
:let [location (get-in @herd [:path 1 i])]]
^{:key i}
[:p
[:button.button.is-info.is-fullwidth
{:on-click #(do (swap! herd core/next-location i)
(swap! herd core/end-month)
(when-not steppe?
(swap! herd core/end-month))
(reset! monthstep :event))}
(:name location)]])))])

Expand Down

0 comments on commit 7e46461

Please sign in to comment.