Skip to content

Commit

Permalink
fix: closes #83 (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
gioppoluca authored Sep 24, 2023
1 parent d401a1c commit 34b75c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/pdfsheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ Hooks.on("getActorSheetHeaderButtons", (sheet, buttons) => {
console.log(sheet)
console.log(sheet.actor)
// If this is not a player character sheet, return without adding the button
if (!["character", "PC", "Player", "npc"].includes(sheet.actor.type ?? sheet.actor.data.type)) return;
// added pc for cypher system
// TODO: have to refactor this with something generic
if (!["character", "PC", "Player", "npc", "pc"].includes(sheet.actor.type ?? sheet.actor.data.type)) return;

buttons.unshift({
label: "Export to PDF",
Expand Down Expand Up @@ -341,7 +343,7 @@ class Pdfconfig extends FormApplication {
// Get mapping from settings
let mapping = ""

if (["character", "PC", "Player"].includes(actor.type ?? actor.data.type)) {
if (["character", "PC", "Player", "pc"].includes(actor.type ?? actor.data.type)) {
console.log("got mapping for PC")
mapping = game.settings.get(Pdfconfig.ID, "mapping");
}
Expand Down

0 comments on commit 34b75c1

Please sign in to comment.