Token movement and line-of-sight question
I have an extension I use to move tokens that uses "token.setPosition(newX, newY);". Works great but allows movement that the Line-of-sight functionality would normally stop. Tokens move through walls, doors, etc. with no problem.
I have looked at all the APIs and code I could find like Token, TokenMoveManager, TokenManager, ImageManager, etc. but I could not find anything that will only let the movement go if it is valid (e.g., not through a wall.) I thought trying to treat it like "Token Movement Lock Mode" movement might work but there does not seem to be a way to add an approval entry without already changing the token position.
Is this something that is doable in an extension? If so, could you please point me in the right direction (i.e., how check the movement is valid, have FG automatically block the movement requested, or some other solution)?
Thank you