Closed saw-lau closed 2 years ago
Hey! Thank you so much for the in-depth analysis here. I just got back from vacation so I can take a look today. I'll post an update later...
So I took a peek, and I'm unable to reproduce on v0.8.9 of FoundryVTT. Just want to check before digging further, are you sure that you don't have "Token Disposition Types Allowed" set to something restricting the token you're testing with, or "Restrict GM From Triggering Tiles" set to checked (and testing with a GM user?)
Just want to check before digging further, are you sure that you don't have "Token Disposition Types Allowed" set to something restricting the token you're testing with, or "Restrict GM From Triggering Tiles" set to checked (and testing with a GM user?)
No, I'm pretty-sure they're both set correctly. It's more than likely some bizarre interaction with other modules. Let me do some testing and get back to you.
OK, I've got what the problem is now. Nothing to do with other modules or tiles not triggering...
It turns out that I'd placed the Hey, Wait! tiles in the foreground tile layer, and not the background one.
However, I did this because the system wouldn't allow me to place them in the background layer... I'm playing D&D and have used kakaroto's R20Converter, which seems to place the background map graphic as a tile with a z-order of 0 (as opposed to have a background image for the scene), so maybe that explains why I can't place background tiles over the top?
OK, I've got what the problem is now. Nothing to do with other modules or tiles not triggering...
It turns out that I'd placed the Hey, Wait! tiles in the foreground tile layer, and not the background one.
However, I did this because the system wouldn't allow me to place them in the background layer... I'm playing D&D and have used kakaroto's R20Converter, which seems to place the background map graphic as a tile with a z-order of 0 (as opposed to have a background image for the scene), so maybe that explains why I can't place background tiles over the top?
OK - found a workaround to the R20Converter 'thing' of using tiles for the background map. It's trivially easy to just point the background image to that tile and then delete the tile. Hey, Wait! then works perfectly!!!
(Hey, Wait! version 0.6.1)
Following an upgrade to Foundry 0.8.9, the Hey, Wait! tiles no longer trigger.
I'm no JavaScript programmer, but attempted to dig around and was wondering it this was related to the following issue: https://gitlab.com/foundrynet/foundryvtt/-/issues/5651.
Looking at the TokenUpdateCoordinator.coordinateUpdate method, this.tokenInitPos.get(tokenDoc.id) is always returning null (or whatever - as I said, I'm no JS dev!), so the method calls _cleanQueuedTokenInitPos and then exits.
The only place I saw TokenUpdateCoordinator.tokenInitPos being set was in registerTokenInitPos, and the only reference I found to that was during the module setup:
Given that the issue referenced above talks about pre-updates on tokens, I thought this might be a cause?
Additionally, from within Foundry's debugging tools I searched for 'preUpdateToken' and found _preUpdateTokenActor in the Foundry files, so maybe the name had been changed?