feat: Implement Daggerheart Path Browser module to display and copy Active Effect data paths.
This commit is contained in:
commit
922814242d
7 changed files with 387 additions and 0 deletions
21
scripts/main.mjs
Normal file
21
scripts/main.mjs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { DhPathBrowserApp } from "./app.mjs";
|
||||
|
||||
Hooks.on("init", () => {
|
||||
console.log("Daggerheart Path Browser | Initializing module");
|
||||
});
|
||||
|
||||
Hooks.on("renderDaggerheartMenu", (app, html, data) => {
|
||||
const button = document.createElement("button");
|
||||
button.type = "button";
|
||||
button.innerHTML = `<i class="fa-solid fa-code"></i> ${game.i18n.localize("Browse Data Paths")}`;
|
||||
button.classList.add("dh-path-browser-btn");
|
||||
|
||||
button.addEventListener("click", () => {
|
||||
new DhPathBrowserApp().render(true);
|
||||
});
|
||||
|
||||
const container = html.querySelector("div");
|
||||
if (container) {
|
||||
container.appendChild(button);
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue