Open Kayne opened 1 year ago
Source:
Hooks.on("canvasReady", () => {
canvas.stage.on("mousemove", event => {
const {x: mx, y: my} = event.data.getLocalPosition(canvas.templates);
for ( const template of canvas.templates.placeables ) {
const hl = canvas.grid.getHighlightLayer(`MeasuredTemplate.${template.id}`);
const opacity = template.document.getFlag("tokenmagic", "templateData")?.opacity ?? 1;
if ( template.texture && template.texture !== "" ) {
const {x: cx, y: cy} = template.center;
const mouseover = template.shape.contains(mx - cx, my - cy);
hl.renderable = mouseover;
template.template.alpha = (mouseover ? 0.5 : 1.0) * opacity;
}
else {
hl.renderable = true;
template.template.alpha = opacity;
}
}
});
});
}
and line:
hl.renderable = true;
fails with Cannot set properties of undefined (setting 'renderable')
Module Version: 0.6.3.1
Before open any issue
I wanted to enable debugging but no such option is available for Token Magic FX module.
Describe the bug When using Animate Dead spell "macro magic" from module Automated Animations, after choosing creature, the gray token appears but cannot be moved and all map canvas is freezed.
The error is raised from Token Magic FX module:
The original bug report from A-A module: https://github.com/otigon/automated-jb2a-animations/issues/666
To Reproduce Steps to reproduce the behavior:
Expected behavior No error, token should be placeable.
Browser: Browser & version doesn't matter, same behaviour on all
Foundry Version: 10.291
Game System: PF2e 4.12.9
Additional context Sequencer Version: 3.1.2 Automated Animations version 4.2.62 Hosting Location: nodejs on server
Active modules: Advanced Macros v; Autocomplete Whisper v; Automated Animations v; Award XP v; Cautious Gamemaster's Pack v; Chat Images v; Combat Enhancements v; Dice So Nice! v; Dice Tray v; Drag Ruler v; Enhanced Terrain Layer v; Escape Window v; Foundry VTT Anniversary Dice Set by The Rollsmith v; Health Estimate v; Image Hover v; Initiative Double Click v; Jam and Jax's NPC Ancestry Abilities v; Jam and Jax's NPC Index: Specialists v; Jam and Jax's NPC Index: Spellcaster v; Jam and Jax's NPC Index: Warriors v; JB2A - Patreon Complete Collection v; libWrapper v.0; LiveKit AVClient v; Pathfinder 2e: Abomination Vaults v; Pathfinder Beginner Box v; Pathfinder Token Pack: Bestiaries v; Pathmuncher: Pathbuilder character importer for PF2e v; Perfect Vision v; PF2e Animations v; PF2e Companion Compendia v; PF2e Dorako UI v; PF2e Drag Ruler Integration v; PF2E Exploration Effects v; PF2e Giveth v; pF2E Keybind Menagerie v; Pf2E Modifiers Matter v; PF2e Staves v; PF2e Target Damage v; PF2e Workbench v; Polyglot v; routinglib v; Safety Tools v; Sequencer v; socketlib v; Tidy UI - Game Settings v; Token Action HUD Classic v; Token Info Icons v; Tokenizer v; Token Magic FX v; Token Mold v; Warp Gate v;