caewok / fvtt-walled-templates

Foundry VTT templates that interact with walls
MIT License
9 stars 4 forks source link

Snap to grid weirdness #81

Closed caewok closed 9 months ago

caewok commented 10 months ago

https://discord.com/channels/915186263609454632/1167221795103985764/1192294259114655794

caewok commented 9 months ago

When casting a spell (e.g. fireball) in dnd5e, the template preview does not use MeasuredTemplate.prototype._onDragLeftMove. It doesn't seem to be using the AbilityTemplate version either. So I need to determine how to change the template preview drag left move method, wherever that is getting called.

Zamrod commented 9 months ago

I'm fairly certain that is contained somewhere in here: https://github.com/foundryvtt/dnd5e/blob/master/module/canvas/ability-template.mjs

caewok commented 9 months ago

You were correct! I ended up doing a mixed wrap for AbilityTemplate.prototype._onMovePlacement to force snapping in the preview. Fixed in v0.7.2. Thanks!

(The move timeout plus the refresh made it impractical to just wrap the method.)