schlosrat / token-health

FoundryVTT module
5 stars 10 forks source link

Conflict with Smart Doors Module #69

Closed MrChessur closed 1 year ago

MrChessur commented 2 years ago

I don't know exactly if this error affects other modules, but when this module and Smart Doors are enabled, neither can be updated in the module settings tab, such as with check boxes. It will just prompt a reload and the settings will remain what they were originally.

manuelVo commented 2 years ago

When a module defines a setting like this:

game.settings.register("module_name", "foobar", {
  name: "foobar",
  scope: "client",
  config: true,
  default: 0,
  type: Number,
  onChange: () => window.location.reload()
});

Token Health somehow causes the "onChange" function to be called whenever the "Save module settings" button is clicked, even if the setting wasn't changed. This results in a page reload, which leads to the described bug.

schlosrat commented 1 year ago

I believe this is fixed in 0.5.6. The only change between 0.5.5 and 0.5.6 was the removal of the obsolete Settings Extender dependency in Token Health. When I test this (using AGE System and only Token Health and Smart Doors enabled), I'm able to change settings for either one and save. When re-opening Configure Settings the new setting is in effect.

Please let me know if this doesn't fix it for you with other game systems.