Skip to content

Commit

Permalink
add link sources
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-man committed Jun 8, 2023
1 parent aa1b32a commit aa92b31
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/actor/sheet/actor-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class ActorSheetWfrp4e extends ActorSheet {
this.element .find(".import").attr({"data-tooltip" : game.i18n.localize("SHEET.Import"), "data-tooltip-direction" : "UP"});

WFRP_Utility.replacePopoutTokens(this.element); // Opposed attackers show as tokens, replace popout versions with normal
WFRP_Utility.addLinkSources(this.element);

this._refocus(this._element)

Expand Down
1 change: 1 addition & 0 deletions modules/hooks/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ export default function() {

Hooks.on("renderChatMessage", async (app, html, msg) => {

WFRP_Utility.addLinkSources(html)
// Hide test data from players (35 vs 50) so they don't know the enemy stats
if (game.settings.get("wfrp4e", "hideTestData") && !game.user.isGM && html.find(".chat-card").attr("data-hide") === "true") {
html.find(".hide-option").remove();
Expand Down
1 change: 1 addition & 0 deletions modules/item/item-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class ItemSheetWfrp4e extends ItemSheet {
this.element.find(".import").attr({"data-tooltip" : game.i18n.localize("SHEET.Import"), "data-tooltip-direction" : "UP"});
let idLink = this.element.find(".document-id-link")
this.element.find(".window-title").after(idLink)
WFRP_Utility.addLinkSources(this.element);
}


Expand Down
2 changes: 1 addition & 1 deletion modules/system/utility-wfrp4e.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ export default class WFRP_Utility {
}

// Add the source of a compendium link
// e.g. Compendium.wfrp4e-core -> Add (WFRP4e Core Rulebook)
// e.g. Compendium.wfrp4e-core -> (WFRP4e Core Rulebook) tooltip
static addLinkSources(html)
{
html.find(".content-link").each((index, element) => {
Expand Down

0 comments on commit aa92b31

Please sign in to comment.