Skip to content

Refactor + enhance oracle importers for v11#774

Draft
rsek wants to merge 43 commits into
ben:mainfrom
rsek:oracle-importers-v11
Draft

Refactor + enhance oracle importers for v11#774
rsek wants to merge 43 commits into
ben:mainfrom
rsek:oracle-importers-v11

Conversation

@rsek

@rsek rsek commented May 29, 2023

Copy link
Copy Markdown
Collaborator

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