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

Legacy Sheet Compatibility and Bugfixes #41

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

TMGilchrist
Copy link

Hi Handyfon, recently discovered DarkerDungeons and wanted to use it in Foundry. I found and loved this module you made, but came across a few bugs, as well as wanting to use the Legacy sheet or Compact D&D Beyond sheet. I've put together a few bugfixes and compatibility tweaks to make your module's content show up on the Legacy, and Compact D&D Beyond sheets.

I'm not really a javascript dev, and it's my first time editing a Foundry module so hopefully my changes seem rational, let me know if anything is amiss. The Legacy compatibility is definitly a bit rough, but it at least provides the functionality.

Legacy Sheet Compatibility:

Added rudimentry validation when searching for elements to add content to. If the new sheet locations cannot be found, it falls back to using the Legacy sheet locations.

  • DarkerDungeons tab now properly displays its contents on Legacy sheets.
  • Added error handling to large portions of the inventory/encumbrance setup as it otherwise throws fatal errors on legacy sheets that prevent further sheet setup from executing.
  • Added back the Wounds section to the Legacy sheets.

Bugfixes:

  • Reopen Wounds Button not working: Fixed element classes being declared in two places in the element definition resulting in most of the classes being ignored.
  • Fixed Reopen Wounds button reading ReopenReopen Wounds when hovered due to css style.
  • Fixed Stamina Check button only being interactable when clicking the central text by moving element class up to the parent div.

…mina Check roll button is clickable, not just the text label in the centre.
…ab to the actor sheet. Now falls back to the legacy sheet area names.
…udimentary series of Try/Catch to ignore errors in code that expects the new sheet.

This should probably be improved further.
…me validation when searching for the area to place the Wounds section. It falls back to the Legacy .counters section, or if nothing can be found, defaults to the darker dungeons tab itself. (This gives some compatibility with custom sheets, which should always have the dd tab. Tested only with Compact D&D Beyond sheet).

Cleaned up some test logging.
…on reading "ReopenReopen Wounds" when hovered. It's obviously here for a reason so I might just have misunderstood how it should work, or somehow caused the bug in the first place, but this fixes it for now.
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

Successfully merging this pull request may close these issues.

1 participant