Skip to content

Commit

Permalink
Merge pull request #609 from datdamnzotz/add-extra-charactersheets
Browse files Browse the repository at this point in the history
Add extra character sheets
  • Loading branch information
datdamnzotz authored Apr 1, 2024
2 parents cdca12f + 509dc3f commit 6b709e7
Show file tree
Hide file tree
Showing 23 changed files with 14 additions and 3 deletions.
Binary file modified resources/fillable-char-sheetstyle-2-0-spells.pdf
Binary file not shown.
Binary file modified resources/fillable-char-sheetstyle-2-1-spells.pdf
Binary file not shown.
Binary file modified resources/fillable-char-sheetstyle-2-2-spells.pdf
Binary file not shown.
Binary file modified resources/fillable-char-sheetstyle-2-3-spells.pdf
Binary file not shown.
Binary file modified resources/fillable-char-sheetstyle-2-4-spells.pdf
Binary file not shown.
Binary file modified resources/fillable-char-sheetstyle-2-5-spells.pdf
Binary file not shown.
Binary file modified resources/fillable-char-sheetstyle-2-6-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-3-0-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-3-1-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-3-2-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-3-3-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-3-4-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-3-5-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-3-6-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-4-0-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-4-1-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-4-2-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-4-3-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-4-4-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-4-5-spells.pdf
Binary file not shown.
Binary file added resources/fillable-char-sheetstyle-4-6-spells.pdf
Binary file not shown.
13 changes: 11 additions & 2 deletions src/clj/orcpub/routes.clj
Original file line number Diff line number Diff line change
Expand Up @@ -478,14 +478,23 @@
(pdf/write-fields! doc fields (not chrome?) font-sizes)
(if (and print-spell-cards? (seq spells-known))
(add-spell-cards! doc spells-known spell-save-dcs spell-attack-mods custom-spells print-spell-card-dc-mod?))

(if (and image-url
(re-matches #"^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]" image-url)
(not image-url-failed))
(pdf/draw-image! doc (pdf/get-page doc 1) image-url 0.45 1.75 2.35 3.15))
(case print-character-sheet-style?
1 (pdf/draw-image! doc (pdf/get-page doc 1) image-url 0.45 1.75 2.35 3.15)
2 (pdf/draw-image! doc (pdf/get-page doc 1) image-url 0.45 1.75 2.35 3.15)
3 (pdf/draw-image! doc (pdf/get-page doc 1) image-url 0.45 1.75 2.35 3.15)
4 (pdf/draw-image! doc (pdf/get-page doc 0) image-url 0.50 0.85 2.35 3.15)))
(if (and faction-image-url
(re-matches #"^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]" faction-image-url)
(not faction-image-url-failed))
(pdf/draw-image! doc (pdf/get-page doc 1) faction-image-url 5.88 2.4 1.905 1.52))
(case print-character-sheet-style?
1 (pdf/draw-image! doc (pdf/get-page doc 1) faction-image-url 5.88 2.4 1.905 1.52)
2 (pdf/draw-image! doc (pdf/get-page doc 1) faction-image-url 5.88 2.4 1.905 1.52)
3 (pdf/draw-image! doc (pdf/get-page doc 1) faction-image-url 5.88 2.0 1.905 1.52)
4 ()))
(.save doc output))
(let [a (.toByteArray output)]
{:status 200 :body (ByteArrayInputStream. a)})))
Expand Down
4 changes: 3 additions & 1 deletion src/cljs/orcpub/dnd/e5/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3526,7 +3526,9 @@
"Select Character sheet"
{:items [{:title "Select" :value " "}
{:title "Original 5e Character sheet" :value 1}
{:title "Original 5e Character sheet - optional variant" :value 2}]
{:title "Original 5e Character sheet - optional variant" :value 2}
{:title "Icewind Dale 5e Character sheet" :value 3}
{:title "Petersen Games - Cthulhu Mythos Sagas sheet" :value 4}]
:value print-character-sheet-style?
:on-change (make-arg-event-handler ::char/set-print-character-sheet-style? js/parseInt)}]]]
[:div.flex
Expand Down

0 comments on commit 6b709e7

Please sign in to comment.