Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compatibility] Token Replacer and Item Piles don't work together #86

Closed
brunocalado opened this issue Jan 15, 2022 · 4 comments · Fixed by #87
Closed

[Compatibility] Token Replacer and Item Piles don't work together #86

brunocalado opened this issue Jan 15, 2022 · 4 comments · Fixed by #87
Assignees

Comments

@brunocalado
Copy link

brunocalado commented Jan 15, 2022

Hi. Great module!

Item Piles don't work with Token Replacer. They generate an error together.
image

I don't know which module should patch it. But, I'm reporting.

Thank you.

Issue on item piles: fantasycalendar/FoundryVTT-ItemPiles#36

@Haxxer
Copy link

Haxxer commented Jan 16, 2022

Hi - creator of Item Piles here. Do you think it would best for me to add the token-replacer disabled flag on my end?

@vtt-lair
Copy link
Owner

@Haxxer do you mean, set it as disabled on your side and then re-enable it after the pile has been created?

That could work, but we'll have to make sure that the setting is enabled again and that my hook is called after yours. Alternatively, I can also wrap my check to check if the token being created is an item pile token. Would checking the item-piles flag on the document.data be enough (if enabled is true)? Is the item-piles flag only set for item-piles tokens?

@Haxxer
Copy link

Haxxer commented Jan 17, 2022

Yeah, that's what I meant, disable it for the creation, and then re-enable it after it's done. As for Item Piles flags, yep, it's only set for the specific item pile tokens, usually directly configured by the user. If you need to know if a token is an item pile, you'll want to check data.flags.item-piles.data.enabled, which will be true if it's an item pile.

@vtt-lair vtt-lair self-assigned this Jan 17, 2022
@vtt-lair vtt-lair linked a pull request Jan 17, 2022 that will close this issue
@vtt-lair
Copy link
Owner

The fix for this has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants