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

Refactor + enhance oracle importers for v11 #774

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

rsek
Copy link
Collaborator

@rsek rsek commented May 29, 2023

Depends on #715

The idea here is that dataforged imports should be able to happen without Dataforged living in memory at all times. This implements a method that takes a compendium pack ID and pops a JSON file import dialog. If it can parse that JSON as oracle data, it then proceeds to build the tables (with folders to represent oracle categories) and fill the compendium pack with them.

Note that this PR still loads Dataforged because other stuff (like the oracle tree) relies on it.

  • extends RollTables with Oracles, mainly to serve as a container for a bunch of static methods:
    • Oracles#find: locates an OracleTable with an ID, UUID, or DFID
    • Oracles#importFromDataforgedDialog: described above
    • numerous methods used to apply data transforms and handle other import-related tasks
  • add several new utility functions for manipulating packs (clearing their contents, purging empty folders, etc)
  • enhances oracle data transforms so we can use more info from dataforged
    • use icons where provided
    • uses more verbose titles for e.g. folders
  • when rendering an oracle path string for e.g. oracle roll messages, uses actual folder names instead of relying on the DFID string
    • this makes oracle categories localizable via Babele compendium overrides

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