League-of-Foundry-Developers / torch

Simple torch module for Foundry VTT
10 stars 16 forks source link

'Token Light Condition' module interaction #63

Open renzo38 opened 9 months ago

renzo38 commented 9 months ago

Hi,

I run foundry with your (really nice) module and the 'Token Light Vision' one. I got something wrong when I 'switch off' the torch from the token HUD, the light disappear but the 'Token Light Vision' considers that there is still light (BRT is displayed in the token HUD). If I start/stop the animation from the token panel, it works. Do you have any idea where this might come from ? I also opened an issue in the 'Token Light Condition' project.

tokenlightcondition

Best regards

lupestro commented 9 months ago

Hard to say - they're messing with some of the same things. In general, using two modules that affect the same area can be a risky business. However, I can give you enough information about Torch that maybe you can figure it out.

In the Torch module,

The only flags we keep are "lightSource" and "lightSourceState". Aside from the light settings on the token, the two flags, and the quantities on the consumables, it doesn't touch anything else.

The Token Light Vision module may be coupling the token's light settings with other token data or module-defined flags. When we change the light values, that data and those flags could get out of sync with its expectation for the token light settings, leading to confusion.

But that's only my best guess. I wouldn't know unless I installed the module and observed their interactions and what kind of token and other data was affected.