SvenWerlen / moulinette-core

FoundryVTT module which provides a set of tools for DMs for managing assets.
https://www.patreon.com/moulinette
MIT License
40 stars 10 forks source link

Random Tile Function stopped working #75

Closed LorduFreeman closed 2 months ago

LorduFreeman commented 3 months ago

Foundry V12 330 Moulinette Core 12.0.0 / Tiles 12.1.3

Issue: Clicking on the canvas does not spawn a random tile, throws error.

Process: Going to the Tiles Tool and selecting Moulinette Tiles, then clicking the dice icon in front of the works fine. Right-clicking on the canvas only moves to Tiles Layer (does not cycle). Left-clicking on the canvas throws an error instead of creating a tile.

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getRandomAsset') at MoulinetteTiles.onLeftClickGrid (moulinette-tiles.js:829:47) at moulinette-layer.js:49:53 at Array.forEach (<anonymous>) at MoulinetteLayer._onClickLeft (moulinette-layer.js:49:29) at #onClickLeft (foundry.js:25816:59) at MouseInteractionManager.callback (foundry.js:30823:17) at #handleClickLeft (foundry.js:31024:15) at #handleLeftDown (foundry.js:31006:38) at #handlePointerDown (foundry.js:30970:58) at vh.notifyListeners (EventBoundary.ts:1454:26) at vh.notifyTarget (EventBoundary.ts:662:18) at vh.propagate (EventBoundary.ts:299:14) at vh.dispatchEvent (EventBoundary.ts:210:14) at vh.mapPointerDown (EventBoundary.ts:683:14) at vh.mapEvent (EventBoundary.ts:231:28) at ra.onPointerDown (EventSystem.ts:373:31)

SvenWerlen commented 2 months ago

Thank you for reporting this! I found an issue with Tiles 12.1.3 and implemented a fix in v-12.1.4.

However, you should upgrade Core to 12.1.1, too. 12.0.0. is pretty old. I think your error message is due to incompatibility between core and tiles.

I close this issue but feel free to reopen it if it's still not fixed for you