Aedif / TokenVariants

GNU General Public License v3.0
17 stars 12 forks source link

When sharing images, all images are not visible in the token HUD. #156

Closed stevejew closed 1 month ago

stevejew commented 1 month ago

Describe the bug When sharing images, all images are not visible in the token HUD.

To Reproduce Steps to reproduce the behavior:

  1. Right-click the token.
  2. Left-click the Token HUD to open the Image menu.
  3. Right-click the image to share it.
  4. Close and reopen the hud.
  5. All of the images are gone, and using the search function doesn't turn up any images.

Expected behavior The default image and the shared image visible normally.

Screenshots 1 2

https://github.com/Aedif/TokenVariants/assets/62639203/c5141b92-4a99-4110-b0f8-ae9cd656ca37

Additional context This is only happening on the Shadowrun 5th Edition system, not on other systems. I tried it on different systems with all other modules turned off, and it only happened on the Shadowrun system.

If there is no workaround, I'd like to know how to undo the share in a situation where the image is not visible.

Aedif commented 1 month ago

You should submit this bug to Shadowrun system developers.

I don't know why, but for some reason when attempting to set a flag on actor the system converts arrays to objects. This could end up causing issues not just to TVA but many other modules.

Aedif commented 1 month ago

For now run the following after selecting the broken token: game.actors.get(_token.actor.id).unsetFlag("token-variants", 'variants')

And don't use the share feature until the system devs fixed this.