Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback light source settings aren't being applied until Torch is reloaded #100

Open
lupestro opened this issue Jan 19, 2025 · 0 comments

Comments

@lupestro
Copy link
Collaborator

Describe the bug
When using a system that doesn't have any light sources in either the common or user-supplied light sources data, i.e. one that is using the default setup, if you update the fallback light source name and data in config, the new values aren't used until you restart the server.

To Reproduce
Steps to reproduce the behavior:

  1. Open a system that doesn't have predefined light sources, like fudge-rpg
  2. Open the Token HUD for a token and right click on the flame icon.
  3. Note that, initially, it has a single light source named "torch".
  4. Close the HUD, open the settings, and change the fallback light source name from "torch" to "Fiat Lux" with much smaller radii.
  5. Reopen the Token HUD, click on the flame icon.
  6. Expected: It should be using the new settings. Actual: It is still using the settings that were just changed.and observe that it is still using the data from "torch".
  7. Right click on the flame icon and hover the single light source.
  8. Expected: It should show the new name. Actual: It is still showing the old name.
  9. ^R the server and you will see that the new values are now in force.

** Expected behavior**
Changes to the settings for the fallback light source should immediately take effect.

Environment

  • FoundryVTT 12 and 13
  • Torch 2.19.0 forward
  • System: fudge-rpg

** Other details that are often useful

  • i know why this is happening. The common sources data is only read once and we aren't updating the settings of the default system in the common sources when we make a new library object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant