Skip to content

Commit

Permalink
v1.3.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed May 21, 2022
1 parent aaf7bd3 commit 20809f9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.3.22

Fixed chat messages not showing up if PF2e Combat Tracker Images was not present.

# 1.3.21

Chat portrait support for Mark Pearce's PF2e Combat Tracker Images. Fixed links in dark mode chat messages.
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "Overhauls the Foundry UI and several modules.",
"url": "https://github.com/Dorako/pf2e-dorako-ui",
"author": "Dorako",
"version": "1.3.21",
"version": "1.3.22",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "9",
"system": ["pf2e"],
"scripts": ["scripts/dorako-ui.js"],
"templates": ["templates/*"],
"download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.3.21.zip",
"download": "https://github.com/Dorako/pf2e-dorako-ui/archive/refs/tags/v1.3.22.zip",
"manifest": "https://github.com/Dorako/pf2e-dorako-ui/raw/main/module.json"
}
14 changes: 11 additions & 3 deletions scripts/dorako-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ Hooks.once("init", async function () {
CONFIG.ChatMessage.template =
"modules/pf2e-dorako-ui/templates/base-chat-message.html";

const combatImagesActive = game.modules.get("combat-tracker-images")?.active;

Handlebars.registerHelper("getSpeakerImage", function (message) {
// const blind = message.whisper && message.blind;
// if (blind) return "icons/svg/mystery-man.svg";
Expand All @@ -167,7 +169,9 @@ Hooks.once("init", async function () {
}
if (speaker.actor) {
const actor = Actors.instance.get(speaker.actor);
combatantImg = actor.getFlag("combat-tracker-images", "trackerImage");
combatantImg = combatImagesActive
? actor.getFlag("combat-tracker-images", "trackerImage")
: null;
actorImg = actor?.data.img;
}
}
Expand Down Expand Up @@ -198,7 +202,9 @@ Hooks.once("init", async function () {
}
if (speaker.actor) {
const actor = Actors.instance.get(speaker.actor);
combatantImg = actor.getFlag("combat-tracker-images", "trackerImage");
combatantImg = combatImagesActive
? actor.getFlag("combat-tracker-images", "trackerImage")
: null;
actorImg = actor?.data.img;
}
}
Expand Down Expand Up @@ -241,7 +247,9 @@ Hooks.once("init", async function () {
}
if (speaker.actor) {
const actor = Actors.instance.get(speaker.actor);
combatantImg = actor.getFlag("combat-tracker-images", "trackerImage");
combatantImg = combatImagesActive
? actor.getFlag("combat-tracker-images", "trackerImage")
: null;
actorImg = actor?.data.img;
}
}
Expand Down

0 comments on commit 20809f9

Please sign in to comment.