Browse code

Specialize equipment panel to adventuring gear

Joseph Weston authored on 19/12/2021 03:34:50
Showing 1 changed files
... ...
@@ -202,15 +202,24 @@
202 202
              [:span at-higher-levels]]))
203 203
        [license-notice spell]])
204 204
 
205
-(defn equipment-panel [item]
205
+
206
+(defn gear-panel [item]
206 207
     [:article {:class (styles/equipment-panel)}
207 208
      [heading item]
208 209
      [:span.kind
209 210
       (spaced
210 211
        (-> item :equipment_category :name)
211
-       (cond
212
-         (item :gear_category) (-> item :gear_category :name string/lower-case parenthesize)
213
-         (item :vehicle_category) (-> item :vehicle_category string/lower-case parenthesize)))]
212
+       (-> item :gear_category :name string/lower-case parenthesize))]
213
+     [property-list
214
+      :Weight
215
+        (weight item)
216
+      :Cost
217
+        (spaced
218
+         (cost item)
219
+         (some->> item :quantity (str "for ") parenthesize))]
220
+     [description item]
221
+     [license-notice item]])
222
+
214 223
      [property-list
215 224
       :Speed
216 225
         (speed item)