Skip to content

Commit

Permalink
v1.0.6
Browse files Browse the repository at this point in the history
- Fixed playlists not being visible in the sidebar when Monk's Sound Enhancements module is used.
  - No longer will they be a deep purple and impossible to see.
- Started initial v13 compatibility work.
  • Loading branch information
sneat authored Jan 29, 2025
2 parents f919e2c + 2cedda1 commit 9604aca
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.0.6

- Fixed playlists not being visible in the sidebar when Monk's Sound Enhancements module is used.
- No longer will they be a deep purple and impossible to see.
- Started initial v13 compatibility work.

# v1.0.5

- Remove deprecation warnings from item and armor sheets.
Expand Down
6 changes: 6 additions & 0 deletions css/pirateborg.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/pirateborg.css.map

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions module/pirateborg.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ Hooks.once("ready", () => {
Hooks.on("renderActorDirectory", renderActorDirectory);
Hooks.on("renderCombatTracker", renderCombatTracker);
Hooks.on("renderSettings", renderSettings);
Hooks.on("renderChatMessage", handleChatMessageButton);
Hooks.on("renderChatMessage", handleChatMessageGMOnly);
Hooks.on("renderChatMessage", handleChatMessageAutomation);
if (foundry.utils.isNewerVersion(game.version, '13')) {
Hooks.on("renderChatMessageHTML", handleChatMessageButton);
Hooks.on("renderChatMessageHTML", handleChatMessageGMOnly);
Hooks.on("renderChatMessageHTML", handleChatMessageAutomation);
} else {
Hooks.on("renderChatMessage", handleChatMessageButton);
Hooks.on("renderChatMessage", handleChatMessageGMOnly);
Hooks.on("renderChatMessage", handleChatMessageAutomation);
}
Hooks.on("dragRuler.ready", onDragRulerReady);

Hooks.on("renderPause", (app, [html]) => {
Expand Down
8 changes: 8 additions & 0 deletions module/system/render-chat-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { emitScrollChatToBottom } from "./sockets.js";
* @param {JQuery.<HTMLElement>} html
*/
export const handleChatMessageButton = async (message, html) => {
if (foundry.utils.isNewerVersion(game.version, '13')) {
// For now, wrap the html back to a jQuery object, same as it was prior to v13.
html = $(html);
}
html.on("click", "button.item-button", async (event) => {
event.preventDefault();
const button = event.currentTarget;
Expand All @@ -25,6 +29,10 @@ export const handleChatMessageButton = async (message, html) => {
* @param {JQuery.<HTMLElement>} html
*/
export const handleChatMessageGMOnly = async (message, html) => {
if (foundry.utils.isNewerVersion(game.version, '13')) {
// For now, wrap the html back to a jQuery object, same as it was prior to v13.
html = $(html);
}
html.find(".gm-only").removeClass("gm-only");
};

Expand Down
6 changes: 6 additions & 0 deletions scss/pirateborg/_foundry-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -975,3 +975,9 @@ li.folder > .folder-header {
filter: drop-shadow(0 0 0 rgba(255, 0, 0, 0));
}
}

/* Monk's Sound Enhancement overrides */
#playlists.sound-enhancement .playlist header.playlist-header,
#playlists-popout.sound-enhancement .playlist header.playlist-header {
background: inherit;
}
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "pirateborg",
"title": "PIRATE BORG",
"description": "Foundry VTT system for PIRATE BORG.",
"version": "v1.0.5",
"version": "v1.0.6",
"compatibility": {
"minimum": "11",
"verified": "12"
Expand Down
5 changes: 4 additions & 1 deletion utils/packs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ function cleanPackEntry(data, { clearSourceId = true, ownership = 0 } = {}) {
data.ownership = { default: ownership };
}
if (data.ownership) data.ownership = { default: ownership };
if (clearSourceId) delete data.flags?.core?.sourceId;
if ( clearSourceId ) {
delete data._stats?.compendiumSource;
delete data.flags?.core?.sourceId;
}
delete data.flags?.importSource;
delete data.flags?.exportSource;
if (data._stats?.lastModifiedBy) data._stats.lastModifiedBy = "pbbuilder0000000";
Expand Down

0 comments on commit 9604aca

Please sign in to comment.