diff options
| author | 0xNul <57599792+0xNul@users.noreply.github.com> | 2023-07-16 21:51:28 -0700 |
|---|---|---|
| committer | 0xNul <57599792+0xNul@users.noreply.github.com> | 2023-07-22 07:50:36 -0700 |
| commit | 8197bd68bcf8aa40058b07160cd8690d0a36669c (patch) | |
| tree | 6ccaac73c5f0737527cec946ab2f77ca36d9c5d0 /src | |
| parent | 85916c04040b7e8a2031b44bd6cf860184f2c023 (diff) | |
added bodygaurd weapons to model index
Diffstat (limited to 'src')
| -rw-r--r-- | src/votann/codex_view.clj | 23 | ||||
| -rw-r--r-- | src/votann/core.clj | 4 | ||||
| -rw-r--r-- | src/votann/current_list_widget.clj | 2 |
3 files changed, 23 insertions, 6 deletions
diff --git a/src/votann/codex_view.clj b/src/votann/codex_view.clj index 89bff26..ff50453 100644 --- a/src/votann/codex_view.clj +++ b/src/votann/codex_view.clj @@ -124,7 +124,9 @@ (:a weapon) (:bs weapon) (:s weapon) - (:ap weapon) + (if (= 0 (:ap weapon)) + 0 + (str "-" (:ap weapon))) (:d weapon)))]) (if-not (empty? melee) @@ -137,7 +139,9 @@ (:a weapon) (:bs weapon) (:s weapon) - (:ap weapon) + (if (= 0 (:ap weapon)) + 0 + (str "-" (:ap weapon))) (:d weapon)))])]) (defn column-1 [ranged-weapons melee-weapons] @@ -247,7 +251,20 @@ (defn content [model] [:content - (column-1 (:ranged-weapons model) (:melee-weapons model)) + (column-1 (-> (map (fn [model] + (:ranged-weapons model)) (:bodyguards model)) + (concat (:ranged-weapons model)) + (flatten) + (->> + (distinct) + (sort-by :name))) + (-> (map (fn [model] + (:melee-weapons model)) (:bodyguards model)) + (concat (:melee-weapons model)) + (flatten) + (->> + (distinct) + (sort-by :name)))) (column-2 model)]) (defn bottom [model] diff --git a/src/votann/core.clj b/src/votann/core.clj index 9dc46d6..7958151 100644 --- a/src/votann/core.clj +++ b/src/votann/core.clj @@ -9,8 +9,8 @@ {:fx/type :stage :max-width 1340 :min-width 1340 - :max-height 1000 - :min-height 1000 + :max-height 1018 + :min-height 1018 :on-close-request (fn [_] (System/exit 0)) :icons [(get-resource-path (str "icons/256x256.png")) (get-resource-path (str "icons/48x48.png")) diff --git a/src/votann/current_list_widget.clj b/src/votann/current_list_widget.clj index b6915df..0a75fca 100644 --- a/src/votann/current_list_widget.clj +++ b/src/votann/current_list_widget.clj @@ -43,7 +43,7 @@ (defn current-list-widget [{:keys [units]}] {:fx/type :scroll-pane - :pref-height 860 + :pref-height 904 :pref-width 300 :content {:fx/type :v-box :alignment :top-center |