diff --git a/README.md b/README.md new file mode 100644 index 0000000..116f6e2 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Daggerheart Environment Overlay + +A FoundryVTT module for the **Daggerheart** system that allows GMs to link **Environment** type actors to specific scenes. When a linked scene is active, the environment actor's token is displayed as an interactive, persistent overlay on the canvas. + +## Features + +- **Scene Linking**: Drag and drop an Environment actor into the Scene Configuration to link it. +- **Interactive Overlay**: Click the overlay to instantly open the Environment actor's sheet. +- **Movable Interface**: Hold `Alt` + Left Click and Drag to reposition the overlay. The position is saved per-scene. +- **Customizable**: + - Toggle the display of the actor's name. + - Customize the border color of the overlay token. +- **Permission Support**: The overlay respects ownership permissions, ensuring only relevant users can see or interact with it. diff --git a/module.json b/module.json index 93276ab..76b3af7 100644 --- a/module.json +++ b/module.json @@ -1,6 +1,7 @@ { "id": "dh-environment-overlay", "title": "Daggerheart Environment Overlay", + "description": "Links Environment actors to scenes, displaying them as interactive, movable overlays on the canvas.", "version": "1.0.0", "compatibility": { "minimum": "13", diff --git a/scripts/module.js b/scripts/module.js index 3807482..ac7865d 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -10,7 +10,7 @@ Hooks.once("init", () => { scope: "world", config: true, type: String, - default: "#ffcc00", + default: "#f3c267", onChange: () => renderEnvironmentOverlay() }); @@ -271,7 +271,7 @@ Hooks.on("updateScene", (document, change, options, userId) => { if (!document.isView) return; if (canvas.scene && document.id === canvas.scene.id) { - if (hasProperty(change, `flags.${MODULE_ID}`)) { + if (foundry.utils.hasProperty(change, `flags.${MODULE_ID}`)) { const flags = change.flags[MODULE_ID]; if (flags) { if (flags[FLAG_KEY] !== undefined) {