From 850180990613d094dc79b0cbc0dd4bdb1fa7d4b5 Mon Sep 17 00:00:00 2001 From: Chelsea Ash Date: Fri, 15 Jan 2021 13:07:40 -0500 Subject: [PATCH] Fix issue with compendium actors --- changelog.md | 3 +++ module.json | 4 ++-- training.js | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index b951091..fc387cf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Change Log +## Version 0.4.11 +- Fixed an issue where the downtime tab would attempt to display on actor sheets inside compendiums and throw some errors. + ## Version 0.4.10 - Compatibility patch for Tidy5e v0.4.x. It's not pretty, but you can see the buttons now. diff --git a/module.json b/module.json index 9a6f94d..2b664ad 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "name": "5e-training", "title": "Crash's 5e Downtime Tracking", "description": "Adds a section to the character sheet to keep track of downtime activity progression. Track proficiency training, spell scribing, and anything else you can think of.", - "version": "0.4.10", + "version": "0.4.11", "author": "CRASH1115#2944", "minimumCoreVersion": "0.7.6", "compatibleCoreVersion": "0.7.9", @@ -28,5 +28,5 @@ ], "url": "https://github.com/crash1115/5e-training", "manifest": "https://raw.githubusercontent.com/crash1115/5e-training/master/module.json", - "download": "https://github.com/crash1115/5e-training/releases/download/v0.4.10/5e-training.zip" + "download": "https://github.com/crash1115/5e-training/releases/download/v0.4.11/5e-training.zip" } diff --git a/training.js b/training.js index 6bf2047..daa3467 100644 --- a/training.js +++ b/training.js @@ -144,8 +144,8 @@ async function addTrainingTab(app, html, data) { // Determine if we should show the downtime tab let showTrainingTab = false; - if(data.isCharacter){ showTrainingTab = game.settings.get("5e-training", "enableTraining"); } - else if(data.isNPC){ showTrainingTab = game.settings.get("5e-training", "enableTrainingNpc"); } + if(data.isCharacter && data.editable){ showTrainingTab = game.settings.get("5e-training", "enableTraining"); } + else if(data.isNPC && data.editable){ showTrainingTab = game.settings.get("5e-training", "enableTrainingNpc"); } if (showTrainingTab){