STBaf / NotYourTurn

A Foundry VTT module that prevents tokens from moving when it's not their turn in combat.
7 stars 3 forks source link

[BUG] Possible not proper initialized object #30

Closed STBaf closed 1 year ago

STBaf commented 1 year ago

Setup

Describe the bug grafik

Additional context User gets error message when moving Token in combat (2 Tokens in one Encounter is enoght

STBaf commented 1 year ago

Seem to be a problem when vision 5e is enabled because the whole id property vanish for canvas.token.children[0].childrin[..].id

STBaf commented 1 year ago

Vision 5e adds a element to the canvas.token.children Array on first position, so moving the 0 element to position 1. We need a better way to identify the right Array element on that point instead of relying on "will be always the first, yolo!"

STBaf commented 1 year ago

Identification of the appropriate Layer was reworked and tested with v10 and v11, hopefully should work now