Skip to content

Commit

Permalink
Merge pull request #7762 from NBKelly/dont-pass-prio-on-rez
Browse files Browse the repository at this point in the history
option to enable/disable auto-pass prio on rez
  • Loading branch information
NBKelly authored Oct 29, 2024
2 parents 8cfb960 + 7ce0ce0 commit d9dfc0b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/clj/web/auth.clj
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
:alt-arts :card-resolution :deckstats :gamestats :card-zoom :pin-zoom
:card-back :stacked-cards :ghost-trojans :display-encounter-info
:sides-overlap :archives-sorted :heap-sorted
:labeled-cards :labeled-unrezzed-cards :bespoke-sounds])
:labeled-cards :labeled-unrezzed-cards :bespoke-sounds :pass-on-rez])

(defn update-profile-handler
[{db :system/db
Expand Down
3 changes: 3 additions & 0 deletions src/cljs/nr/account.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
(swap! app-state assoc-in [:options :pin-zoom] (:pin-zoom @s))
(swap! app-state assoc-in [:options :show-alt-art] (:show-alt-art @s))
(swap! app-state assoc-in [:options :card-resolution] (:card-resolution @s))
(swap! app-state assoc-in [:options :pass-on-rez] (:pass-on-rez @s))
(swap! app-state assoc-in [:options :player-stats-icons] (:player-stats-icons @s))
(swap! app-state assoc-in [:options :stacked-cards] (:stacked-cards @s))
(swap! app-state assoc-in [:options :ghost-trojans] (:ghost-trojans @s))
Expand All @@ -68,6 +69,7 @@
(.setItem js/localStorage "log-width" (:log-width @s))
(.setItem js/localStorage "log-top" (:log-top @s))
(.setItem js/localStorage "log-player-highlight" (:log-player-highlight @s))
(.setItem js/localStorage "pass-on-rez" (:pass-on-rez @s))
(.setItem js/localStorage "player-stats-icons" (:player-stats-icons @s))
(.setItem js/localStorage "stacked-cards" (:stacked-cards @s))
(.setItem js/localStorage "ghost-trojans" (:ghost-trojans @s))
Expand Down Expand Up @@ -623,6 +625,7 @@
:ghost-trojans (get-in @app-state [:options :ghost-trojans])
:display-encounter-info (get-in @app-state [:options :display-encounter-info])
:sides-overlap (get-in @app-state [:options :sides-overlap])
:pass-on-rez (get-in @app-state [:options :pass-on-rez])
:log-timestamps (get-in @app-state [:options :log-timestamps])
:player-stats-icons (get-in @app-state [:options :player-stats-icons])
:runner-board-order (get-in @app-state [:options :runner-board-order])
Expand Down
3 changes: 2 additions & 1 deletion src/cljs/nr/gameboard/board.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,8 @@
[cond-button
(str (tr [:game.rez "Rez"]) " " (get-title ice))
(not (rezzed? ice))
#(send-command "rez" {:card ice :press-continue true})]
#(send-command "rez" {:card ice
:press-continue (get-in @app-state [:options :pass-on-rez])})]

(or (= "encounter-ice" (:phase @run))
@encounters)
Expand Down
9 changes: 9 additions & 0 deletions src/cljs/nr/gameboard/settings.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
:on-change #(swap! app-state assoc-in [:options :display-encounter-info] (.. % -target -checked))}]
(tr [:ingame-settings.display-encounter-info "Always display encounter info"])]]]

[:section
[:h4 (tr [:ingame-settings.game-settings "Gameplay Settings"])]
[:div
[:label [:input {:type "checkbox"
:value true
:checked (get-in @app-state [:options :pass-on-rez])
:on-change #(swap! app-state assoc-in [:options :pass-on-rez] (.. % -target -checked))}]
(tr [:ingame-settings.game-settings "Pass priority when rezzing ice"])]]]

[:section
[:h4 (tr [:ingame-settings.card-sorting "Sorting"])]
[:div
Expand Down

0 comments on commit d9dfc0b

Please sign in to comment.