eadorin / point-of-vision

2 stars 4 forks source link

'all corners' and 'all midpoints' options not working #4

Open RLPoulin opened 4 years ago

RLPoulin commented 4 years ago

Hi, thanks for your work again.

Bug The 'all corners' and 'all midpoints' options are not working. I have just a little experience with js and the Foundry API, but I think that these options are implemented by updateToken(). If I run the function manually in the console, I get the following error:

> canvas.tokens.controlled[0].updateToken(this)

Uncaught TypeError: Cannot read property 'vision' of undefined
    at Token.updateToken (point-of-vision.js:87)
    at <anonymous>:1:29

It would seem that this.sources doesn't exist, but I'm able to see that this.vision and this.light do exist. This might be do to a 0.7.x API change, I don't know.

I hope this helps.

RoadLuca commented 3 years ago

I also appreciate the hard work. I also noticed that 'all corners' and 'all midpoints' don't work yet. I was wondering if/when this would be fixed as the default vision in foundry doesn't quite abide by D&D 5e rules (DMG 251) so this mod is pretty useful if not essential if you want to play by standard rules.

Thanks in advanced ^.^