IcyLemonZ / pf2e-exploration-activities

A FoundryVTT module for Pathfinder2e. Adds a macro command that can be run by the GM which prompts selected players with a dropdown to select their current Exploration Activity and outputs the result to the Chat.
5 stars 14 forks source link

Set Exploration Activity macro not working in V12 #17

Open thejoester opened 1 month ago

thejoester commented 1 month ago

In Foundry V12 the macro for Set Exploration Activity is not working. Throwing an error in the console:

Uncaught (in promise) Error: You are accessing the CharacterPF2e "data" field of which was deprecated in v10 and replaced with "system". Continued usage of pre-v10 ".data" paths is no longer supported"
[No packages detected]
    get data http://<my-ip>:30000/scripts/foundry-esm.js:12036
    tokens http://<my-ip>:30000/scripts/foundry.js line 20071 > AsyncFunction:4
    anonymous http://<my-ip>:30000/scripts/foundry.js line 20071 > AsyncFunction:3
    #executeScript http://<my-ip>:30000/scripts/foundry.js:20076
    execute http://<my-ip>:30000/scripts/foundry.js:20022
    #onExecute http://<my-ip>:30000/scripts/foundry.js:79355
foundry-esm.js:12036:15
thejoester commented 1 month ago

So I found the fix to this issue:

in the macro you change Line 2 from

['character'].includes(t.actor.data.type),

to

['character'].includes(t.actor.type),

I created a pull request to merge this change: https://github.com/IcyLemonZ/pf2e-exploration-activities/pull/18