fantasycalendar / FoundryVTT-ItemPiles

Other
33 stars 54 forks source link

Foundry v12 Support #586

Closed NeilWhite closed 3 months ago

NeilWhite commented 3 months ago

Addresses #583

Replace new Roll(...).evaluate({ async: false }) with either

Disable the cleanFlagData call in updateItemPileData(target, flagData, tokenData) as removing all the defaults causes a bunch of subscriptions to fail while checking undefined properties

Update many [getProperty, setProperty, hasProperty, debounce, isNewerVersion].map(x => foundry.utils[x]) to reduce warning log spam

Update game.system.template to game.system.documentTypes to reduce warning log spam

hyrapower commented 3 months ago

Mostly works as intended.

TypeError: Cannot read properties of undefined (reading 'mouse') is triggered when you have a shopkeeper though.

my test case was:

gm creates player and shopkeeper npc token change npc token to item pile, as merchant type add items to merchant login as player character error occurs every time player clicks

looks to be caused by

function getCanvasMouse() { return game.release.generation === 11 ? canvas.app.renderer.plugins.interactionData.pointer : canvas.app.renderer.plugins.interaction.mouse; }

it's either i compiled this wrong, or that 11 is supposed to be a 12